Re: [NTG-context] \textrules in header

2009-05-18 Thread Robert-André Mauchin

 Hans Hagen wrote (2001-10-18 (13:09)):

  At 09:40 AM 10/18/2001 +, Peter Jander wrote:
   Hi,
  
   I want a line to separate the header from the text body. Now if I
   say
  
   \setupheader[after=\textrule]
  
   the line starts in the margin. The length is the width of the text
   (which is ok). The same happens with a \hairline.
   Any suggestions on how I can make the line span just the text
   block?
 
  \setupbackgrounds[header][text]
  [frame=on,topframe=off,leftframe=off,rightframe=off]
 
  \setuplayout[header=18pt,headerdistance=12pt]
 
  \starttext \input tufte \stoptext

 Why doesn't Peter's solution work? It is the first that a new
 user will think about (well, I did, at least :-). And the rules
 really are something that logically belongs to the header, not
 to the background. For example, when you start a new chapter,
 and switch off the header on its first page, then you want the
 rule to disappear as well, and not to switch it off separately
 by changing the state of the background. (By the way, how would
 that work? Can you give a \setuphead solution?)

 Marco

Hi,

Sorry to bump this very old thread, but I've searched a long time to 
find this solution :


\setupheader[text][after=\hrule height 1pt]

Hope it helps

Bob
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] textrules

2006-10-21 Thread Thomas A. Schmitz
On Oct 20, 2006, at 1:32 AM, Aditya Mahajan wrote:

 \textrule[top] does

 before
 --- (rule)
 inbetween

 \textrule[bottom] does

 inbetween
 --
 after

 \textrule with no argumet is equal to \textrule[bottom]

 There is a \domiddletextrule that does

 inbetween
 
 inbetween

 but this is not interfaced with \textrule. It only becomes active
 inside a \starttextrule.

 \starttextrule{whatever}
 \input knuth
 \textrule
 \input knuth
 \stoptextrule


 To use this, you can define your own rule as

 \def\midtextrule{\dosinglegroupempty\domiddletextrule}

 \setuptextrules[inbetween={\blank[big]}]

 And midtextrule will use inbetween on both side.

 Hans, does it make sense to add this to core-rul?

 \def\complextextrule[#1]%
{\processaction
   [#1]
   [  \v!top=\let\next\dotoptextrule,
  \v!bottom=\let\next\dobottomtextrule,
  middle=\let\next\domiddletextrule, %--- Added
\s!default=\let\next\dobottomtextrule,
\s!unknown=\let\next\dobottomtextrule]%
 \dosinglegroupempty\next}


 Aditya

Aditya,

thanks for this in-depth explanation! One mystery solved! I have now  
tweaked my output so it looks the way it should.

Best

Thomas

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textrules

2006-10-20 Thread Hans Hagen
Aditya Mahajan wrote:
 On Thu, 19 Oct 2006, Thomas A. Schmitz wrote:

   
 On Oct 19, 2006, at 5:04 PM, Peter Rolf wrote:

 
 Hi Thomas,


   
 add

 \showskips

 to your source (better a small one). I just tested a bit (between my
 current mp examples) and 'inbetween={\blank[2*big]}' and
 'after={\blank[2*big]}' should do the job. If you dare, ask Hans about
 the meaning of 'before' ;)


 Greetings, Peter

   
 Thanks Peter,

 that was very helpful. I still had to tweak a bit, but by combining
 inbetween and after, I got an acceptable result. So the mystery
 thickens: what is before? :-)
 


 \textrule[top] does

 before
 --- (rule)
 inbetween

 \textrule[bottom] does

 inbetween
 --
 after

 \textrule with no argumet is equal to \textrule[bottom]

 There is a \domiddletextrule that does

 inbetween
 
 inbetween

 but this is not interfaced with \textrule. It only becomes active 
 inside a \starttextrule.

 \starttextrule{whatever}
 \input knuth
 \textrule
 \input knuth
 \stoptextrule


 To use this, you can define your own rule as

 \def\midtextrule{\dosinglegroupempty\domiddletextrule}

 \setuptextrules[inbetween={\blank[big]}]

 And midtextrule will use inbetween on both side.

 Hans, does it make sense to add this to core-rul?

 \def\complextextrule[#1]%
{\processaction
   [#1]
   [  \v!top=\let\next\dotoptextrule,
  \v!bottom=\let\next\dobottomtextrule,
  middle=\let\next\domiddletextrule, %--- Added
   
\v!middle -)

added
\s!default=\let\next\dobottomtextrule,
\s!unknown=\let\next\dobottomtextrule]%
 \dosinglegroupempty\next}


 Aditya
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context
   


-- 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] textrules

