[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] How to suppress "the section called
Thomas Schraitle wrote: > Hi Paul, > >> Suppose that I have input like this: >> >> For more information, see <xref linkend="some-id"/>. >> >> For HTML, the output looks like this: >> >> For more information, see the section called "My Section Title Here". >> >> >> Is there a parameter that I can use to suppress the "the section called" >> part? > > There are two options: > > 1. Use xrefstyle to customize your cross reference > This is useful, if you want to customize xrefs individually. However, you have to use > the attribute xrefstyle on *every* xref. > > See http://www.sagehill.net/docbookxsl/CustomXrefs.html#Xrefstyle > > For example: <xref linkend="some-id" xrefstyle="select: title"/> > (See Table 14.1: Keywords for xrefstyle select: for more keywords) > > > 2. Add a customization layer for localization > This needs a bit more effort as you have to use a XSLT customization layer that > contains your corrections. > > See http://www.sagehill.net/docbookxsl/CustomXrefs.html#XrefGentext > > >> [...] >> In fact, if I can suppress the surrounding quotes, I'd like to do that, >> too. I just want the text of the cross-referenced section's title, >> nothing else. Possible? > > Use method 2 in your XSLT customization layer and add: > > <xsl:param name="local.l10n.xml" select="document('')"/> > <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"> > <l:l10n language="en"> > <l:context name="xref"> > <!-- ... --> > <l:template name="sect1" text="%t"/> > </l:context> > </l:l10n> > </l:i18n> > > The original file is located at /path/to/docbook-xsl-stylesheets/common/en.xml. > > Hope that helps. :) Yes, it does. I took the second approach: <!-- disable section numbering --> <xsl:param name="chapter.autolabel" select="0"/> <xsl:param name="section.autolabel" select="0"/> <!-- customize xref title generation: include only text of titles --> <xsl:param name="local.l10n.xml" select="document('')"/> <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"> <l:l10n language="en"> <l:context name="xref"> <l:template name="appendix" text="%t"/> <l:template name="chapter" text="%t"/> <l:template name="section" text="%t"/> </l:context> </l:l10n> </l:i18n> Thanks!
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]