[texhax] in-section references

martin f krafft madduck at madduck.net
Sun Sep 30 16:12:28 CEST 2007


also sprach Donald Arseneau <asnd at triumf.ca> [2007.09.30.1438 +0100]:
> > >   \edef\curpart\thepart%
> > >   \edef\curchap\thechapter%
> > >   \edef\cursec\thesection%
> > >   \edef\cursubsec\thesubsection%
> > >   \edef\cursubsubsec\thesubsubsection%
> > >   \edef\curref#2%
> 
> These definitions are all wrong - missing braces.

Thank you for taking the time to respond!!!

So you mean \edef\curpart{\thepart}?

I tried

  \edef\curpart{\thepart}%
  \edef\curchap{\thechapter}%
  \edef\cursec{\thesection}%
  \edef\cursubsec{\thesubsection}%
  \edef\cursubsubsec{\thesubsubsection}%
  \def\curref{#2}%
  \def\refsame{#3 SAME}%
  \def\refother{#1~#2 OTHER}%
  \ifx\curref\curchap\refsame%
    \else\ifx\curref\cursec\refsame%
      \else\ifx\curref\cursubsec\refsame%
        \else\ifx\curref\cursubsubsec\refsame%
          \else\refother%
        \fi%
      \fi%
    \fi%
  \fi%

and now I get the exact opposite effect: now it's always
\refother... I still must be doing something wrong...

-- 
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net at madduck
 
"nothing can cure the soul but the senses,
 just as nothing can cure the senses but the soul."
                                                        -- oscar wilde
 
spamtraps: madduck.bogus at madduck.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature (see http://martin-krafft.net/gpg/)
Url : http://tug.org/pipermail/texhax/attachments/20070930/f3d6a1b6/attachment.bin 


More information about the texhax mailing list