Generating Thumb Index (dropping folio) - Link to Chapters

Post here questions and problems related to editing and publishing DITA content.
Manohar_1024
Posts: 53
Joined: Wed Mar 27, 2019 10:12 am

Generating Thumb Index (dropping folio) - Link to Chapters

Post by Manohar_1024 »

Hi,

I have a requirement for generating Links for chapters on the right margin and Chapter Name as anchor text.
I don't want links on body but on right side of the margin.

I'm using DITA and want PDF output using css.
I'm using Oxygen XML Author version 22.1.

Thanks & Regards,
Ananth.
julien_lacour
Posts: 495
Joined: Wed Oct 16, 2019 3:47 pm

Re: Generating Thumb Index (dropping folio) - Link to Chapters

Post by julien_lacour »

Hello,
At the moment we do not support dynamic links inside page-margin boxes, but you can already add the chapter number by using the following CSS:

Code: Select all

*[class ~= "topic/topic"][is-chapter] {
  string-set: side-label 
                  oxy_label(text, oxy_xpath("1 + count(preceding::*[contains(@class,'topic/topic')][@is-chapter])"),
                            styles, "color:white;background-color:gray;"),
              side-top-padding
                  oxy_xpath("for $i in (1 to count(preceding::*[contains(@class,'topic/topic')][@is-chapter]) mod 10) return '\A'");
}

@page chapter:right {
  @right-top {
    content: string(side-top-padding) string(side-label);
    vertical-align: top;
    font-size:3em;
  }
}

@page chapter:left {
  @left-top {
    content: string(side-top-padding) string(side-label);
    vertical-align: top;
    font-size:3em;
  }
}
Regards,
Julien
Post Reply