[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Customizing xrefstyle globally
As you realized, using xrefstyle is good for ad hoc changes to individual xrefs, but it would be tedious to use as a global change of style for all references. The default style for xref rendering comes from the gentext templates, which are in common/en.xml for English language documents. In your case, you only want to change how the page citation is rendered. Fortunately, there is a single gentext template that handles that for all xrefs. It is the template whose name is 'page.citation' in the 'xref' context in en.xml: <l:template name="page.citation" text=" [%p]"/> If you put a new version of that gentext template in your customization, then you will get it as the new default style for page numbers. Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net ----- Original Message ----- From: "John W. Shipman" <john@nmt.edu> To: "docbook-apps mailing list" <docbook-apps@lists.oasis-open.org> Cc: "John Shipman" <john@nmt.edu> Sent: Wednesday, May 19, 2004 8:08 PM Subject: [docbook-apps] Customizing xrefstyle globally > I've just finished carefully reading the chapter in Stayton's > book on `Cross-references,' but there's one thing I can't figure > out how to do. > > When in my FO customization layer I set insert.xref.page.number > to 1, I get the default style of page number cross-references, > namely, the page number in square brackets, e.g., "[12]". > > What I'd prefer is that such page numbers occur in the > xrefstyle="select: title pageabbrev" style, e.g., "(p. 12)". > > Since I'm using the 1.65.1 stylesheets but the DTD is only > DocBook 4.2, I could achieve this by adding this attribute to > every <xref> element: > > <xref role='select: title pageabbrev'/> > > However, I'd prefer to have this style of page number reference > be the default in my customization layer, so I don't have to add > this attribute in a zillion places. > > I spent some time grepping around the stylesheets, but I couldn't > figure out where the templates connect with the gentext templates > for "pageabbrev". > > Any suggestions? > > Best regards, > John Shipman (john@nmt.edu), Applications Specialist, NM Tech Computer Center, > Speare 128, Socorro, NM 87801, (505) 835-5950, http://www.nmt.edu/~john > ``Let's go outside and commiserate with nature.'' --Dave Farber > > > To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/. > > >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]