I'm trying to parse some wikipedia articles into a pdf.
The wiki generated TOC is just great, and i'd like to use this:
#toc a[href]::after {
content: leader('.') target-counter(attr(href), page);
font-style: normal;
}
To display the page numbers. Problem is it doesn't work. It evaluates target-counter(attr(href), page) to 1 for whatever link it is.
I did some testing and found out prince does just fine if the href="#xyz" is paired with an id="xyz" but it fails when name="xyz" which is how wikipedia is built.
I don't know if it's a bug, a known limit or maybe a feature. In either case some ideas on how to achive my goal would be greatly appreciated
Maybe a hack for prince? or some way cool css'ing?
The wiki generated TOC is just great, and i'd like to use this:
#toc a[href]::after {
content: leader('.') target-counter(attr(href), page);
font-style: normal;
}
To display the page numbers. Problem is it doesn't work. It evaluates target-counter(attr(href), page) to 1 for whatever link it is.
I did some testing and found out prince does just fine if the href="#xyz" is paired with an id="xyz" but it fails when name="xyz" which is how wikipedia is built.
I don't know if it's a bug, a known limit or maybe a feature. In either case some ideas on how to achive my goal would be greatly appreciated
Maybe a hack for prince? or some way cool css'ing?