From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/6298 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Distinguished item in \placelist? Date: Mon, 10 Dec 2001 11:14:20 +0100 Sender: owner-ntg-context@let.uu.nl Message-ID: <5.1.0.14.1.20011210110819.0323e698@server-1> References: <5.1.0.14.1.20011203105421.02f070a8@server-1> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: main.gmane.org 1035396829 9229 80.91.224.250 (23 Oct 2002 18:13:49 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 18:13:49 +0000 (UTC) Cc: ntg-context@ntg.nl Original-To: maley@idaccr.org In-Reply-To: <3C105FB0.9BD5779D@idaccr.org> Xref: main.gmane.org gmane.comp.tex.context:6298 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:6298 At 01:20 AM 12/7/2001 -0500, F. Miller Maley wrote: >Hans Hagen wrote: > > Say that I patch a macro : > > > > \unprotected \def\dolijstelement#1#2#3#4#5#6% pas op: wordt ook elders > > gedefinieerd > > {\doiftoclevelelse[#5] > > {\def\currentlist{#1}% > > \ifundefined{\??li\currentlist\c!huidige}\else > > \doif{#3}\currentheadnumber > > {\edef\currentlist{\getvalue{\??li\currentlist\c!huidige}}}% > > \fi > > \dodolijstelement\currentlist{#2}{#3}{#4}{#5}{#6}} > > {}} > > > > (this assumes a version where \currentheadnumber is known) > > etc. > >After considerable hacking, I got this to work! It didn't work as written >for various reasons, mainly having to do (as far as I could tell) with the >order in which things are expanded, and the \ifundefined ... \else ... \fi >confusing TeX about \if...\fi nesting. ah, but this is not a problem in the latest version -) >Anyway, the most serious problem >was that \currentheadnumber expands to a single number, but argument #3 >is usually something like 1.2 or 1.2.3, the details depending on the level >and the "stopper". I can hack around this problem in specific cases but >I don't have a general solution yet. One plan would be to expand >\headnumber[#1] and compare it with #3, but \headnumber (or rather >\kopnummer) seems to be protected from expansion in eTeX. hm. here \currentheadnumber gives the full number, \chapter{Test} \currentheadnumber \section{Test} \currentheadnumber 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 -------------------------------------------------------------------------