I'm trying to make a string manipulation by using xstring package.
Fore example \myparam
equals to this: 1.1 Optimal solution of RNASP
But string functions doesn't work. For example \StrLeft{\myparam}{10}
gives this error: Missing control sequence inserted. ...RNASP.\relax }}{10}{figure.caption.8}
I set this: \def\myparamDet{\detokenize{myparam}}
\myparamDet
equals to this: \hyper@linkstart {link}{\Hy@tocdestname }{\numberline {1.1}{\ignorespaces Optimal solution of RNASP.\relax }}\hyper@-linkend
After detokenize this works: \StrLeft{\myparamDet}{10}
and result is \hyper@lin
So I need two things:
- Getting
1.1
from myparam and setting it to a new variable - Removing
1.1
from myparam
\detokenize
, you discover what\myparam
really equals, and it is not a string, but rather a hyperlink macro with various arguments set. Can you indicate whether the intended use will always be for such hyperlinks?