Changes

Jump to navigation Jump to search
1,337 bytes added ,  13:24, 5 October 2008
\stoptext
</context>
 
===Titles in margin===
 
It is sometimes wanted to place the title of a section/subject etc in the margin next to the section text (instead of above it).
This is achieved by the following setup:
 
<texcode>
\setuphead
[subject]
[alternative=text,distance=0pt,command=\MyHead]
 
\def\MyHead#1#2{\inmargin{#1 #2}}
</texcode>
 
This (with 'style=\sc' added in setuphead) gives:
 
<context>
\setuphead
[subject]
[alternative=text,distance=0pt,command=\MyHead,style=\sc]
 
\def\MyHead#1#2{\inmargin{#1 #2}}
 
\starttext
 
\subject{First Subject}
This is the text in the first subject. This is the text in the first subject.
This is the text in the first subject. This is the text in the first subject.
This is the text in the first subject. This is the text in the first subject.
This is the text in the first subject. This is the text in the first subject.
 
\subject{Second Subject}
This is the text in the second subject. This is the text in the second subject.
This is the text in the second subject. This is the text in the second subject.
This is the text in the second subject. This is the text in the second subject.
This is the text in the second subject. This is the text in the second subject.
 
\stoptext
</context>
 
See the mailing list thread [[http://www.ntg.nl/pipermail/ntg-context/2003/002053.html]] for more on this.
Anonymous user

Navigation menu