TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

pdfTeX version 1.40.0 introduced the primitive \pdfprimitive which the manual describes as follows.

This command executes the primitive meaning of the following control sequence, if it has been redefined or made undefined. If the following control sequence is undefined and never was a primitive, nothing happens and no error is raised. If the control sequence was initially expandable, \pdfprimitive expands either. Otherwise \pdfprimitive doesn’t expand.

(I think “either” should be “too.”)

Is there a way to \let a control sequence to the primitive version? Something like


The idea being that \input could be restored to its original meaning (at least locally). Obviously


is not going to work just as


is not going to work.

share|improve this question
up vote 7 down vote accepted

No, I'm afraid not. When you \let or \def the original definition of primitive to something, the original meaning is no longer available as an accessible token. \pdfprimitive can be used to access the internal definition of the primitive, but that is not the same as 'regenerating' the accessible token. The nearest you can get is


for expandable primitives or


for non-expandable ones.

share|improve this answer
And it would seem that that doesn't work for \endcsname. My use case was fairly ridiculous anyway, so it's not like this is a show stopper. =) Thanks. – TH. Mar 18 '11 at 11:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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