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 | [EMAIL PROTECTED]
                       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
-------------------------------------------------------------------------

Reply via email to