OxygenPDF: publishing endnotes

Post here questions and problems related to editing and publishing DITA content.
pieterjan_vdw
Posts: 36
Joined: Wed Jun 20, 2018 11:30 am

OxygenPDF: publishing endnotes

Post by pieterjan_vdw »

Hello,

I have a huge bibliography list stored in a reusable topic.
For various publications I need link to bibiliography items, but I only want to see the referenced bibliography items (from my huge list) in my final PDF, not the complete bibliography.
What would be the easiest way to achieve this?

I wanted to use two types of footnotes:
  • regular footnotes
  • endnotes (fn with dedicated outputclass: used for bibliograpy
Is it possible to get these endnotes at the end of the document (with different counter-increment) as regular endnotes with OxygenPDF-CSS?
Are there other methods to get this done (semi-automatically)?

Thanks a lot in advance.
Kind regards,
Dan
Posts: 500
Joined: Mon Feb 03, 2003 10:56 am

Re: OxygenPDF: publishing endnotes

Post by Dan »

A solution to a similar problem was explained by Ozana here: post54275.html
The idea is to define an <ol> element for the entire bibliography, with an <li> for each of the items, in a bibliography topic.
This topic can be linked in the map by a key definition:

Code: Select all

<map>
        <title>Publication Title</title>
	<keydef keys="bibliography" href="bibliography.dita"/>
	... Other topic references, the bibliography at  the end....
	<topicref keyref="bibliography"/>
</map>
The bibliography topic content:

Code: Select all

<topic id="bibliography">
    <title>Bibliography</title>
    <body>
                   	<ol id="ol_cbt_lz2_ytb">
				
				<li id="z1">Title of the book 1</li>
				<li id="z2">Title of the book 2</li>
				<li id="z3">Title of the book 3</li>
			</ol>
		
    </body>
</topic>
[code]

To generate IDs for the list items, make sure you use the menu DITA/ID Options, add topic/li to the list of classes that identify elements that have IDs automatically generated, then us DITA/Generate IDs action. Or you can add them manually. 

To refer an endnote, you should use <xref keyref="bibliography/z1"/> from the topics. The expanded link will contain the number of the item, plus the page it appears on, like "1 (on page 123)", where 123 is the page of the bibliography topic. If you want to customize this further, you can set an outputclass attrbibute on the xref, then alter it from the CSS:
[code]
<xref keyref="bibliography/z1" outputclass="endnote"/>

Code: Select all

*[outputclass ~= "endnote"]:before {
  content: "[" !important;
  font-style:normal !important;
}
*[outputclass ~= "endnote"]:after {
  content: "]" !important;
  font-style:normal !important;
}
Many regards,
Dan
Post Reply