Changes

Jump to navigation Jump to search
example
<cd:commandgroup name="somenamedheadnumber" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
<cd:shortdesc><!-- a short command summary goes here -->
Use <tt>\somenamedheadnumber</tt> to access a section number(expandable).
</cd:shortdesc>
<cd:variants>
<cd:description><!-- the long description of the command goes here -->
</cd:description>
<cd:examples><cd:example title="chapter color"><context source="yes">\usemodule[visual] \startsetups[MyChapterSetup]\definecolor[MyChapterColor][h={\the\numexpr 360*\somenamedheadnumber{chapter}{current}/\somenamedheadnumber{chapter}{last}\relax},s=1,v=.75]\definecolor[fakerulecolor][MyChapterColor] % for \fakewords\setuphead[chapter][color=MyChapterColor]\stopsetups \unexpanded\def\MyChapter#1{ \setup{MyChapterSetup} \color[MyChapterColor]{#1}} \setuphead[chapter][page=no,textcommand=\MyChapter] \starttext \dorecurse{5}{\chapter{\fakewords{1}{5}}\fakewords{10}{20}} \stoptext</context></cd:example></cd:examples>
<cd:notes></cd:notes>
<cd:seealso>
<cd:source file="strc-sec.mkiv" originator="system"></cd:source>
<cd:wikipage originator="system" page="Category:Structure"></cd:wikipage>
<cd:commandref name="someheadnumber">(not expandable)</cd:commandref></cd:seealso>
</cd:commandgroup>

Navigation menu