You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Ryan Saunders <je...@yahoo.com> on 2006/07/09 22:15:27 UTC

Text baseline in the MathML extension?

Hello,

First of all, I realize that the MathML extension is a work
in progress, and thus, the current design may be different
than what I'm looking at (the mathml example that comes
with the fop  0.92 beta).

That said, I'm concerned that the approach used by this
extension is going to have some problems. In the current
scheme, MathML is converted to SVG by jeuclid, and the
resulting SVG is then laid out like any other graphic.

Ignoring, for the moment, the fact that JEuclid seems to
give incorrect bounds for some equations, there is also
another problem: the text baseline. The solution of
converting to SVG and treating it like an image works OK
for block-display equations, but for inline-display
equations it does not. Consider a simple mathematical
expression 'i_0' ('i' with a '0' subscript). The i's
baseline should be consistent with the text around it,
while the zero's baseline should be slightly below the main
text baseline. But this scheme for integrating fop/jeuclid
would instead put the zero's baseline consistent with the
surrounding text.

Perhaps you're already aware of this, but as a fop user who
would like to see robust equation support, I thought it
worth pointing out.

Thanks,
Ryan


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Text baseline in the MathML extension?

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
This is a known problem. Please dig through the mailing list archives.
Gennadiy Tsarenkov has started some work last year to improve JEuclid
itself. He mentioned this problem. Obviously, we will need to extend FOP
just a little so a FOP extension for fo:instream-foreign-object and
fo:external-graphic can report the position of the baseline. Maybe you
can work with Gennadiy to fix this.

On 09.07.2006 22:15:27 Ryan Saunders wrote:
> Hello,
> 
> First of all, I realize that the MathML extension is a work
> in progress, and thus, the current design may be different
> than what I'm looking at (the mathml example that comes
> with the fop  0.92 beta).
> 
> That said, I'm concerned that the approach used by this
> extension is going to have some problems. In the current
> scheme, MathML is converted to SVG by jeuclid, and the
> resulting SVG is then laid out like any other graphic.
> 
> Ignoring, for the moment, the fact that JEuclid seems to
> give incorrect bounds for some equations, there is also
> another problem: the text baseline. The solution of
> converting to SVG and treating it like an image works OK
> for block-display equations, but for inline-display
> equations it does not. Consider a simple mathematical
> expression 'i_0' ('i' with a '0' subscript). The i's
> baseline should be consistent with the text around it,
> while the zero's baseline should be slightly below the main
> text baseline. But this scheme for integrating fop/jeuclid
> would instead put the zero's baseline consistent with the
> surrounding text.
> 
> Perhaps you're already aware of this, but as a fop user who
> would like to see robust equation support, I thought it
> worth pointing out.
> 
> Thanks,
> Ryan


Jeremias Maerki