I'm using a custom typescript (after help in this question) which includes (among other things) two additional weights, medium and semibold, and their size modifiers (like \tfa, \tfb and so on). Because of custom weights, I've created custom macros for semibold italics, medium italics and so on (\sbi and \mdi, among others), as \em doesn't alternate regular/italics in custom weights.
I use then semibold in heads with size modifiers (globally configured), and those heads are independently styled in TOC (with regular weight), which works as expected. But when I use my custom macro \sbi in a particular head, it's typeset in body size, not in head size (say, like \sbic). And in TOC it gets semibold italics, not regular italics. Even worse, If I use semibold italics with size modifier in that particular head (say, \sbic), it gets that same size in TOC.
Question: is there any way of totally independently style heads in document and in TOC? Two possibilities would work:
- in TOC, completely remove any particular style/weight of heads (acceptable)
- correctly alternate between regular and italics, both in document and in TOC, according to surrounding weight (in my case, semibold in text and regular in TOC)
My typescript (excerpt):
\definebodyfont [default] [rm]
[tf=Serif sa 1,
bf=SerifBold sa 1,
it=SerifItalic sa 1,
% ...
mdf=SerifMedium sa 1,
mif=SerifMediumItalic sa 1,
msf=SerifMediumSlanted sa 1,
% ...
sbf=SerifSemibold sa 1,
sbi=SerifSemiboldItalic sa 1,
sbs=SerifSemiboldSlanted sa 1,
% ...
sbfb=SerifSemibold sa 1.440,
sbfc=SerifSemibold sa 1.728,
% ...
sbib=SerifSemiboldItalic sa 1.440,
sbic=SerifSemiboldItalic sa 1.728,
% ...
]
And my document (excerpt):
\setupbodyfont[garamond-premier, 12pt] % my typescript
\setuphead[chapter] [style={\sbfc}] % heads in document: semibold
\setuphead[section] [style={\sbfb}]
\setupcombinedlist[content][list={chapter, section}]
\setuplist[chapter] [style={\tf}] % heads in TOC: regular
\setuplist[section] [style={\tf}]
\starttext
\completecontent
\chapter[title={A chapter with {\sbic italics}}]
A text
\section[title={A section with {\sbib italics}}]
Another text
\stoptext
Result (TOC and document, excerpt. Note incorrect weight and size in italics in TOC):


