How we can create a table of contents page dynamically in XSL-FO?
相关问题
- Why does const allow implicit conversion of refere
- Mathjax not rendering TEX formulas dynamically fro
- There was a mismatch between the processor archite
- dplyr summarise with dynamic columns
- C++ operator lookup misunderstanding
相关文章
- Angular Material Stepper causes mat-formfield to v
- Which is faster, pointer access or reference acces
- Generally, is dereference pointer expression resul
- Why are we allowed to take the address of an incom
- Can the “dynamic” type vary safely in a generic co
- Why the copy constructor is not called?
- Why can't I return a reference to a packed fie
- Array of polymorphic objects
What I've done in the past is use
<fo:page-number-citation>
for each entry in the TOC (Table of Contents). I do the table of contents as an<fo:table>
.The
<fo:page-number-citation>
has aref-id
attribute that should contain theid
of the location you're referencing. It should generate the PDF page number where thatid
is located.For example, if you wanted each
<chapter>
referenced in your TOC, you would use<fo:page-number-citation>
with aref-id
that matched theid
of where the<chapter>
was output (likefo:page-sequence
,fo:block
, etc.).Here's an example. I'm basing the
id
attribute on the value of an existing attribute, but you can generate an id if you need to.Example Chapter XML:
Example entry in the TOC table:
Example of outputting the
<chapter>
:You can also wrap the
fo:page-number-citation
in anfo:basic-link
to link the page number in the TOC to the actual page.