The cause of the [?] formatting for page numbers appears to be a bug in FOP - it only happens when the output (which consists of something like "Chapter 3: "blah blah" [82]" falls across 2 lines so that the [82] starts a new line. If you add some characters in front of this like xxxxxxxxxxxxx to change the line split so it doesn't fall there, then the page number formats OK.

A workaround that also seemed to work (at least in this one case) is to change the source markup from:

<olink targetdoc="&uima_docs_tutorial_guides;" targetptr="ugr.tug.application"/>
to
<olink targetdoc="&uima_docs_tutorial_guides;" targetptr="ugr.tug.application" xrefstyle="select: label quotedtitle"/>

(see using "select:" on this page: http://www.sagehill.net/docbookxsl/CustomXrefs.html#Xrefstyle )

Adam also found issues where some character overlaying was happening with page numbers - haven't figured out any workarounds for that...

-Marshall

Marshall Schor wrote:
Some progress. This error seems to have nothing to do with whether or not the link is a plain one or an olink. Some olink ones work fine. Others fail. I've tried upgrading the Docbook system to the current level 1.71.1/4.5 - but nothing changed with respect to this error.
I've posted a query on the docbook mailing list.

-Marshall

Marshall Schor wrote:
Adam Lally wrote:
Docbook question, probably for Marshall...

I know that xrefs are for linking within the same file and the olinks
are for linking between books. But what about linking to another file
in the *same* book.

I ask because I noticed that the Annotator & AE Developer's Guide
chapter has an olink to the Application Developer's Guide chapter,
which is in a different file but part of the same book. In the PDF
this doesn't seem to be rendered correctly. Where xrefs have a page
number in square brackets after it, this olink gets rendered with a
[?] after it, as if it doesn't know the page number. olinks to other
books seem to work OK, however.

-Adam



This is supposed to work. The Docbook XSL guide says:


     Page references in olinks

There are two situations for generating page numbers for olinks: internal and external olinks. Internal olinks are used within a document when its text is divided among multiple separate file modules. As described in the section “Modular cross referencing” <http://www.sagehill.net/docbookxsl/modular-olinks.html>, olinks are used to form cross references between modules so that each module can be validated. The stylesheet recognizes when an olink is to a location within the same document when the /|current.docid|/ parameter is set and its value matches the |targetdoc| attribute in an olink. Such olinks will be treated as if they were internal |xref| links, and they will get a page reference if that feature is turned on for internal links.

So this is supposed to work. I'll take a look at why it is not...

-Marshall








Reply via email to