Dear ConTeXt hackers, on a new project I'd like to use grid snapping. One section level should have grid=top to get some distance between the text preceding the section heading and the heading itself. This works fine. But when the section starts at a new page I don't want any extra line inserted at the top. Patrick excerpt: \setuphead [Abschnitt] [head=nomarking,style=\tfa, alternative=inmargin, distance=1em, grid=top, % <----- works fine but unwanted on page start. ]
At 15:51 13/05/2004, you wrote:
Dear ConTeXt hackers,
on a new project I'd like to use grid snapping. One section level should have grid=top to get some distance between the text preceding the section heading and the heading itself. This works fine. But when the section starts at a new page I don't want any extra line inserted at the top.
Patrick
excerpt:
\setuphead [Abschnitt] [head=nomarking,style=\tfa, alternative=inmargin, distance=1em, grid=top, % <----- works fine but unwanted on page start. ]
did you look at the options described in details.pdf? maybe grid=page will help; this top of page case is special indeed, since its there that becomes clear that grid snapping is meant for novels and other pure text applications (i.e. all fonts the same weight) another option is to set the topskip to strutheight (something \setupinterlinespace[top=.72]) Hans
Dear ConTeXt hackers,
did you look at the options described in details.pdf? maybe grid=page will help;
OK, yesterday I have played with my problem a bit and here is a testfile. I "need" grid=top for the extra distance between the previous paragraph and the sectionheading. So grid=page can only be an option if the section starts at the first line on a page. (Which indeed solves my problem; just saying \setuphead[somehead][grid=top] for the problematic section headings works fine, but this is ... well I guess I don't have to explain).
another option is to set the topskip to strutheight (something \setupinterlinespace[top=.72])
Hmm, no effect I can see. I don't remember why I used the \definesection stuff. -------------------------------------------------- \showgrid \definesection [foo] \setupsection [foo] [previousnumber=no] \definehead [somehead] [section=foo] \setuphead [somehead] [grid=top] \setuplayout[width=fit, grid=yes, height=\dimexpr(21\lineheight+\footerheight+\headerheight), ] \starttext \dorecurse{4}{% \somehead{Dummy} \input tufte } \stoptext
participants (2)
-
Hans Hagen
-
Patrick Gundlach