[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: image scale-to-fit in DITA 1.2
Since we were (trying to) keep DITA 1.1 minimal so that we could get it out sooner, we passed on adding a scale-to-fit capability to DITA graphics (the image element). Our customers are needing such a capability--to the point that we will probably have to provide it in a non-standard way for the time being--so I'd like to see it considered for DITA 1.2. Background (can be skipped) --------------------------- Graphic sizing is always complex and generally misunderstood. HTML (and CSS's) (mis-)handling only exacerbates the issue. XSL-FO has the full range, but in a way that requires attributes with odd data types (e.g., sizes, percentages, and enumerated values all in one attribute). One relatively complete (but not necessarily the clearest) discussion is one related to DocBook (but built on CALS concepts) at http://docbook.org/tdg/en/html/imagedata.html (Note that DITA's width and height attributes correspond to DocBook's width and depth attributes [and CALS' reprowid and reprodep attributes]; DITA has no attributes corresponding to DocBook's contentwidth and contentdepth as described in the above referenced web page.) I wrote about graphic sizing previously at http://lists.oasis-open.org/archives/dita/200601/msg00025.html DITA 1.2 Enhancement request ---------------------------- The current user requirement is to allow a user to request that an image be scaled to fit within the "available space". The simplest way to accomplish this given what we have to date is to add a "scalefit" attribute properly defined. This matches what CALS has done for decades and is a subset of what the latest DocBook does. Adding the scalefit attribute, the sizing attributes for image would be: <ATTLIST image . . . height NMTOKEN #IMPLIED width NMTOKEN #IMPLIED scale NMTOKEN #IMPLIED scalefit (yes | no | -dita-use-conref-target) #IMPLIED > If, for a given image, any one of height, width, or scale is specified, those attributes determine the graphic size (as is already the case in DITA 1.1), and any setting of scalefit would be ignored. If none of those attributes are specified and scalefit="yes", then the image would be scaled (the same factor in both dimensions) so that the graphic would just fit within the available height or width (whichever is more constraining). The available width would be the prevailing column (or table cell) width--that is, the width a paragraph of text would have if the graphic were a paragraph instead. The available height is implementation dependent, but if feasible, it is suggested to be the page (or table cell) height or some other reasonable value. paul
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]