Custom formatting of XREF output
Posted: Thu Apr 03, 2025 11:57 am
I'm using Oxygen 27.1 to create PDF documentation in DITA. When I use an XREF, the PDF output will be something like "Topic title (on page X)".
Normally this is fine, but there are some cases where I would like to put XREFs in a table, and because of space restrictions I don't want the entire topic title and page number as a link. Instead I would like to only have the chapter number of the referenced topic as link text, so the links should look like "X.Y.Z".
Is there a way I could create an outputclass for these XREFs that will change the text used in the output? I've been successfull in creating an outputclass to change the formatting of the link, but not the text.
Normally this is fine, but there are some cases where I would like to put XREFs in a table, and because of space restrictions I don't want the entire topic title and page number as a link. Instead I would like to only have the chapter number of the referenced topic as link text, so the links should look like "X.Y.Z".
Is there a way I could create an outputclass for these XREFs that will change the text used in the output? I've been successfull in creating an outputclass to change the formatting of the link, but not the text.