ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: ntg-context@ntg.nl
Subject: Re: Some questions about context
Date: Sat, 10 Mar 2007 08:45:01 +0100	[thread overview]
Message-ID: <20070310084501.e74e5855.schuster.wolfgang@googlemail.com> (raw)
In-Reply-To: <555BA3F5-E9C0-4D60-AC52-987D8328541D@csiro.au>

On Wed, 7 Mar 2007 00:00:38 +1100
Robin Kirkham <robin.kirkham@csiro.au> wrote:

> Hi all,
> 
> Moreover, how do you get a rule in the header that extends from the  
> left of the left margin, right across to the right of the right  
> margin (including the gaps in between)?
> 
> Cheers,
> 
> Robin
> 
> On 06/03/2007, at 10:00 PM, ntg-context-request@ntg.nl wrote:
> 
> > From: Oliver Buerschaper <oliver.buerschaper@mpq.mpg.de>
> > Date: 6 March 2007 9:19:23 PM
> > To: mailing list for ConTeXt users <ntg-context@ntg.nl>
> > Subject: Re: [NTG-context] Some questions about context
> >
> >> And another question (in other topic): how we can do lines at  
> >> header and
> >> footer like fancyheaders in latex?
> >
> > For your headers try this:
> >
> > \setupheader
> > 	[text]
> > 	[after=\hrule]

Hi Robin,

I tried to make something working and came to the following three
methods to draw a rule under the header at the whole pagewidth.

If you use ConTeXts default layout with different margins you should
use bigger values for the rulewidth than only pagewidth.

\setuplayout[location=middle,cutspace=\backspace,width=middle]
%\setuppapersize[A5][A4]
%\showframe

\startuseMPgraphic{headerrule}
setbounds currentpicture to unitsquare xyscaled (\the\paperwidth,\the
\headerheight); draw (0,0)--(\the\paperwidth,0);
\stopuseMPgraphic

\defineoverlay
  [headerrule]
  [\useMPgraphic{headerrule}]

\defineoverlay
  [headerrule]
  [\vrule height\headerheight width0pt%
   \vrule width\paperwidth height 0.4pt\relax]

\defineoverlay
  [headerrule]
  [{\framed[width=\paperwidth,height=
\headerheight,frame=off,bottomframe=on]{}}]

\setupbackgrounds
  [header]
  [text]
  [background=headerrule]

\starttext

\input knuth

\stoptext

Wolfgang

  reply	other threads:[~2007-03-10  7:45 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.0.1173178801.22858.ntg-context@ntg.nl>
2007-03-06 13:00 ` Robin Kirkham
2007-03-10  7:45   ` Wolfgang Schuster [this message]
     [not found] <mailman.3024.1173519750.17432.ntg-context@ntg.nl>
2007-03-11  3:15 ` Robin Kirkham
2007-03-11 12:18   ` Wolfgang Schuster
2007-03-05 12:43 Xan
2007-03-05 13:44 ` Wolfgang Schuster
2007-03-05 14:44   ` Aditya Mahajan
2007-03-05 16:45     ` Mojca Miklavec
2007-03-05 17:35       ` Aditya Mahajan
2007-03-05 20:12   ` Xan
2007-03-05 20:21     ` Xan
2007-03-06  0:37       ` Aditya Mahajan
2007-03-06  9:26         ` Xan
2007-03-06 10:19           ` Oliver Buerschaper
2007-03-06 16:16             ` Aditya Mahajan
2007-03-06 22:07               ` Oliver Buerschaper
2007-03-06 11:48           ` Wolfgang Schuster
2007-03-07 11:47             ` Xan
2007-03-06 16:14           ` Aditya Mahajan
2007-03-06  1:46     ` luigi scarso
2007-03-06  9:09       ` Xan
2007-03-06 16:20       ` Aditya Mahajan
2007-03-06 23:01         ` luigi scarso

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=20070310084501.e74e5855.schuster.wolfgang@googlemail.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).