From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/66067 Path: news.gmane.org!not-for-mail From: Daniel Lyons Newsgroups: gmane.comp.tex.context Subject: Re: conditional evaluation and section names Date: Tue, 15 Feb 2011 12:53:00 -0600 Message-ID: <20110215185300.GA13504@clanspum.net> References: <33505296-72FC-45BE-9690-E3FDA5635F09@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1297795940 23543 80.91.229.12 (15 Feb 2011 18:52:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 15 Feb 2011 18:52:20 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Feb 15 19:52:15 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 1PpQ0V-0000g4-6I for gctc-ntg-context-518@m.gmane.org; Tue, 15 Feb 2011 19:52:15 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 93A1BCAA04; Tue, 15 Feb 2011 19:52:14 +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 fwDpnmGzcl8h; Tue, 15 Feb 2011 19:51:51 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id ACAAACA9EF; Tue, 15 Feb 2011 19:51:51 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 000B3CA9EF for ; Tue, 15 Feb 2011 19:51:49 +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 U-HcZ8j0Y7CB for ; Tue, 15 Feb 2011 19:51:38 +0100 (CET) Original-Received: from filter4-nij.mf.surf.net (filter4-nij.mf.surf.net [195.169.124.155]) by balder.ntg.nl (Postfix) with ESMTP id C7630CA9EC for ; Tue, 15 Feb 2011 19:51:38 +0100 (CET) Original-Received: from mail.clanspum.net (twopir-2-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:1b9::2]) by filter4-nij.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p1FIpZYx007055 for ; Tue, 15 Feb 2011 19:51:37 +0100 Original-Received: by mail.clanspum.net (Postfix, from userid 1001) id 46A7C17C2D0; Tue, 15 Feb 2011 12:53:00 -0600 (CST) Content-Disposition: inline In-Reply-To: <33505296-72FC-45BE-9690-E3FDA5635F09@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 04E8iPzb9 - abb7b8742ede - 20110215 X-Scanned-By: CanIt (www . roaringpenguin . com) on IPv6:2001:610:0:800e:195:169:124:155 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:66067 Archived-At: On Tue, Feb 15, 2011 at 07:12:51PM +0100, Wolfgang Schuster wrote: > > 2. If I'm in a chapter that doesn't have sections, I'd like the chapter= name 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 enou= gh to figure out how to make it work (nor ConTeXt's marking system). If any= one can help, I'd greatly appreciate it! > = > Make a *complete* minimal example! OK, for #2: \startsetups[sectioninfo] =A7 \getmarking[sectionnumber] \stopsetups \setupheadertexts[\setups{sectioninfo}] \starttext \chapter{One} \input knuth \stoptext This will give me a =A7 in the header even on the first page. I'd like to conditionally not show the =A7 if there's no content in \getmarking[sectionnumber]. = I realize this is probably a basic TeX programming thing, but I haven't yet found a resource that explains TeX as a programming language. If you know of one, please refer me to it; I'm not trying to waste anyone's time. I'll cook up a minimal example of the other thing later today. It's probably a mistake in my environment, since using the code above does not have the problem. Thanks again, -- = Daniel ___________________________________________________________________________= ________ 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 ___________________________________________________________________________= ________