OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] MathML and DocBook problems


Hi Jirka,

Jirka Kosek wrote:

> > (In fact, the task is slightly more complicated than mere replacing: 
> > the resulting SVG images shall be adjusted vertically to align 
> > the baseline of the math with that of the text. Some fiddling with 
> > the surrounding FO looks necessary as well).
>
> Hmmm, I'm not sure how to do this. How is fo:instream-foreign-object 
> attached to baseline? 

Fo:instream-foreign-objects behave exactly like fo:external-graphics: they have 
no baseline table of their own. The default alignment is done by placing the 
bottom edge on the current baseline. It means that you must add extra 
attributes (@alignment-adjust or @baseline-shift) on fo:instream-foreign-object / 
fo:external-graphic in order to position a MathML formula properly; you cannot 
encode it in the contents of either MathML or SVG. 

(Looking back, I think this might be a flaw in the XSL-FO spec).    

> Does SVG image has something like baseline 
> (maybe x-axis can be considered as a baseline)?

An SVG image produces just a rectangular area of a given size; XSL-FO 
processors don't use its other attributes beyond @width and @height. 
In SVGMath, I do set the viewBox so that the x-axis is at the baseline; 
but this information means nothing to formatters. There's no other option 
but to add extra attributes on the parent fo:instream-foreign-object 
element. Fortunately, this is quite straightforward.

Regards,
Nikolai



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]