I want to write the chapter title or section subject in the margin of each page.
I eventually managed to get some working code :
\setuplayout[edge=3cm,margin=3cm,backspace=7cm,height=27cm]
\setuptexttexts[edge][subject][subject]
\setuptext[edge][style=\rmd\sc]
\starttext
\rotate[rotate=270]{\subject{\rotate[rotation=90]{Some title}}}
\stoptext
I can play with the edge, margin and backspace width to adjust the position of the text with regard to the edge of the page and of the main text, but aren't there other/better options to fine-tune the position of the text within the margin or the edge ? I tried \setuptext[edge][after={\blank[2cm]}]
without success.
But most of all, how can I make the title vertical in the edge/margin without having to define the title as rotated ? I.e., how do I define the rotation inside \setuptext
and thus avoid the ugly double rotation (which has unwanted effect I did't try to solve when using the \section
numbered version of \subject
— the section number rotation is off by 90° ; it has also side effects when setting an image as the background of the title page) ?
Desired output
The title has a page of its own (where it's printed horizontally like normal text). On the other pages it should be written vertically on the side (like a header). E.g. for a left page :
(source: toile-libre.org)
On the right page the title should be oriented the opposite way (the top of the title always facing the nearest page border).
For future reference
It may be worth mentioning that \setuptexttexts
and \setuptext
are part of a series of commands :
\setuptoptexts
and\setuptop
;\setupheadertexts
and\setupheader
;\setuptexttexts
and\setuptext
;\setupfootertexts
and\setupheader
;\setupbottomtexts
and\setupbottom
.
See section 4.16 (Headers and footers) of the ConTeXt reference manual (svnversion 329, September 27, 2013) for further reading.
Update
I thought I had found the solution, \setuphead
having a textcommand
argument. However the following does not seem to have any effect :
\def\RotateTitle#1{\rotate[rotation=90]{#1}}
\setuptext[edge][style=\rmd\sc,color=white,textcommand={\RotateTitle}]
(neither do command
or deeptextcommand
arguments).