ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Grid, section, grid=top
@ 2004-05-13 13:51 Patrick Gundlach
  2004-05-13 20:37 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick Gundlach @ 2004-05-13 13:51 UTC (permalink / raw)


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.
    ] 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Grid, section, grid=top
  2004-05-13 13:51 Grid, section, grid=top Patrick Gundlach
@ 2004-05-13 20:37 ` Hans Hagen
  2004-05-28  8:44   ` Patrick Gundlach
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2004-05-13 20:37 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Grid, section, grid=top
  2004-05-13 20:37 ` Hans Hagen
@ 2004-05-28  8:44   ` Patrick Gundlach
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick Gundlach @ 2004-05-28  8:44 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-05-28  8:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-13 13:51 Grid, section, grid=top Patrick Gundlach
2004-05-13 20:37 ` Hans Hagen
2004-05-28  8:44   ` Patrick Gundlach

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).