From: Guenter M. <mi...@us...> - 2009-05-24 20:57:56
|
On 2009-05-21, Roberto Alsina wrote: > Here you define the length units: > http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#length- > units > But there is no mention for the "" unit, which is, of course, valid. For some lengths, is is (or was until recently) even the only valid unit (see the description of the actual lenght argument). There is also at least one case of a "percent" length without unit (i.e. 45 -> 45 %). > Since the only reference you give is to a CSS page, should ""=="px" be > assumed? For HTML, yes. > And if that's the case, what should a writer do when it has no px? > Like, the latex or odt writers. Are you sure, the odt writer does not have px? LaTeX supports the unit px but the default unit for unitless length is bp (Postscript Points): The unit ``px`` is not defined in "pure" LaTeX, but introduced by the `pdfTeX` converter on 2005-02-04. `pdfTeX` is used in all modern LaTeX distributions (since ca. 2006) also for conversion into DVI format. If you convert the LaTeX source with a legacy program, you might get the error ``illegal unit px``. If updating LaTeX is not an option, just remove the ``px`` from the length specification. HTML/CSS will default to ``px`` while the `latexe2` writer will add the fallback unit ``bp``. But be aware that px is a "relative unit": size of a pixel (length unit ``px``) ```````````````````````````````````` The length unit ``px`` stands for `pixel` and its value has varying definitions: :pdftex: defines 1px = 1bp = 1/72 in, i.e. 72 DPI (dots per inch) :CSS: defines 1 px = 1/96 in, i.e. 92 DPI :browsers: use the actual screen resolution (or what they think it is) (usually between 72 DPI and 100 DPI). regards Günter |