ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* a line under the header
@ 2003-08-14 12:28 Helmut Schwertner
  2003-08-14 20:36 ` Henning Hraban Ramm
  0 siblings, 1 reply; 5+ messages in thread
From: Helmut Schwertner @ 2003-08-14 12:28 UTC (permalink / raw)


Hello,

I would like to put a line (not [underbared]) under the header  and above
the footer. The line shouldn't be to thin (not so thin as \hairline) and it
would be nice, if I could have a coloured line (grey, red, whatever). A
small example, so something like this (best view with non proportional
font):


header					pagenumber
-------------------------------------------

text text text text text text text text
text   text text text text text text

text text  text text text text text



-----------------------------------------
footer					footer


Thanks for any help,

best wishes,

Helmut

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

* Re: a line under the header
  2003-08-14 12:28 a line under the header Helmut Schwertner
@ 2003-08-14 20:36 ` Henning Hraban Ramm
  2003-08-18 11:31   ` Alexander Klink
  0 siblings, 1 reply; 5+ messages in thread
From: Henning Hraban Ramm @ 2003-08-14 20:36 UTC (permalink / raw)



> I would like to put a line (not [underbared]) under the header  and 
> above
> the footer. The line shouldn't be to thin (not so thin as \hairline) 
> and it
> would be nice, if I could have a coloured line (grey, red, whatever). A
> small example, so something like this (best view with non proportional
> font):

In ConTeXt it's useful if you can think around some edges:
Such a line is a frame with only one frame line.
This "frame" forms the background of your header.
Ergo:
\setupbackgrounds	[header][text][frame=off, bottomframe=on]
\setupbackgrounds	[footer][text][frame=off, topframe=on]


Grüßlis vom Hraban!
-- 
http://www.fiee.net/texnique/

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

* Re: a line under the header
  2003-08-14 20:36 ` Henning Hraban Ramm
@ 2003-08-18 11:31   ` Alexander Klink
  2003-08-18 21:00     ` Henning Hraban Ramm
  2003-08-21 21:55     ` Hans Hagen
  0 siblings, 2 replies; 5+ messages in thread
From: Alexander Klink @ 2003-08-18 11:31 UTC (permalink / raw)


On Thu, Aug 14, 2003 at 10:36:51PM +0200, Henning Hraban Ramm wrote:
> In ConTeXt it's useful if you can think around some edges:
> Such a line is a frame with only one frame line.
> This "frame" forms the background of your header.
> Ergo:
> \setupbackgrounds	[header][text][frame=off, bottomframe=on]
> \setupbackgrounds	[footer][text][frame=off, topframe=on]
I was going to ask exactly the same question. Unluckily, what you
did here does not work very well for me - the line is quite below
the header text, I would really like to have it closer...
\setupheader[after={\hairline}] does not work as the hairline
is not below the text but starts at the left border...
Maybe someone got another idea?

Greetings,
		ALeX

-- 
... Alexander Klink  ...   undergraduate in Mathematics with Computer Science
...  alech@alech.de  ...                at Darmstadt University of Technology
...  alech@3komma141592653589793238462643383279502884197169399375105820974.de

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

* Re: a line under the header
  2003-08-18 11:31   ` Alexander Klink
@ 2003-08-18 21:00     ` Henning Hraban Ramm
  2003-08-21 21:55     ` Hans Hagen
  1 sibling, 0 replies; 5+ messages in thread
From: Henning Hraban Ramm @ 2003-08-18 21:00 UTC (permalink / raw)



Am Montag, 18.08.03, um 13:31 Uhr (Europe/Zurich) schrieb Alexander 
Klink:
>> \setupbackgrounds	[header][text][frame=off, bottomframe=on]
>> \setupbackgrounds	[footer][text][frame=off, topframe=on]
> I was going to ask exactly the same question. Unluckily, what you
> did here does not work very well for me - the line is quite below
> the header text, I would really like to have it closer...
> \setupheader[after={\hairline}] does not work as the hairline
> is not below the text but starts at the left border...
> Maybe someone got another idea?

Try to decrease your header height, the header background box
will follow and probably the line gets closer to the text.
(\setuplayout[...])

BTW: Hairlines work on lowres output devices (600 dpi laser
printer), but will disappear on an offset plate. Only as a
hint if someone wants to get his/her books printed.
Why? -- Hairlines are one pixel thick, and one pixel is
invisible if your output device has got about 2450 dpi.

Grüßlis vom Hraban!
-- 
http://www.fiee.net/texnique/

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

* Re: a line under the header
  2003-08-18 11:31   ` Alexander Klink
  2003-08-18 21:00     ` Henning Hraban Ramm
@ 2003-08-21 21:55     ` Hans Hagen
  1 sibling, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2003-08-21 21:55 UTC (permalink / raw)


At 13:31 18/08/2003 +0200, Alexander Klink wrote:
>On Thu, Aug 14, 2003 at 10:36:51PM +0200, Henning Hraban Ramm wrote:
> > In ConTeXt it's useful if you can think around some edges:
> > Such a line is a frame with only one frame line.
> > This "frame" forms the background of your header.
> > Ergo:
> > \setupbackgrounds     [header][text][frame=off, bottomframe=on]
> > \setupbackgrounds     [footer][text][frame=off, topframe=on]
>I was going to ask exactly the same question. Unluckily, what you
>did here does not work very well for me - the line is quite below
>the header text, I would really like to have it closer...
>\setupheader[after={\hairline}] does not work as the hairline
>is not below the text but starts at the left border...
>Maybe someone got another idea?

\startuniqueMPgraphic{nice}
   draw bottomboundary OverlayBox
     leftenlarged 6pt rightenlarged 6pt
     shifted (0,.75HeaderHeight) ;
   setbounds currentpicture to OverlayBox ; % forces dimensions
\stopuniqueMPgraphic

\defineoverlay[nice][\uniqueMPgraphic{nice}]

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

\starttext

\input ward

\stoptext

I added a couple of shifts and enlargements to play with

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
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

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

end of thread, other threads:[~2003-08-21 21:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-14 12:28 a line under the header Helmut Schwertner
2003-08-14 20:36 ` Henning Hraban Ramm
2003-08-18 11:31   ` Alexander Klink
2003-08-18 21:00     ` Henning Hraban Ramm
2003-08-21 21:55     ` Hans Hagen

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