$pagetoc-dynamic

$pagetoc-dynamic — Make the on-page ToC dynamic?

Parameter:
{}pagetoc-dynamic
Defined in:
param.xsl
Used in:
main.xsl, param.xsl

Synopsis

  |$pagetoc-dynamic := 'true'

Description

If this value is true, and the on-page ToC is displayed, then it will be updated dynamically to reflect the readers position. This has two consequences. First, the section titles that are currently in view will be highlighted. The default highlighting is to make them a little darker and place a bullet next to them. The highlighting can be changed with CSS. Second, a clickable symbol is added in the upper left corner. This lets the reader toggle between dynamic, non-dynamic, and hidden views.

If the on-page ToC is not dynamic, then no highlighting is performed.

The clickable symbols can be changed as well, but it requires adding a bit more JavaScript to the page. Ensure that your code runs first and set the following properties:

1 |window.DocBook = {};
  |window.DocBook.pagetoc = {};
  |window.DocBook.pagetoc.decorated = "ON";
  |window.DocBook.pagetoc.plain = "OFF";
5 |window.DocBook.pagetoc.hidden = "HIDDEN";

The values can be strings or markup, such as an img element.