ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: "Dr. David Endler" <de@davidendler.de>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Hairline in header
Date: Thu, 3 Mar 2011 16:39:37 +0100	[thread overview]
Message-ID: <8236C5BB-FAEB-4303-80B8-BB868EE6FC0F@gmail.com> (raw)
In-Reply-To: <013101cbd91e$8cdf45c0$a69dd140$@davidendler.de>


[-- Attachment #1.1: Type: text/plain, Size: 959 bytes --]


Am 02.03.2011 um 22:12 schrieb Dr. David Endler:

> Hi Wolfgang,
>  
> Is there also a possibility to have 2 lines below the header with different color and different thickness? 

You can use TeX’s own mechanism to draw the rules or use MetaPost.

% solution 1:

%\startsetups headerrules
%  \blackrule[width=\hsize,color=yellow,height=3pt]
%  \blackrule[width=\hsize,color=orange,height=3pt]
%\stopsetups
%
%\setupheader[text][after=\setups{headerrules}]

% solution 2:

\startuseMPgraphic{headerrules}
draw origin--(OverlayWidth,0) withcolor red  withpen pencircle scaled 4 ;
draw origin--(OverlayWidth,0) withcolor blue withpen pencircle scaled 4 shifted (0,4) ;
clip currentpicture to OverlayBox ;
setbounds currentpicture to OverlayBox ;
\stopuseMPgraphic

\defineoverlay[headerrules][\useMPgraphic{headerrules}]

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

\starttext
\input knuth
\stoptext

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 2640 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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:[~2011-03-03 15:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <013101cbd91e$8cdf45c0$a69dd140$@davidendler.de>
2011-03-03 15:39 ` Wolfgang Schuster [this message]
2011-03-03 16:36   ` Willi Egger
2011-01-10 21:20 Florian Wobbe
2011-01-11  0:22 ` Li Yanrui (李延瑞)
2011-01-11  8:06   ` Florian Wobbe
2011-01-11 11:49     ` Li Yanrui (李延瑞)
2011-01-11 12:54       ` Florian Wobbe
  -- strict thread matches above, loose matches on Subject: below --
2010-11-04  8:07 Procházka Lukáš Ing. - Pontex s. r. o.
2010-11-04  9:01 ` Wolfgang Schuster
2010-11-04  9:06   ` Procházka Lukáš Ing. - Pontex s. r. o.

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=8236C5BB-FAEB-4303-80B8-BB868EE6FC0F@gmail.com \
    --to=schuster.wolfgang@googlemail.com \
    --cc=de@davidendler.de \
    --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).