[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: Centering an equation
On Tue, Jan 14, 2003 at 09:07:04AM +1030, Paul A. Hoadley wrote: > On Mon, Jan 13, 2003 at 11:28:29AM -0800, Bob Stayton wrote: > > > Ah, yes, it turns out that a mediaobject inside an equation element > > is handled in a separate template in fo/math.xsl. That template > > needs to be updated as well to put the align attribute on the > > fo:block. > > Thanks for the answer. Is this the template: > > <xsl:template match="equation/mediaobject | > informalequation/mediaobject"> > > I had hoped to be helpful and supply you with a patch, but this > doesn't seem to work: > > <xsl:template match="equation/mediaobject | informalequation/mediaobject"> > <xsl:if test="$passivetex.extensions = 0 or $tex.math.in.alt = ''"> > <fo:block> > <xsl:if test="@align"> > <xsl:attribute name="text-align"> > <xsl:value-of select="@align"/> > </xsl:attribute> > </xsl:if> > <xsl:call-template name="select.mediaobject"/> > <xsl:apply-templates select="caption"/> > </fo:block> > </xsl:if> > </xsl:template> Yes, that is the template. The reason your change doesn't work is that the context node is the mediaobject, which does not have the align attribute. That attribute is on the imagedata descendant. And a mediaobject can contain several objects, so it gets a bit complicated. > No doubt I am just displaying my XSLT naivete. Is this something you > are going to patch in the XSL source at some stage? If not, can you > show me how to customise the template on the list here? I checked the changed fo/math.xsl file into CVS on DocBook SourceForge if you want to pick it up there: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/ -- Bob Stayton 400 Encinal Street Publications Architect Santa Cruz, CA 95060 Technical Publications voice: (831) 427-7796 The SCO Group fax: (831) 429-1887 email: bobs@sco.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC