* chapter and section titles in margin of each page
@ 2011-03-31 17:17 C.
2011-03-31 21:17 ` Wolfgang Schuster
0 siblings, 1 reply; 3+ messages in thread
From: C. @ 2011-03-31 17:17 UTC (permalink / raw)
To: Context-Mailinglist
Hello,
this is nice:
http://wiki.contextgarden.net/Headers_and_Footers#Marginal_headings_and_cent
ered_headings
However, the text in the margin has not the same interlinespace as the main
text and that looks weird.
See http://i52.tinypic.com/91rc.png
The only solution I came up with is using \framed:
\startsetups[text a]
\framed[align=flushleft,
height=24\lineheight,
width=\rightmarginwidth,
frame=off
]
{\getmarking[section]}
\stopsetups
The drawback seems to be that with this, I can not use \raised , so I have
to enlarge the frame (It says "A box is expected here" when I try to raise
the frame).
Is there a better solution?
P.S: Bonus points: Align baselines of margin text and main text.
___________________________________________________________________________________
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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: chapter and section titles in margin of each page
2011-03-31 17:17 chapter and section titles in margin of each page C.
@ 2011-03-31 21:17 ` Wolfgang Schuster
2011-04-01 22:02 ` C.
0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2011-03-31 21:17 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 31.03.2011 um 19:17 schrieb C.:
> Hello,
>
> this is nice:
> http://wiki.contextgarden.net/Headers_and_Footers#Marginal_headings_and_cent
> ered_headings
> However, the text in the margin has not the same interlinespace as the main
> text and that looks weird.
> See http://i52.tinypic.com/91rc.png
> The only solution I came up with is using \framed:
>
> \startsetups[text a]
> \framed[align=flushleft,
> height=24\lineheight,
> width=\rightmarginwidth,
> frame=off
> ]
> {\getmarking[section]}
> \stopsetups
>
> The drawback seems to be that with this, I can not use \raised , so I have
> to enlarge the frame (It says "A box is expected here" when I try to raise
> the frame).
>
> Is there a better solution?
\setuplayout[grid=yes]
\setuppagenumbering[alternative=doublesided]
\setuptexttexts[margin][][\setups{text a}][\setups{text b}][]
\startsetups[text a]
\framed
[frame=off,
offset=0pt,
width=broad,
height=\vsize,
align={high,flushleft},
top={\blank[12*line]}]
{\getmarking[chapter]}
\stopsetups
\startsetups[text b]
\framed
[frame=off,
offset=0pt,
width=broad,
height=\vsize,
align={high,flushright},
top={\blank[12*line]}]
{\getmarking[section]}
\stopsetups
\showframe\showgrid
\starttext
\chapter{Chapter Knuth Testing}
\section{Section Knuth Testing}
\dorecurse{20}{\input knuth\par}
\stoptext
> P.S: Bonus points: Align baselines of margin text and main text.
Does only work when you enable grid typesetting.
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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: chapter and section titles in margin of each page
2011-03-31 21:17 ` Wolfgang Schuster
@ 2011-04-01 22:02 ` C.
0 siblings, 0 replies; 3+ messages in thread
From: C. @ 2011-04-01 22:02 UTC (permalink / raw)
To: 'mailing list for ConTeXt users'
That seems to Work.
Grid alignment does also work, as long as the whitespace before and after
section/chapter heads is a multiple of lineheight.
Thank you.
> -----Ursprüngliche Nachricht-----
> Von: Wolfgang Schuster [mailto:schuster.wolfgang@googlemail.com]
> Gesendet: Donnerstag, 31. März 2011 23:17
> An: mailing list for ConTeXt users
> Betreff: Re: [NTG-context] chapter and section titles in margin of each
page
>
>
> Am 31.03.2011 um 19:17 schrieb C.:
>
> > Hello,
> >
> > this is nice:
> >
> http://wiki.contextgarden.net/Headers_and_Footers#Marginal_headings_a
> n
> > d_cent
> > ered_headings
> > However, the text in the margin has not the same interlinespace as the
> > main text and that looks weird.
> > See http://i52.tinypic.com/91rc.png
> > The only solution I came up with is using \framed:
> >
> > \startsetups[text a]
> > \framed[align=flushleft,
> > height=24\lineheight,
> > width=\rightmarginwidth,
> > frame=off
> > ]
> > {\getmarking[section]}
> > \stopsetups
> >
> > The drawback seems to be that with this, I can not use \raised , so I
> > have to enlarge the frame (It says "A box is expected here" when I
> > try to raise the frame).
> >
> > Is there a better solution?
>
> \setuplayout[grid=yes]
>
> \setuppagenumbering[alternative=doublesided]
>
> \setuptexttexts[margin][][\setups{text a}][\setups{text b}][]
>
> \startsetups[text a]
> \framed
> [frame=off,
> offset=0pt,
> width=broad,
> height=\vsize,
> align={high,flushleft},
> top={\blank[12*line]}]
> {\getmarking[chapter]}
> \stopsetups
>
> \startsetups[text b]
> \framed
> [frame=off,
> offset=0pt,
> width=broad,
> height=\vsize,
> align={high,flushright},
> top={\blank[12*line]}]
> {\getmarking[section]}
> \stopsetups
>
> \showframe\showgrid
>
> \starttext
>
> \chapter{Chapter Knuth Testing}
>
> \section{Section Knuth Testing}
>
> \dorecurse{20}{\input knuth\par}
>
> \stoptext
>
> > P.S: Bonus points: Align baselines of margin text and main text.
>
> Does only work when you enable grid typesetting.
>
> 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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-04-01 22:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-31 17:17 chapter and section titles in margin of each page C.
2011-03-31 21:17 ` Wolfgang Schuster
2011-04-01 22:02 ` C.
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).