I have some problem to understand how to create cross-references. I have read the documentation but I can't yet make it work. Here is the situation.
Table of Content
I have several chapers like
in print.php. So I have generated by JavaScript a table of content like this
which looks like
I used the following instruction in print.css
but when I run Prince I get
Cross references
I have several cross references in my code like
which looks like
I used the following instruction in print.css
but when I run Prince I get
Any idea why?
Just consider that
works fine, that is, I get at the bottom of pages strings like:
So the page counter works.
Table of Content
I have several chapers like
...
<h3 id="chap_2_6_3" class="chapter">I am a chapter</h3>
...
in print.php. So I have generated by JavaScript a table of content like this
<ul id="toc">
...
<li>2.6.3. <a href="print.php#chap_2_6_3">I am a chapter</a></li>
...
</ul>
which looks like
...
2.6.3. I am a chapter
...
I used the following instruction in print.css
ul#toc a[href]:after{
content: leader('.') target-counter(attr(href), page);
}
but when I run Prince I get
...
2.6.3. I am a chapter0
...
Cross references
I have several cross references in my code like
... blah blah blah <a href="print.php#janejoe">Jane Joe</a> blah blah blah...
which looks like
... blah blah blah Jane Joe blah blah blah...
I used the following instruction in print.css
a[href]::after {
content: " [pag. " target-counter(attr(href), page) "]"
}
but when I run Prince I get
... blah blah blah Jane Joe [pag.0] blah blah blah...
Any idea why?
Just consider that
@bottom-center {
content: "Page " counter(page) " of " counter(pages);
vertical-align: top;
padding-top: 1rem;
}
works fine, that is, I get at the bottom of pages strings like:
Page 9 of 159
So the page counter works.
Edited by dejudicibus