From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/47425 Path: news.gmane.org!not-for-mail From: Alan Stone Newsgroups: gmane.comp.tex.context Subject: Re: chapter page question Date: Sat, 14 Feb 2009 19:17:44 +0100 Message-ID: <326847810902141017g458d1eb5vd13d4c8f04fc5fb@mail.gmail.com> References: <326847810902140246p3d87929fx85d9c2b8f32ed2cb@mail.gmail.com> <8C5FB8F5-6F8D-4363-9181-DDFA3813C704@gmail.com> <326847810902140357h575596f3obc1699d121e00ed6@mail.gmail.com> <43A79DD5-7F71-41EC-8A79-F4B8D6E240ED@gmail.com> <326847810902140514i6076bdaeu7de3af99268355c8@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0994566147==" X-Trace: ger.gmane.org 1234635586 14897 80.91.229.12 (14 Feb 2009 18:19:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Feb 2009 18:19:46 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Feb 14 19:21:01 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1LYP8L-0007OQ-J9 for gctc-ntg-context-518@m.gmane.org; Sat, 14 Feb 2009 19:20:57 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id ABD271FCE4; Sat, 14 Feb 2009 19:19:35 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 31405-02-6; Sat, 14 Feb 2009 19:18:28 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9CB351FC93; Sat, 14 Feb 2009 19:18:28 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id F1ED61FC93 for ; Sat, 14 Feb 2009 19:18:26 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 31405-02-5 for ; Sat, 14 Feb 2009 19:17:45 +0100 (CET) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by ronja.ntg.nl (Postfix) with ESMTP id CFC9F1FC6A for ; Sat, 14 Feb 2009 19:17:45 +0100 (CET) Original-Received: from mail-ew0-f11.google.com (mail-ew0-f11.google.com [209.85.219.11]) by filter1-til.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n1EIHj9x020165 for ; Sat, 14 Feb 2009 19:17:45 +0100 Original-Received: by ewy4 with SMTP id 4so1488334ewy.2 for ; Sat, 14 Feb 2009 10:17:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=AKL+xp8lsBMdGOJoi/AqjnVSLk7ZEXP3QAujnYXT7aM=; b=U1Gpmf8DhPbXTQqFPAd7UMxdrRwcrxIcS4U4vRTDL1UpO75SvN/jCwSLyIdNu1Fcmp 61Su+zWNVuF34mS5vJBaltvwsV1u1TNiIeLmLpw+9K91OzcdXN6vQ7xoVicuAMdWynus +F5lz0QNGsDaiTSbAMHyQX2FJ1w72hTWufRTM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=sklokwSikM7SPmJnsRPQUGcivewwXJGfLvi1BQGtlJ1FUMIL4bPd5FjP6KInKsZfmB rS+uBRuiQjNurjeTt3kxT0qD5r6iihk4EZaBBTd7+aPLrJTN91P1D2a6DRs9Y2BpNsWJ 0mAOqVXsumU2uB+maGWAQDtHu1M8hDyUj93Hs= Original-Received: by 10.210.35.10 with SMTP id i10mr2750228ebi.104.1234635464975; Sat, 14 Feb 2009 10:17:44 -0800 (PST) In-Reply-To: <326847810902140514i6076bdaeu7de3af99268355c8@mail.gmail.com> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.219.11; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 180004960 - c6980f17ceff X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:47425 Archived-At: --===============0994566147== Content-Type: multipart/alternative; boundary=0015174c37b451260f0462e4f837 --0015174c37b451260f0462e4f837 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit The underneath example works with \def\myHeader{\iftuut chapter\else high\fi} How do you make it work with\def\myHeader{\doifmodelse{a}{chapter}{high}} ? ( without resorting to \doifmodeelse{a}{\tuuttrue}{\tuutfalse} ) \showframe \newif\iftuut %\tuuttrue \tuutfalse \setuppagenumbering[location=footer] \setupheadertexts[\doifoddpageelse{right page}{left page}] \definetext[chapter][header][chapter page] \def\myHeader{\doifmodelse{a}{chapter}{high}} %\def\myHeader{\iftuut chapter\else high\fi} \setuphead [chapter] % [header=chapter] % [header=high] [header=\myHeader] \starttext \dorecurse{2}{\chapter{Chapter #1}\dorecurse{20}{\input knuth\par}} \stoptext --- ! Undefined control sequence. \myHeader ->\doifmodelse {a}{chapter}{high} \doifvaluesomething ...inga {\csname #1\endcsname }\ifx \!!stringa \empty \e... ...ething {\??ko \v!chapter \c!header } {\setuplayouttext [\v!hea... \firstoftwoarguments #1#2->#1 ...BB {\v!chapter }\v!header \c!header \dohandlepagebreakBB {\v!c... \firstofoneargument #1->#1 ... l.23 ...apter #1}\dorecurse{20}{\input knuth\par}} --- Alan --0015174c37b451260f0462e4f837 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
The underneath example works with \def\myHeader{\iftuut chapter\e= lse high\fi}
 
How do you make it work with\def\myHeader{\doifmodelse{a}{chapter= }{high}} ?
( without resorting to \doifmodeelse{a}{\tuuttrue}{\tuutfalse} )<= /div>
 
\showframe
 
\newif\iftuut
%\tuuttrue
\tuutfalse
 
\setuppagenumbering[location=3Dfooter]
 
\setupheadertexts[\doifoddpageelse{right page}{left page}]
 
\definetext[chapter][header][chapter page]
 
\def\myHeader{\doifmodelse{a}{chapter}{high}}
%\def\myHeader{\iftuu= t chapter\else high\fi}
 
\setuphead
 [chapter]
% [header=3Dchapter]
% [header=3Dh= igh]
 [header=3D\myHeader]
 
\starttext
\dorecurse{2}{\chapter{Chapter #1}\dorecurse{20}{\input = knuth\par}}
\stoptext
 
---
 
 ! Undefined control sequence.
\myHeader ->\doifmodelse             &n= bsp;            {a}{= chapter}{high}
\doifvaluesomething ...inga {\csname #1\endcsname
&nb= sp;            =             &nb= sp;            =             }\ifx \!= !stringa \empty \e...
<argument> ...ething {\??ko \v!chapter \c!header }
  &nb= sp;            =             &nb= sp;            =            {\setuplayoutt= ext [\v!hea...
\firstoftwoarguments #1#2->#1
   &nb= sp;            =              <argument> ...BB {\v!chapter }\v!header \c!header
            &nb= sp;            =             &nb= sp;            \doha= ndlepagebreakBB {\v!c...
\firstofoneargument #1->#1
  &n= bsp;            = ;          
...
l.= 23 ...apter #1}\dorecurse{20}{\input knuth\par}}
 
---
 
Alan
--0015174c37b451260f0462e4f837-- --===============0994566147== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============0994566147==--