Home › Forums › DITA and XMetaL Discussion › TOPLEAF: Chapter/Appendix Titles into Headers? › Reply To: TOPLEAF: Chapter/Appendix Titles into Headers?
Reply to: TOPLEAF: Chapter/Appendix Titles into Headers?
September 20, 2011 at 5:55 amThere are a couple of issues with your headers that need to be cleared up. Consider the following content (of your righthead header):
Firstly, the
Secondly, you can rely on the Font tab of your header to set the default font for the header. so you only need mark areas where a different font effect is needed (eg. the page number).
Thirdly, while an explicit
- — wide character (M) space
- — half character (N) space
-   — number width space space (useful for left padding numbers to preserve alignment)
- — thin space (about the width of a capital I)
-   — hair space (used for minute gaps, such as between text and surrounding quotation marks)
Note that while TopLeaf supports the named forms, you can also use the Unicode equivalents. For example = .
Combining all the above techniques, we can simplify the header content to:
{DITA-mainbooktitle}
where is just a custom marker to trigger bold font.
Of course none of this actually answers your original question! To create a variable for use in a header, [u]scan[/u] the content of a mapping and then in the Pre-content use something like:
If you use the same variable to hold (a copy of) the content of all the relevant elements, then you can set up a single header that will deal with all section types.
Note however that if the value used in the header can change within a page (eg. a subsection title) then you need to be a bit more cunning, but that's another story.