Am 12.02.2005 um 16:39 schrieb Chris Karakas:
Andreas Vox <[EMAIL PROTECTED]> schrieb am 10.02.05 19:11:03:I just want to find a way to pass the information to the XML file without
breaking too many standards. How any stylesheets interpret this is up to
them.
Risking to become a pain in the a$$, let me repeat:
DON'T mix presentational markup with structural! Provide a customization layer instead.
The problem with inlinemath is that you have to know the depth of the graphic
if you want to align it to the baseline. This depth will be needed by ANY presentation
if it want to achieve a decent layout. Imagine the two formulas:
x^{y^z} x_{y_z}
Current HTML would align bitmaps for these formulas in a way that the first x is
on the baseline and the second x is hovering several pixels above the baseline.
I found no way to include this information in a proper way into the standard attributes
of DocBook's imageobject or inlinemediaobject. I thought about abusing the height and
contentheight attributes to specify a viewport which only covers the image above the
baseline, but I think that would cause more problems.
To sum up:
I need a "valign=-${depth}" attribute for inline equations, Docbook doesn't have it,
so I have to add something:
* either "style="valign: -??px", which would conform to CSS3
* or "valign=-??px" directly, which is valid for IMG elems in XHTML I think
The class attribute wont do, since the depth will be different for most inlinemath.
The only proper standards complete solution I coould think of is to provide
"id" attributes to all inline maths and provide a separate CSS which assigns
the proper attribute, eg. "imageobject#xyz { valign: -7px }"
But that would be a) harder to implement and IMO b) harder to use in a stylesheet.
I'm open to any suggestions which help with this depth problem. I there any stylesheet
which manages to honour imagedepth yet? If so, I will of course implement that
solution.
On a related topic: when I generate the math bitmaps, which resolution should I use?
This is another presentation property which needs to be decided upon when the
document is exported :-(
Thanks for the comments. Maybe we can still get proper dbmath into 1.4 :-)
Ciao /Andreas