Changes

Jump to navigation Jump to search
499 bytes added ,  13:42, 17 August 2010
→‎Figures in Headings: reflect current behaviour in MkII and MkIV
\chapter{One}
\section{First section of Chapter One}
\chapter{Two}
\stoptext
</context>
However, this There are a few snags though. MkII "forgets" to put the chapter in the TOC. So you have to setthe <tt>textcommanddeeptextcommand</tt> and <tt>numbercommanddeepnumbercommand</tt> separately instead(thus retaining the command that puts the chapter in the TOC), rather thansetting the overall <tt>command</tt>, if you need a complete TOC.
<texcode>
\setuphead
[chapter]
[textcommanddeeptextcommand=\MyChapterTextCommand, numbercommanddeepnumbercommand=\MyChapterNumberCommandgobbleoneargument\def\MyChapterNumberCommand#1{} % hide chapter number
\def\MyChapterTextCommand#1%
[http://archive.contextgarden.net/message/20050519.215526.df7c5cd1.html]
 
Users of MkIV can safely rely on <tt>command</tt> and don't have to
bother with the <tt>deep...command</tt> variants. However,
<tt>\currentheadnumber</tt> does not seem to return anything but 0.
Thus, the following code is required to define
<tt>\MyChapterCommand</tt> when using MkIV:
 
<texcode>
\def\MyChapterCommand#1#2%
{\externalfigure[chapter-\namedheadnumber{chapter}][height=5cm]}
</texcode>
 
[http://archive.contextgarden.net/message/20100817.102859.206d858e.en.html]
===Chapter head with absolute positioning of following text===
3

edits

Navigation menu