* Problem with understanding \doifemptyelse
@ 2002-03-22 11:26 Gilles Pérez-Lambert
2002-03-23 9:55 ` Hans Hagen
0 siblings, 1 reply; 5+ messages in thread
From: Gilles Pérez-Lambert @ 2002-03-22 11:26 UTC (permalink / raw)
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.
Another little problem: how not to have the headers on the beginning
page of a chapter; i tried many things but didn't find the right one.
Thanks,
Gilles.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problem with understanding \doifemptyelse
2002-03-22 11:26 Problem with understanding \doifemptyelse Gilles Pérez-Lambert
@ 2002-03-23 9:55 ` Hans Hagen
2002-03-25 11:22 ` texexec --module problem (was Re: Problem with understanding\doifemptyelse) Daniel Pittman
0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2002-03-23 9:55 UTC (permalink / raw)
Cc: ntg-context
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 | pragma@wxs.nl
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
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread
* texexec --module problem (was Re: Problem with understanding\doifemptyelse)
2002-03-23 9:55 ` Hans Hagen
@ 2002-03-25 11:22 ` Daniel Pittman
2002-03-24 0:30 ` texexec --module problem (was Re: Problem with understanding \doifemptyelse) Hans Hagen
2002-03-25 13:57 ` Patrick Gundlach
0 siblings, 2 replies; 5+ messages in thread
From: Daniel Pittman @ 2002-03-25 11:22 UTC (permalink / raw)
On Sat, 23 Mar 2002, Hans Hagen wrote:
[...]
> (in supp-box (texexec --modu --pdf supp-box) you will find macros like
> \doifcontent that you can also use for such purposes)
Is there any special setup or location that I need to run that command
from? I tried, because this is an issue that I will soon be looking at,
and got the following result:
] cd ~/tmp/tex
] texexec --modu --pdf supp-box
TeXExec 2.7 - ConTeXt / PRAGMA ADE 1997-2001
total run time : 0 seconds
Nothing was created in the directory and no evidence if ConTeXt trying
anything in particular.
My installation all works fine, though, and the module can be located
and everything. So, have I missed something?
This is Linux inanna 2.5.6 #3 Mon Mar 11 23:34:33 EST 2002 i686 unknown
Daniel
--
In a patriarchal society all heterosexual intercourse is rape because
women, as a group, are not strong enough to give meaningful consent.
-- Catherine MacKinnon, _Professing Feminism: Cautionary
Tales from the Strange World of Women's Studies_
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: texexec --module problem (was Re: Problem with understanding \doifemptyelse)
2002-03-25 11:22 ` texexec --module problem (was Re: Problem with understanding\doifemptyelse) Daniel Pittman
@ 2002-03-24 0:30 ` Hans Hagen
2002-03-25 13:57 ` Patrick Gundlach
1 sibling, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2002-03-24 0:30 UTC (permalink / raw)
Cc: ntg-context
At 10:22 PM 3/25/2002 +1100, Daniel Pittman wrote:
> > (in supp-box (texexec --modu --pdf supp-box) you will find macros like
> > \doifcontent that you can also use for such purposes)
>
>Is there any special setup or location that I need to run that command
>from? I tried, because this is an issue that I will soon be looking at,
>and got the following result:
you need to go to the context/base path
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
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
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: texexec --module problem (was Re: Problem with understanding \doifemptyelse)
2002-03-25 11:22 ` texexec --module problem (was Re: Problem with understanding\doifemptyelse) Daniel Pittman
2002-03-24 0:30 ` texexec --module problem (was Re: Problem with understanding \doifemptyelse) Hans Hagen
@ 2002-03-25 13:57 ` Patrick Gundlach
1 sibling, 0 replies; 5+ messages in thread
From: Patrick Gundlach @ 2002-03-25 13:57 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 345 bytes --]
Hallo Daniel,
> Is there any special setup or location that I need to run that command
> from? I tried, because this is an issue that I will soon be looking at,
> and got the following result:
you have to copy the supp-box to the current directory. (And iirc you have
to have the 'cont-nl' format.)
--
Viele Grüße,
Patrick Gundlach
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-03-25 13:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-22 11:26 Problem with understanding \doifemptyelse Gilles Pérez-Lambert
2002-03-23 9:55 ` Hans Hagen
2002-03-25 11:22 ` texexec --module problem (was Re: Problem with understanding\doifemptyelse) Daniel Pittman
2002-03-24 0:30 ` texexec --module problem (was Re: Problem with understanding \doifemptyelse) Hans Hagen
2002-03-25 13:57 ` Patrick Gundlach
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).