Adding page numbers to links in DITA PDFs generated with CSS?
Adding page numbers to links in DITA PDFs generated with CSS?
If I want to created a printed book from a large DITA map with many links, is there a way to automatically add a page number behind every link so that readers can still follow the links? For example, if the links happen to be capitalized, instead of "see LINK", I want the output to read "see LINK (p. 212)". Is there a best practice to accomplish this?
Re: Adding page numbers to links in DITA PDFs generated with CSS?
When applying the DITA Map to PDF (WYSIWIG or HTML5 based) transformation scenario, (having Chemistry as CSS processor ) you should automatically get links with a "(on page NN)" text following them.
Are the links working (i.e. are clickable and navigate correctly)?
What oXygen version are you using?
For your information, the builtin CSS rules are the following:
You can use them in the customization CSS.
Many regards,
Dan
Are the links working (i.e. are clickable and navigate correctly)?
What oXygen version are you using?
For your information, the builtin CSS rules are the following:
Code: Select all
*[class ~= "topic/xref"][href]:after,
*[class ~= "topic/link"][href]:after {
content: " (page " target-counter(attr(href), page) ")";
}
Many regards,
Dan
Re: Adding page numbers to links in DITA PDFs generated with CSS?
Dan, thank you for the CSS code. That is very helpful to modify the results.