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

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