xref in Content to Bookmap TOC
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 53
- Joined: Sat May 22, 2021 6:04 pm
xref in Content to Bookmap TOC
Post by patjporter »
Hello,
I am trying to place an xref inside each topic in my bookmap that will take me back to the Table of Contents. Unfortunately the TOC is a generated file, and there does not seem to be an href that I can construct like I normally would. Is there a way to put some kind of cross reference in each topics source XML to link back to the TOC?
Pat
I am trying to place an xref inside each topic in my bookmap that will take me back to the Table of Contents. Unfortunately the TOC is a generated file, and there does not seem to be an href that I can construct like I normally would. Is there a way to put some kind of cross reference in each topics source XML to link back to the TOC?
image.png
Thanks!Pat
You do not have the required permissions to view the files attached to this post.
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: xref in Content to Bookmap TOC
Post by alex_jitianu »
Hello,
In PDF you have a bookmarks panel and in WebHelp you have links on top of the pages. Why do you need an additional link to the toc in the topic?
Best regards,
Alex
In PDF you have a bookmarks panel and in WebHelp you have links on top of the pages. Why do you need an additional link to the toc in the topic?
Best regards,
Alex
-
- Posts: 53
- Joined: Sat May 22, 2021 6:04 pm
Re: xref in Content to Bookmap TOC
Post by patjporter »
Hi Alex,
Good question...we want to use this document on an iPad in an airplane, and it is easier to click a link on the page that you are on rather than select the bookmarks tab.
Is there a way to do this?
Thanks!
Pat
Good question...we want to use this document on an iPad in an airplane, and it is easier to click a link on the page that you are on rather than select the bookmarks tab.
Is there a way to do this?
Thanks!
Pat
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: xref in Content to Bookmap TOC
Post by julien_lacour »
Hi Pat,
This is possible in the DITA Map PDF - based on HTML5 & CSS transformation scenario by doing the following steps:
Regards,
Julien
This is possible in the DITA Map PDF - based on HTML5 & CSS transformation scenario by doing the following steps:
- Create an XSLT stylesheet with the following template:
Code: Select all
<xsl:template match="*[contains(@class, 'toc/title')]" mode="div-it"> <div> <xsl:attribute name="class" select="'- toc/anchor anchor'"/> <xsl:attribute name="id" select="'toc-anchor'"/> </div> <xsl:next-match/> </xsl:template>
- Create a CSS stylesheet with the following template:
Code: Select all
@page chapter:first:left:right { @top-right { content: "Back to top"; -oxy-link: "#toc-anchor"; color: #337ab7; } } @page chapter:left:right { @top-right { content: "Back to top"; -oxy-link: "#toc-anchor"; color: #337ab7; } }
- Create a publishing template descriptor file (.opt) with the following elements:
Code: Select all
<resources> <css file="custom.css"/> </resources> ... <xslt> <extension file="m2h-link-to-toc.xsl" id="com.oxygenxml.pdf.css.xsl.merged2html5"/> </xslt>
Regards,
Julien
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service