ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Sietse Brouwer <sbbrouwer@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Makeup layout
Date: Wed, 15 May 2013 13:57:50 +0200	[thread overview]
Message-ID: <CAF=dkzzYVjZ0OQ_y6wUpRttaHbSwz_OKX5OdU7xt_2Pdv+-zoA@mail.gmail.com> (raw)
In-Reply-To: <8BFB011E-2156-40B4-B794-24E746811A95@gmail.com>

Hi Andrew,

Andrew wrote:
> I have heard that layers can be used. But there
> is no section on layers in the current reference
> manual. Where does one find information on this
> aspect of ConTeXt?

You are right that there is no complete, from-the-ground-up,
description and explanation of the layers mechanism. A reasonably good
text, however, is in the MetaFun manual [1,2]: section 5.3 (Positional
graphics > More layers).

The "Pseudo columns" (pdfpages 11-13) section of the "It's in the
details" manual [13 is shorter and covers only a few specific use
cases, but it's a nice little start and has some information that the
MetaFun manual does not have. The MWE below is based mainly on that
text. NB: I rarely use layers, so the MWE may not reflect best
practices.

[1] print version: http://www.pragma-ade.com/general/manuals/metafun-p.pdf
[2] screen version: http://www.pragma-ade.com/general/manuals/metafun-s.pdf
[3] http://www.pragma-ade.com/general/manuals/details.pdf

I hope this will help you on your way a bit! Best wishes,

Sietse

\setuppapersize[A6]
\setuplayout
   [columns=3,         % add a horizontal grid, 3 equal columns
    columndistance=12pt,]% 12 pt(?) distance between them

% The layer `textlayer` will be the background
% of the `text` typesetting area.
\definelayer[textlayer]
\setupbackgrounds [text] [background=textlayer]

\showgrid % make the mechanism visible

\starttext
    % Start the title page, sans page number etc.
    \startstandardmakeup
        % Using column and line positions the left end of the box's
        % baseline
        \setlayer [textlayer] [column=3,line=10,location=grid]
            {\ruledvtop {\hsize\layoutcolumnwidth
                \definedfont[Regular sa 2]nitty-\par gritty}}

        % Using x and y offsets the top left of the box from the top
        % left corner
        \setlayer [textlayer] [x=1cm, y=1cm]
            {\blackrule[width=1cm, height=1cm]}

        \setlayer [textlayer] [x=1cm, line=10]
            {\ruledvtop {\hsize\layoutcolumnwidth
                \definedfont[Regular sa 2]This \par is}}
    \stopstandardmakeup
\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:[~2013-05-15 11:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-15  3:01 Andrew Bernard
2013-05-15  6:56 ` Wolfgang Schuster
2013-05-15 11:57   ` Sietse Brouwer [this message]

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='CAF=dkzzYVjZ0OQ_y6wUpRttaHbSwz_OKX5OdU7xt_2Pdv+-zoA@mail.gmail.com' \
    --to=sbbrouwer@gmail.com \
    --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).