* Chapter number in right margin?
@ 2009-05-11 12:06 Corsair
[not found] ` <c3f901470905110559x2eea4353o4ee01f9679ed665f@mail.gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Corsair @ 2009-05-11 12:06 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 590 bytes --]
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.
[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 487 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Chapter number in right margin?
[not found] ` <c3f901470905110559x2eea4353o4ee01f9679ed665f@mail.gmail.com>
@ 2009-05-11 13:09 ` Wolfgang Schuster
2009-05-11 13:30 ` Yanrui Li
2009-05-11 13:54 ` Corsair
0 siblings, 2 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2009-05-11 13:09 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 11.05.2009 um 14:59 schrieb Yanrui Li:
> On Mon, May 11, 2009 at 8:06 PM, Corsair <chris.corsair@gmail.com>
> 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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Chapter number in right margin?
2009-05-11 13:09 ` Wolfgang Schuster
@ 2009-05-11 13:30 ` Yanrui Li
2009-05-11 13:54 ` Corsair
1 sibling, 0 replies; 4+ messages in thread
From: Yanrui Li @ 2009-05-11 13:30 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Mon, May 11, 2009 at 9:09 PM, Wolfgang Schuster
<schuster.wolfgang@googlemail.com> wrote:
>
> Am 11.05.2009 um 14:59 schrieb Yanrui Li:
>
>> On Mon, May 11, 2009 at 8:06 PM, Corsair <chris.corsair@gmail.com> 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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Chapter number in right margin?
2009-05-11 13:09 ` Wolfgang Schuster
2009-05-11 13:30 ` Yanrui Li
@ 2009-05-11 13:54 ` Corsair
1 sibling, 0 replies; 4+ messages in thread
From: Corsair @ 2009-05-11 13:54 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 1051 bytes --]
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.
[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 487 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-05-11 13:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-11 12:06 Chapter number in right margin? Corsair
[not found] ` <c3f901470905110559x2eea4353o4ee01f9679ed665f@mail.gmail.com>
2009-05-11 13:09 ` Wolfgang Schuster
2009-05-11 13:30 ` Yanrui Li
2009-05-11 13:54 ` Corsair
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).