Re: [NTG-context] Hairline in header

2011-03-03 Thread Wolfgang Schuster

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@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
___


Re: [NTG-context] Hairline in header

2011-03-03 Thread Willi Egger
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@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
 ___

___
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
___


Re: [NTG-context] Hairline in header

2011-01-11 Thread Florian Wobbe
 how can I move the thinrule further up in this example? I'd like to use 
 \thinrule but still want the position like this:
 
 \setupheader[text][after=\hrule]
 
 
 Hi Florian,
 
 Maybe this can help you.
 
 \setuplayout[header=1cm,headerdistance=1cm]
 \setupheader[text][after=\vskip-0.8em\thinrule]
 \starttext
 \dorecurse{12}{\input knuth\par}
 \stoptext

Thanks, that works. I wonder if you can configure this with \setupthinrules.
\setupthinrules[before=\vskip-0.8em] does no work.

Florian

___
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
___


Re: [NTG-context] Hairline in header

2011-01-11 Thread 李延瑞
2011/1/11 Florian Wobbe florian.wo...@awi.de:
 how can I move the thinrule further up in this example? I'd like to use 
 \thinrule but still want the position like this:

 \setupheader[text][after=\hrule]


 Hi Florian,

 Maybe this can help you.

 \setuplayout[header=1cm,headerdistance=1cm]
 \setupheader[text][after=\vskip-0.8em\thinrule]
 \starttext
 \dorecurse{12}{\input knuth\par}
 \stoptext

 Thanks, that works. I wonder if you can configure this with \setupthinrules.
 \setupthinrules[before=\vskip-0.8em] does no work.


Hm, if you use:
\setupthinrules[n=1, before=\vskip-0.8em]
\setupheader[text][after=\thinrules]

it can work.

However ConTeXt advises to use \blank instead of \vskip, for example:

\setupthinrules[n=1, before={\blank[-0.8em]}]
\setupheader[text][after=\thinrules]

-- 
Best regards,

Li Yanrui (李延瑞)
___
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
___


Re: [NTG-context] Hairline in header

2011-01-11 Thread Florian Wobbe
 Thanks, that works. I wonder if you can configure this with \setupthinrules.
 \setupthinrules[before=\vskip-0.8em] does no work.
 
 
 Hm, if you use:
 \setupthinrules[n=1, before=\vskip-0.8em]
 \setupheader[text][after=\thinrules]
 
 it can work.
 
 However ConTeXt advises to use \blank instead of \vskip, for example:
 
 \setupthinrules[n=1, before={\blank[-0.8em]}]
 \setupheader[text][after=\thinrules]

This works, thank you!

Florian

___
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
___


Re: [NTG-context] Hairline in header

2011-01-10 Thread 李延瑞
2011/1/11 Florian Wobbe florian.wo...@awi.de:
 \setupheader[text][after=\thinrule]
 \setuplayout[header=1cm,headerdistance=1cm]
 \starttext
 \dorecurse{12}{\input knuth\par}
 \stoptext

 Hi,

 how can I move the thinrule further up in this example? I'd like to use 
 \thinrule but still want the position like this:

 \setupheader[text][after=\hrule]


Hi Florian,

Maybe this can help you.

\setuplayout[header=1cm,headerdistance=1cm]
\setupheader[text][after=\vskip-0.8em\thinrule]
\starttext
\dorecurse{12}{\input knuth\par}
\stoptext

-- 
Best regards,

Li Yanrui (李延瑞)
___
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
___


[NTG-context] Hairline in header

2010-11-04 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

how to add the hairline (or a kind of the horizontal rule) under the header 
area?

I'd like to achieve something like in the 1.pdf (attached; created by LaTeX).

My code till now:

---
\setuppagenumbering[location=footer,middle]

\setupheader[][style=small]
\setupheadertexts[LLL][RRR]

\starttext
  AAA
\stoptext
---

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

t-HeadFoot.mkiv
Description: Binary data
attachment: 1.png___
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
___


Re: [NTG-context] Hairline in header

2010-11-04 Thread Wolfgang Schuster

Am 04.11.2010 um 09:07 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:

 Hello,
 
 how to add the hairline (or a kind of the horizontal rule) under the header 
 area?


\setupbackgrounds[header][text][bottomframe=on]
\setuplayout[header=1cm,headerdistance=1cm]
\starttext
\dorecurse{12}{\input knuth\par}
\stoptext

or

\setupheader[text][after=\thinrule]
\setuplayout[header=1cm,headerdistance=1cm]
\starttext
\dorecurse{12}{\input knuth\par}
\stoptext

Wolfgang

___
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
___


Re: [NTG-context] Hairline in header

2010-11-04 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Thanks, that's it.

Cheers,

Lukas


On Thu, 04 Nov 2010 10:01:18 +0100, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:


\setupheader[text][after=\thinrule]
\setuplayout[header=1cm,headerdistance=1cm]
\starttext
\dorecurse{12}{\input knuth\par}
\stoptext


___
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
___