I'm trying the following:








And the result is the following:

enter image description here

So, I don't know where the " comes from. The above example is just a demo. The concatenated string \newstring´´ will later be used inside a \label command.

Any hints are welcome!


2 Answers 2


The " is just the character \ printed using OT1 encoding, try with


To see a \

So it really is \ and can be used as such in internal command names.

Note however it would generally not be safe to use such a string as the argument to \label as while the \ is inert while being written out to the aux file it will be interpreted as the escape character while the aux file is read.

  • Sorry David, I forgot to mention that I just want the string concatenated and no \ at the begin. You're right: I don't want the backslash inside the \label.
    – aronadaal
    Aug 1, 2016 at 11:14
  • 2
    @aronadaal in that case just remove the \expandafter\string\csname and \endcsname and possibly use \edef instead of \def, depending on what you want. Aug 1, 2016 at 11:17

When you do


the control sequence name is transformed into a list of characters (all having character code 12, except for possible spaces that keep category code 10) preceded by the character having the same ASCII code as the current value of \escapechar (usually 92, that is, the backslash).

When you do \expandafter\string\csname<code>\endcsname, you first make a token out of the full expansion of <code> and then represent it as before; in your example you get


as a string of characters.

What you probably want is


that does the full expansion as well, but doesn't make a control sequence name out of it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.