[texhax] How to dereference a \ref in a command definition?

martin f krafft madduck at madduck.net
Fri May 16 19:16:37 CEST 2008


Hello,

I am trying to write a command to manipulate some section
references. My problem is that when I pass it something like

  \ref{mysection}

in #1, then \meaning{#2} tells me it's

  \protect\ref{mysection}

If I define a variable with that value (I am probably not using the
right terms here...),

  \def\myref{#2}

then I can get rid of the \protect and \meaning\myref gives:

  \ref{mysection}

What I would really want/need at this stage is the section ref
"unpacked", so replaced with its number, e.g. 4.1.2.

How can I achieve this?

Thank you!

-- 
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net at madduck
 
"convictions are more dangerous enemies of truth than lies."
                                                 - friedrich nietzsche
 
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/20080516/e8518f86/attachment.bin 


More information about the texhax mailing list