From: Joachim Koenig-B. <jo...@cm...> - 2003-02-26 09:18:35
|
Hi, I'm using docutils in conjunction with the xsl stylesheet for docutils-xml to docbook-xml conversion posted by Eric Bellot some days ago and have a question concerning image height and width. The docutils directive document states that :height: and :width: are number interpreted as pixels: > height : integer > The height of the image in pixels, used to reserve space or scale > the image vertically. > width : integer > The width of the image in pixels, used to reserve space or scale > the image horizontally. docbook allows to specify units of measure as in TDG: > Units of Measure > > The size of the viewport area and the content area are defined in terms > of lengths (width and depth). > > Lengths must be expressed as a decimal value followed immediately by an > optional unit of measure or a percentage. Six and one eight inches, for > example, must be expressed as 6.125in. It is an error to put a space or > other punctuation between the decimal value and the unit of measure. > > The following units of measure may be used: > pt Points (1/72 of an inch) > cm Centimeters > mm Millimeters > in Inches > pc Picas (1/6 of an inch) > px Pixels > em Ems > > If no unit of measure is provided, px is assumed. Note that pixels have > no universally accepted absolute size and ems are relative units of > measure. Implementations may define pixel sizes differently and > stylesheets may or may not be able to determine the current font size > in order to correctly calculate the absolute size of an em. It is best > to avoid these units of measure. > > Percetages are expressed as a decimal value followed immediately by a % sign. So I wonder why there is a fixed interpretation in docutils for these measures. E.g. for the inclusion of an SVG image into pdf the interpretation of pixels is not easy as pointed out in TDG and I would like to be able to specify the units of measure as applicable. Could the DTD be adjusted for that? The concrete interpretation could be left to the transformations. Joachim |