map/topicref and
topic/navtitle class attributes.topic/title class
attribute.By default, titles are rendered on a single line (with both the chapter/section number and title text). If the title is too long, the text wraps to the next line without any indentation.
4.5.5 This is a long title
text that wraps.
If you want each line of the title to start at the same location (and
indented), you need to set the value of the args.css.param.title.layout
transformation parameter to table. This means that the chapter/section number is placed
in one cell and title text is placed in another cell (resulting and indented text):
4.5.5 This is a long title
text that wraps.
In shallow numbering (default), to replace the "Chapter N." prefix, use the following rules in your customization CSS:
*[class ~= "map/topicref"][is-chapter]:not([is-part]) > *[class ~= "map/topicmeta"] > *[class ~= "topic/navtitle"]:before{
content: "Module " counter(toc-chapter, decimal-leading-zero) " - ";
}
*[class ~= "topic/topic"][is-chapter]:not([is-part]) > *[class ~= "topic/title"]:before {
content: "Module " counter(chapter, decimal-leading-zero) "\A";
}
In deep numbering, to replace the "N." prefix, use the following rules in your customization CSS:
*[class ~= "map/map"][numbering ^= 'deep'] *[class ~= "topic/topic"][is-chapter]:not([is-part]) > *[class ~= "topic/title"]:before,
*[class ~= "map/map"][numbering ^= 'deep'] *[class ~= "topic/topic"][is-chapter]:not([is-part]) *[class ~= "topic/topic"] > *[class ~= "topic/title"]:before {
content: counters(chapter-and-sections, ".") "\A";
}
In shallow numbering (default), to hide the "Part N" and "Chapter NN" prefixes, use the following rules in your customization CSS:
*[class ~= "map/topicref"] > *[class ~= "map/topicmeta"] > *[class ~= "topic/navtitle"]:before {
display: none !important;
}
*[class ~= "topic/topic"] > *[class ~= "topic/title"]:before {
display: none !important;
}
You can also choose to remove only the "Part N" prefix:
*[class ~= "map/topicref"][is-part] > *[class ~= "map/topicmeta"] > *[class ~= "topic/navtitle"]:before {
display: none !important;
}
*[class ~= "topic/topic"][is-part] > *[class ~= "topic/title"]:before {
display: none !important;
}
Or to remove only the "Chapter NN" prefix:
*[class ~= "map/topicref"][is-chapter]:not([is-part]) > *[class ~= "map/topicmeta"] > *[class ~= "topic/navtitle"]:before {
display: none !important;
}
*[class ~= "topic/topic"][is-chapter]:not([is-part]) > *[class ~= "topic/title"]:before {
display: none !important;
}
In deep numbering, to hide the "Part N" and "Chapter NN" prefixes, use the following rules in your customization CSS:
*[class ~= "map/map"][numbering ^= 'deep'] *[class ~= "map/topicref"] > *[class ~= "map/topicmeta"]:before {
display: none !important;
}
*[class ~= "topic/topic"] > *[class ~= "topic/title"]:before {
display: none !important;
}
@page chapter-title-page {
background-image: url("resources/title-bg.png");
background-repeat: no-repeat;
background-size: 100% 100%;
background-position: center;
}After that, you need to replace the default "chapter" page definition with the
one created
before:*[class ~= "topic/topic"][is-chapter] {
page: chapter-title-page;
}Then, you need to set it back on the content following the
title:*[class ~= "topic/topic"][is-chapter] > *[class ~= "topic/title"] ~ *:not([class ~= "topic/title"]) {
page: chapter;
}Finally, you can customize the title color, size, and
more:*[class ~= "topic/topic"][is-chapter]:not([is-part]) > *[class ~= "topic/title"] {
color: white;
font-size: 32pt;
}