[NTG-context] Chapter heading with rules
jbf
roma83537 at gmail.com
Fri Aug 21 03:53:25 CEST 2020
Have achieved a Chapter title with rules either side (see below - not an
original invention!) but I want the chapter number to be part of 'My
Chapter Title'; instead, the following MWE means it comes before the
ChapterLeftRule. I know I can do it by actually putting the number
before My Chapter title (e.g. 1 My Chapter Title), since the proper
numbered version still appears in the TOC, but my preference would be to
include a command in the \setuphead, if possible (so long as it still
allows the numbered chapter to appear in the TOC of course). Possible?
\definefiller
[ChapterRule]
[alternative=rule,
color=gray,
height=0.8ex,
depth=-0.6ex]
\definefiller
[ChapterLeftRule]
[ChapterRule]
[left=\zerowidthnobreakspace,
right=\quad]
\definefiller
[ChapterRightRule]
[ChapterRule]
[left=\quad,
right=\zerowidthnobreakspace]
\setuphead
[chapter]
[%align=middle,
textstyle={\setcharactercasing[WORD]\ssa},
textcommand=\groupedcommand{\filler[ChapterLeftRule]}{\filler[ChapterRightRule]}]
\starttext
\chapter{My Chapter Title}
\stoptext
Julian
More information about the ntg-context
mailing list