From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/66055 Path: news.gmane.org!not-for-mail From: Daniel Lyons Newsgroups: gmane.comp.tex.context Subject: conditional evaluation and section names Date: Tue, 15 Feb 2011 01:11:02 -0700 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1297757513 29334 80.91.229.12 (15 Feb 2011 08:11:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 15 Feb 2011 08:11:53 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue Feb 15 09:11:49 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PpG0j-0003aJ-KP for gctc-ntg-context-518@m.gmane.org; Tue, 15 Feb 2011 09:11:49 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 38AEBCA9DD; Tue, 15 Feb 2011 09:11:48 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 2ZeX9og0uD4i; Tue, 15 Feb 2011 09:11:33 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CBF8BCA9C1; Tue, 15 Feb 2011 09:11:33 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 14000CA9C1 for ; Tue, 15 Feb 2011 09:11:32 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id V6-+PuDwvANr for ; Tue, 15 Feb 2011 09:11:09 +0100 (CET) Original-Received: from filter1-nij.mf.surf.net (filter1-nij.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id CF8BECA9BF for ; Tue, 15 Feb 2011 09:11:09 +0100 (CET) Original-Received: from mail.clanspum.net (twopir-2-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:1b9::2]) by filter1-nij.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p1F8B5Ki006878 for ; Tue, 15 Feb 2011 09:11:07 +0100 Original-Received: from [192.168.2.5] (67-0-72-45.albq.qwest.net [67.0.72.45]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.clanspum.net (Postfix) with ESMTPSA id C224417C2CF for ; Tue, 15 Feb 2011 02:12:29 -0600 (CST) X-Mailer: Apple Mail (2.1082) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: No geolocation information available for 2001:470:1f10:1b9::2 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07E88b5yf - 617fee2a57f2 - 20110215 X-Scanned-By: CanIt (www . roaringpenguin . com) on IPv6:2001:610:0:800e:195:169:124:152 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:66055 Archived-At: Hi again, I have this in my environment \startsetups[sectioninfo] \ss \rlap{\userpagenumber} \hfill =A7 \getmarking[sectionnumber][current] \emspace \bf \getmarking[section][current] \hfill \llap{} \stopsetups \setupheadertexts[\setups{chapterinfo}][] [] [\setups{sectioninfo}] This seems to be working, but there are a couple improvements I'd like to m= ake and I'm not quite sure where to start: 1. If I'm in a later chapter than the current section is defined in, it sho= ws up anyway. I'd like to prevent that. 2. If I'm in a chapter that doesn't have sections, I'd like the chapter nam= e to show up instead (without the =A7). I'm not sure at all how to go about doing this. I suspect the answer is to = use plain TeX but I don't understand TeX's conditional system well enough t= o figure out how to make it work (nor ConTeXt's marking system). If anyone = can help, I'd greatly appreciate it! Thanks again, =97 = Daniel Lyons ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________