2006-10-19 Thread Thomas A. Schmitz
Hi all, 

I want two paragraphs separated by a rule which has the same distance to
the preceding and the following line (yes, I know that this is fuzzy,
it's just the optical impression that counts). I can't get my head
around the \setuptextrules command, which should allow to do this. I
tried this:


\def\smallblank{\blank[line]}
\def\bigblank{\blank[2*line]}

\setuptextrules[inbetween=\bigblank,
before=\bigblank
]

but I realize that the before, after, and inbetween keywords either
don't do what I want or plain do nothing. Could somebody explain what
their expected behavior is (and if I should use a different approach
than textrule?).

Thanks

Thomas

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textrules

2006-10-19 Thread Peter Rolf
Hi Thomas,

Thomas A. Schmitz wrote:
 Hi all, 
 
 I want two paragraphs separated by a rule which has the same distance to
 the preceding and the following line (yes, I know that this is fuzzy,
 it's just the optical impression that counts). I can't get my head
 around the \setuptextrules command, which should allow to do this. I
 tried this:
 
 
 \def\smallblank{\blank[line]}
 \def\bigblank{\blank[2*line]}
 
 \setuptextrules[inbetween=\bigblank,
 before=\bigblank
 ]
 
 but I realize that the before, after, and inbetween keywords either
 don't do what I want or plain do nothing. Could somebody explain what
 their expected behavior is (and if I should use a different approach
 than textrule?).

add

\showskips

to your source (better a small one). I just tested a bit (between my
current mp examples) and 'inbetween={\blank[2*big]}' and
'after={\blank[2*big]}' should do the job. If you dare, ask Hans about
the meaning of 'before' ;)


Greetings, Peter

 Thanks
 
 Thomas
 
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context
 
 

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textrules

2006-10-19 Thread Thomas A. Schmitz

On Oct 19, 2006, at 5:04 PM, Peter Rolf wrote:

 Hi Thomas,



 add

 \showskips

 to your source (better a small one). I just tested a bit (between my
 current mp examples) and 'inbetween={\blank[2*big]}' and
 'after={\blank[2*big]}' should do the job. If you dare, ask Hans about
 the meaning of 'before' ;)


 Greetings, Peter


Thanks Peter,

that was very helpful. I still had to tweak a bit, but by combining  
inbetween and after, I got an acceptable result. So the mystery  
thickens: what is before? :-)

Best

Thomas
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textrules

2006-10-19 Thread Aditya Mahajan
On Thu, 19 Oct 2006, Thomas A. Schmitz wrote:


 On Oct 19, 2006, at 5:04 PM, Peter Rolf wrote:

 Hi Thomas,



 add

 \showskips

 to your source (better a small one). I just tested a bit (between my
 current mp examples) and 'inbetween={\blank[2*big]}' and
 'after={\blank[2*big]}' should do the job. If you dare, ask Hans about
 the meaning of 'before' ;)


 Greetings, Peter


 Thanks Peter,

 that was very helpful. I still had to tweak a bit, but by combining
 inbetween and after, I got an acceptable result. So the mystery
 thickens: what is before? :-)


\textrule[top] does

before
--- (rule)
inbetween

\textrule[bottom] does

inbetween
--
after

\textrule with no argumet is equal to \textrule[bottom]

There is a \domiddletextrule that does

inbetween

inbetween

but this is not interfaced with \textrule. It only becomes active 
inside a \starttextrule.

\starttextrule{whatever}
\input knuth
\textrule
\input knuth
\stoptextrule


To use this, you can define your own rule as

\def\midtextrule{\dosinglegroupempty\domiddletextrule}

\setuptextrules[inbetween={\blank[big]}]

And midtextrule will use inbetween on both side.

Hans, does it make sense to add this to core-rul?

\def\complextextrule[#1]%
   {\processaction
  [#1]
  [  \v!top=\let\next\dotoptextrule,
 \v!bottom=\let\next\dobottomtextrule,
 middle=\let\next\domiddletextrule, %--- Added
   \s!default=\let\next\dobottomtextrule,
   \s!unknown=\let\next\dobottomtextrule]%
\dosinglegroupempty\next}


Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context