Suppose I want to typset P\' olya correctly in TeX but suppose my computer does not have the key invoking the character/symbol ' (This is of purely theoretical interest). Now, TeX lets you use \rq to represent that symbol. Then how do I typeset the word Polya correctly using these tools?

The first command that comes to mind is \expandafter, however, both \expandafter\\lq or \expandafter\{\lq} give me errors and do not work


1 Answer 1


Since we have, in plain.tex

508 \def\lq{`} \def\rq{'}

(line number added for reference), you can just type


that will expand \rq to ' and build a control sequence token out of this.

You can't use \expandafter that way:


is four tokens


(the bullet just separates tokens), so you are trying to expand l, which does nothing at all, then put the expansion after the \\ token (that in plain TeX happens to be defined); the result is


which is not very helpful. ;-)

Similarly, \expandafter\{\lq\} is four tokens


Here \lq is expanded to ' and you get

  • so csname is a primitive control sequence?
    – Kun
    Commented Apr 28, 2016 at 22:29
  • @Kun Yes, a very helpful one.
    – egreg
    Commented Apr 28, 2016 at 22:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .