Page 1 of 1

Generating Thumb Index (dropping folio) - Link to Chapters

Posted: Fri Mar 19, 2021 4:34 pm
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.

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

Posted: Tue Mar 23, 2021 4:19 pm
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