ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Wolfgang Schuster" <schuster.wolfgang@googlemail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: set headings in the margins
Date: Tue, 9 Oct 2007 17:01:49 +0200	[thread overview]
Message-ID: <115224fb0710090801w7833b9e2x62d525cc7b7aba32@mail.gmail.com> (raw)
In-Reply-To: <3810155a0710090220p10e06c06rb59f1345360fbaff@mail.gmail.com>

2007/10/9, Aric Bills <aric.bills@gmail.com>:
> Hello all,
>
> I'm a total newbie Context user trying to do something that is apparently
> way beyond me.  I'm trying to set up a conceptual three-column design grid.
> The idea was to use the two columns on the right for body text, the column
> on the left for margin paragraphs, and the full three-column spread for
> headings.  The easiest way I could find to set such a thing up was this:
>
> \setuplayout[backspace=3.083in,
>     leftmargin=2.083in,
>     leftmargindistance=.25in,
>     width=4.417in,
>     rightmargin=1in]
>
> where "leftmargin" represents the leftmost column and "width" represents the
> other two columns (plus gutter).  So far so good.
>
> To get my heading to stretch across all three conceptual columns, I thought
> I'd use something along the lines of:
>
> \start
> \startlocal
> \setuplayout[...]
> \stoplocal
> \section{This heading was supposed to start at the left edge of the left
> margin and wrap at the right edge of the text area}
> \stop
>
> where [...] would eliminate the left margin and margindistance and
> re-allocate that space to the text width.
> However, I haven't yet found any [...] that does the trick.
>
> Whether my approach is basically right or totally wrong, I'd love to get
> guidance on the best way to typeset a heading across both the margin and the
> text area.  I'm aware that it's trivial to make section numbers appear in
> the margin; this is not the solution I'm looking for, though.
>
> Thanks for your help,
> Aric

Hi Aric,

you can start with my solution, sorry but I have at the moment no time
for a better one.

\setuplayout[backspace=6cm,width=fit]
\def\myheader#1#2%
  {\hbox to\makeupwidth
     {\hss\hbox
to\dimexpr\leftmarginwidth+\leftmargindistance+\makeupwidth\relax
        {\vbox{\hsize=\dimexpr\leftmarginwidth+\leftmargindistance+\makeupwidth\relax#1#2}}}}

\setuphead[section][command=\myheader]

\starttext

\dorecurse{5}
  {\section{\dorecurse{100}{text }}
   \dorecurse{5}{\input knuth\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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2007-10-09 15:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-09  9:20 Aric Bills
2007-10-09 15:01 ` Wolfgang Schuster [this message]
2007-10-09 20:55 Aric Bills
2007-10-10 10:39 ` Wolfgang Schuster

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=115224fb0710090801w7833b9e2x62d525cc7b7aba32@mail.gmail.com \
    --to=schuster.wolfgang@googlemail.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).