ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Oliver Buerschaper <oliver.buerschaper@mpq.mpg.de>
To: mailing ConTeXt users list for <ntg-context@ntg.nl>
Subject: First and last lines on a grid
Date: Fri, 22 Apr 2011 14:04:25 +0200	[thread overview]
Message-ID: <76C8CE68-4E7C-4538-A170-BB8BD1902508@mpq.mpg.de> (raw)

Dear all,

I'm having a little trouble with grids and page layout…

I'm trying to align the first and last line of a page properly with the frame of the textblock. That is, I'd like to position the first baseline a certain distance below the textblock's upper border (say, the height of a "C" or even "É") and the last baseline a certain distance above the textblock's lower border (say, the actual depth of a "g").

How would I do that? I tried playing with "\setupinterlinespace", however, its options "top" and "bottom" appear to set relative distances. Once I change the leading funny things happen… like an empty first line.

Also I'd like to typeset the page number flush with the lower border of the footer frame. How would I achieve that?

Please find the source code of my attempt below.

Oliver



---
\definemeasure
    [gridwidth]
    [\dimexpr\paperwidth/9\relax]
\definemeasure
    [gridheight]
    [\dimexpr\paperheight/9\relax]

\setuplayout
    [grid=yes,
     backspace=\measure{gridwidth},
     width=\dimexpr6\measure{gridwidth}\relax,
     topspace=\measure{gridheight},
     height=\dimexpr7\measure{gridheight}\relax,
     leftmargin=\zeropoint,
     rightmargin=\zeropoint,
     header=\zeropoint,
     footer=\measure{gridheight}]

\setupinterlinespace
    [line=\dimexpr\textheight/20\relax]

\setuppagenumbering
    [alternative=doublesided,
     location={footer,right}]


\starttext


\showframe
\showgrid

É
\dorecurse{10}{\input zapf\par}


\stoptext
---
___________________________________________________________________________________
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
___________________________________________________________________________________


             reply	other threads:[~2011-04-22 12:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-22 12:04 Oliver Buerschaper [this message]
2011-04-22 14:22 ` Wolfgang Schuster
2011-04-22 15:32   ` Oliver Buerschaper
2011-04-22 17:32   ` Oliver Buerschaper
2011-04-22 17:56     ` Wolfgang Schuster
2011-04-22 18:25       ` Oliver Buerschaper
2011-04-23  7:25         ` Oliver Buerschaper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=76C8CE68-4E7C-4538-A170-BB8BD1902508@mpq.mpg.de \
    --to=oliver.buerschaper@mpq.mpg.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).