At 12:26 PM 3/22/2002 +0100, Gilles P�rez-Lambert wrote:
>Hello,
>
>I'm trying to setup headers in such a manner that on the left pages I have
>the chapter title and on the right the section one; but if there's no
>section, I want the chapter one...
>
>I tried:
>%%%%%%%%
>\setupheadertexts
>[][{%
>\inframed[align=middle,frame=off,bottomframe=on,width=\makeupwidth]%
>{\itx\hfill%
>\doifemptyelse{\getmarking[section]}%%% If section header is empty
>{\getmarking[chapter]}% Take the chapter one
>{\getmarking[section]}}% else we take the section header
>}]
>[{\inframed[align=middle,frame=off,bottomframe=on,width=\makeupwidth]{\itx\
>getmarking[chapter]\hfill\null}}][]
>%%%%%%%%
>
>I know I must miss something: \getmarking[section] is surely not that
>empty when there's nothing but my TeX knowledge is not that deep.
you're right, since \getmarking is doing a couple of things, it's never
empty (for instance there is the test macro in there), instead use the low
level fetcher:
\fetchmark[chapter][first]
(in supp-box (texexec --modu --pdf supp-box) you will find macros like
\doifcontent that you can also use for such purposes)
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | [EMAIL PROTECTED]
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
-------------------------------------------------------------------------
fall-back web server:
www.pragma-ade.nl
-------------------------------------------------------------------------