ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Headers across the margin and text area
@ 2001-04-17 15:18 Duncan Hothersall
  2001-04-17 16:27 ` Berend de Boer
  0 siblings, 1 reply; 4+ messages in thread
From: Duncan Hothersall @ 2001-04-17 15:18 UTC (permalink / raw)


Hi,

I'm very new to ConTeXt so my apologies if this question displays my
ignorance.

I am implementing an existing A4 book layout, double-sided with a wide left
margin used for notes and exercises. I am trying to redefine the headers so
that the titles of sections, etc. are set across the whole page including
the margin. If you're viewing in a fixed width font, this is what I mean:

1.1 This is a section title
         Paragraph text appears here
         as normal. Notes and exercises
         will go into the margin on the
         left of the page.

All I have managed to do so far is to get the numbering to appear in the
margin. Is there any way to get the title text to start in the margin as
well? (I'm aware that one approach would be to set the text in two columns,
but I think using the existing margin facilities in ConTeXt should make
things much more coherent in the long run, if it can be done.)

Another question, in a similar vein: I'd like the headers and footers to run
the full width of the page too (i.e. the text area and the margin). The only
way I've managed that so far has been to \setuppagenumbering
[alternative=doublesided]. Unfortunately that made my margin alternate on
odd and even pages, and I need the margin always to be on the left. Is there
an obvious combination of \setup[..] type commands that can do this?

I hope that's enough information for somebody to help me out. Thanks in
advance,

Duncan

PS. I have the 13 English chapters of the manual, plus the beginners guide
and the commands list. Is there any other English language documentation I
should know about? Thanks.


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

* Re: Headers across the margin and text area
  2001-04-17 15:18 Headers across the margin and text area Duncan Hothersall
@ 2001-04-17 16:27 ` Berend de Boer
  2001-04-17 17:03   ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Berend de Boer @ 2001-04-17 16:27 UTC (permalink / raw)
  Cc: ntg-context

"Duncan Hothersall" <dh@capdm.com> writes:

> I am implementing an existing A4 book layout, double-sided with a wide left
> margin used for notes and exercises. I am trying to redefine the headers so
> that the titles of sections, etc. are set across the whole page including
> the margin. 

That means back to the TeX level :-)

With rlap or llap (lookup them up in the TeX book) you can make things
stick out a bit.

A probably not very compilable example would be:

\setuphead
  [section]
  [command=MyHead]

\def\MyHead#1#2%
  {\hss\hbox to \textwidth{\hbox to \mysectionwidth{#1 #2}}}

In this definition I use the \primitive \hss upon which \rlap and
\llap are build.

I make a box as width as the textwidth so TeX doesn't complain. In
that box I make a box that sticks out in the left margin (if it does
not, put the \hss after the 2nd \hbox instead of before).

This example does not wrap #2 if it is too large, you can experiment
with a \vtop or \vbox in the 2nd hbox to make it do that.

> Another question, in a similar vein: I'd like the headers and footers to run
> the full width of the page too (i.e. the text area and the margin). The only
> way I've managed that so far has been to \setuppagenumbering
> [alternative=doublesided]. Unfortunately that made my margin alternate on
> odd and even pages, and I need the margin always to be on the left. Is there
> an obvious combination of \setup[..] type commands that can do this?

Hmm, perhaps

\setupinmargin
  [location=right]

> PS. I have the 13 English chapters of the manual, plus the beginners guide
> and the commands list. Is there any other English language documentation I
> should know about? Thanks.

I think you have everything. You might want to take a look at the
metafun manual.

Groetjes,

Berend. (-:


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

* Re: Headers across the margin and text area
  2001-04-17 16:27 ` Berend de Boer
@ 2001-04-17 17:03   ` Hans Hagen
  2001-04-18 10:33     ` Duncan Hothersall
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2001-04-17 17:03 UTC (permalink / raw)
  Cc: Duncan Hothersall, ntg-context

At 06:27 PM 4/17/01 +0200, Berend de Boer wrote:
>"Duncan Hothersall" <dh@capdm.com> writes:
>
>> I am implementing an existing A4 book layout, double-sided with a wide left
>> margin used for notes and exercises. I am trying to redefine the headers so
>> that the titles of sections, etc. are set across the whole page including
>> the margin. 
>
>That means back to the TeX level :-)

In addition to Berend's suggestions: since you can put the text in the
margin header ...

\starttext

\setuplayout
  [margin=1cm]

\setupheadertexts
  [margin]
  [\rlap{some very wide spanning text ...}\hfill]
  []

\showframe \dorecurse{100}{test \recurselevel\space}

\stoptext

Hans
-------------------------------------------------------------------------
                                  Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


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

* RE: Headers across the margin and text area
  2001-04-17 17:03   ` Hans Hagen
@ 2001-04-18 10:33     ` Duncan Hothersall
  0 siblings, 0 replies; 4+ messages in thread
From: Duncan Hothersall @ 2001-04-18 10:33 UTC (permalink / raw)
  Cc: ntg-context

Thanks to both of you. I ended up doing both things using \llap and \rlap
constructs.

> -----Original Message-----
> From: Hans Hagen [mailto:pragma@wxs.nl]
> Sent: 17 April 2001 18:03
> To: Berend de Boer
> Cc: Duncan Hothersall; ntg-context@ntg.nl
> Subject: Re: Headers across the margin and text area
>


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

end of thread, other threads:[~2001-04-18 10:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-17 15:18 Headers across the margin and text area Duncan Hothersall
2001-04-17 16:27 ` Berend de Boer
2001-04-17 17:03   ` Hans Hagen
2001-04-18 10:33     ` Duncan Hothersall

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