[NTG-context] Hairline in header

Willi Egger w.egger at boede.nl
Thu Mar 3 17:36:11 CET 2011


Hi,

Of course this is a very elaborate solution which comes in handy, if you want special effects. however for the simple case of a rule you could also use just:

\setupbackgrounds[header][text][frame=off, bottomframe=on,rulethickness=1pt]

Willi

On 3 Mar 2011, at 16:39, Wolfgang Schuster wrote:

> 
> 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
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context at 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
> ___________________________________________________________________________________



More information about the ntg-context mailing list