Hi all, I'm typesetting a double-sided document. And I want the chapter numbers to be in the right margin, while the chapter titles remain in the main text area. So I write \def\MyChapter#1#2 {\inright{#1} #2} \setuphead [chapter] [command=\MyChapter] But it renders such that all the chapter numbers disappear while chapter titles seem normal. Any idea? Corsair Sun -- There is no emotion; there is peace. There is no ignorance; there is knowledge. There is no passion; there is serenity. There is no death; there is the Force.
On Mon, May 11, 2009 at 8:06 PM, Corsair
Hi all,
I'm typesetting a double-sided document. And I want the chapter numbers to be in the right margin, while the chapter titles remain in the main text area. So I write
\def\MyChapter#1#2 {\inright{#1} #2}
\setuphead [chapter] [command=\MyChapter]
But it renders such that all the chapter numbers disappear while chapter titles seem normal. Any idea?
I extract the following fragment from my document and I wish it can help you :) \def\PlaceChapter#1#2{% \vbox{% \inoutermargin{% \hbox to .6\rightmarginwidth{% \hfil\switchtobodyfont[32pt,myfont,rm]{#1}\hss}% }\tfc #2% }% } \setuphead [chapter] [command=\PlaceChapter,header=empty,footer=empty] \starttext \chapter{Test} This is only a test! \stoptext -- Best wishes, Li Yanrui
Am 11.05.2009 um 14:59 schrieb Yanrui Li:
On Mon, May 11, 2009 at 8:06 PM, Corsair
wrote: Hi all,
I'm typesetting a double-sided document. And I want the chapter numbers to be in the right margin, while the chapter titles remain in the main text area. So I write
\def\MyChapter#1#2 {\inright{#1} #2}
\setuphead [chapter] [command=\MyChapter]
But it renders such that all the chapter numbers disappear while chapter titles seem normal. Any idea?
I extract the following fragment from my document and I wish it can help you :)
\def\PlaceChapter#1#2{% \vbox{% \inoutermargin{% \hbox to .6\rightmarginwidth{% \hfil\switchtobodyfont[32pt,myfont,rm]{#1}\hss}% }\tfc #2% }% } \setuphead [chapter] [command=\PlaceChapter,header=empty,footer=empty]
As alternative: \define[2]\PlaceChapter {\hbox{\vtop{#2}\rlap{\hskip\rightmargindistance#1}}} \definefont[ChapterNumber][Serif at 32pt] \setuphead [chapter] [command=\PlaceChapter,numberstyle=ChapterNumber,textstyle= \tfc,header=empty,footer=empty] Wolfgang
On Mon, May 11, 2009 at 9:09 PM, Wolfgang Schuster
Am 11.05.2009 um 14:59 schrieb Yanrui Li:
On Mon, May 11, 2009 at 8:06 PM, Corsair
wrote: Hi all,
I'm typesetting a double-sided document. And I want the chapter numbers to be in the right margin, while the chapter titles remain in the main text area. So I write
\def\MyChapter#1#2 {\inright{#1} #2}
\setuphead [chapter] [command=\MyChapter]
But it renders such that all the chapter numbers disappear while chapter titles seem normal. Any idea?
I extract the following fragment from my document and I wish it can help you :)
\def\PlaceChapter#1#2{% \vbox{% \inoutermargin{% \hbox to .6\rightmarginwidth{% \hfil\switchtobodyfont[32pt,myfont,rm]{#1}\hss}% }\tfc #2% }% } \setuphead [chapter] [command=\PlaceChapter,header=empty,footer=empty]
As alternative:
\define[2]\PlaceChapter {\hbox{\vtop{#2}\rlap{\hskip\rightmargindistance#1}}}
\definefont[ChapterNumber][Serif at 32pt]
\setuphead [chapter] [command=\PlaceChapter,numberstyle=ChapterNumber,textstyle=\tfc,header=empty,footer=empty]
Your code looks like more ConTeXt than mine and I'll benefit a lot from it. -- Best wishes, Li Yanrui
On Mon, May 11, 2009 at 03:09:34PM +0200, Wolfgang Schuster wrote:
Am 11.05.2009 um 14:59 schrieb Yanrui Li:
I extract the following fragment from my document and I wish it can help you :)
\def\PlaceChapter#1#2{% \vbox{% \inoutermargin{% \hbox to .6\rightmarginwidth{% \hfil\switchtobodyfont[32pt,myfont,rm]{#1}\hss}% }\tfc #2% }% } \setuphead [chapter] [command=\PlaceChapter,header=empty,footer=empty]
As alternative:
\define[2]\PlaceChapter {\hbox{\vtop{#2}\rlap{\hskip\rightmargindistance#1}}}
\definefont[ChapterNumber][Serif at 32pt]
\setuphead [chapter] [command=\PlaceChapter,numberstyle=ChapterNumber,textstyle= \tfc,header=empty,footer=empty]
Yanrui and Wolfgang, Your codes works like charms :-D Thank you! -- There is no emotion; there is peace. There is no ignorance; there is knowledge. There is no passion; there is serenity. There is no death; there is the Force.
participants (3)
-
Corsair
-
Wolfgang Schuster
-
Yanrui Li