From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/60971 Path: news.gmane.org!not-for-mail From: Elias Oltmanns Newsgroups: gmane.comp.tex.context Subject: Re: Trouble with customising section heads Date: Tue, 17 Aug 2010 11:53:10 +0200 Message-ID: <87r5hx4lbt.fsf@denkblock.local> References: <87bp9a8q9h.fsf@denkblock.local> <87vd794ryr.fsf@denkblock.local> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1282038830 28665 80.91.229.12 (17 Aug 2010 09:53:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 17 Aug 2010 09:53:50 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Aug 17 11:53:47 2010 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 1OlIrW-0006Tz-4J for gctc-ntg-context-518@m.gmane.org; Tue, 17 Aug 2010 11:53:42 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 12257CA246; Tue, 17 Aug 2010 11:53:41 +0200 (CEST) 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 UsYwkMOGEy8i; Tue, 17 Aug 2010 11:53:38 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 60BCBCA559; Tue, 17 Aug 2010 11:53:38 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3D8CECA559 for ; Tue, 17 Aug 2010 11:53:36 +0200 (CEST) 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 qFuhCZYdmjyu for ; Tue, 17 Aug 2010 11:53:22 +0200 (CEST) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id 53B23CA246 for ; Tue, 17 Aug 2010 11:53:22 +0200 (CEST) Original-Received: from nebensachen.de (nebensachen.de [78.46.130.30]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o7H9rLUh017451 for ; Tue, 17 Aug 2010 11:53:21 +0200 Original-Received: from upstream.obscured ([192.168.0.1]) by mail.nebensachen.de (Postfix) with ESMTPSA id 0F8C420DA24E for ; Tue, 17 Aug 2010 11:53:21 +0200 (CEST) X-Hashcash: 1:20:100817:ntg-context@ntg.nl::vOOQVpfDtGX1M1Xt:0000000000000000000000000000000000000000000AnEB Mail-Copies-To: nobody Mail-Followup-To: mailing list for ConTeXt users In-Reply-To: <87vd794ryr.fsf@denkblock.local> (Elias Oltmanns's message of "Tue, 17 Aug 2010 09:29:48 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=78.46.130.30; country=DE; region=01; city=Karlsruhe; latitude=49.0047; longitude=8.3858; http://maps.google.com/maps?q=49.0047,8.3858&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0xCTlRlUb - dbf17bb687ac - 20100817 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 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:60971 Archived-At: Elias Oltmanns wrote: > For the record: > > Elias Oltmanns wrote: >> In the attempt to customise my section headings by means of >> \setuphead[section][...command=] >> I followed the instructions at >> http://wiki.contextgarden.net/Figures_in_Headings#Figures_in_Headings >> . > [...] >> As it turns out, neither MkII nor MkIV processes the attached example >> as expected: >> MkII The table of contents is incomplete, even though the wiki says >> it shouldn't be; > > The solution seems to be to use deeptextcommand instead of textcommand. > >> MkIV \currentheadnumber seems to be 0 all the time. > > Apart from Wolfgang's solution, I have now realised that MkIV allows to > use command instead of textcommand / numbercommand and still produces a > complete table of contents. Accordingly, the setups look like this: > \setuphead[section][command=\Myhead] > \def\Myhead#1#2{% > Sect #1} Well, actually, when I really need just a number as in \def\Myhead#1#2{\externalfigure[chapter-\currentheadnumber]} I'm still in trouble as far as MkIV is concerned. Can I somehow extract that number from the argument? Or can MkIV be changed to provide \currentheadnumber as does MkII? Personally, I'm content with using MkII right now. So, I'm asking out of curiosity here and for the purpose of updating the wiki page referenced above. Regards, Elias ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________