Steps to reproduce. Minimal LaTeX file test.tex:



file test.l2e:


run pdflatex or xelatex on test and hit E at the error prompt.

pdflatex says:

pdflatex:calledit: unexpected if_ptr=5 not in range 1..2,from input_stack[2].namefield=2378

xelatex says:

xelatex:calledit: unexpected if_ptr=6 not in range 1..2,from input_stack[2].namefield=2230090

lualatex calls the editor correctly.

  • would be better to raise on texk or texlive list I think. I have a feeliing I have seen this come up elsewhere. Interestingly if the top level file is just \input test.l2e and you use plain pdftex it opens the editor on e Commented Apr 27, 2021 at 19:23
  • 1
    What's odd is that I've had this work with other files being input in my book without problem... I thought perhaps it was the file extension but some fiddling showed I was still getting the error. 🤷🏻‍♂️ I'll have to join texk/texlive and raise the issue there. That's what happens when you take a 20-year break from the community.
    – Don Hosek
    Commented Apr 27, 2021 at 19:35
  • I've run this under TeX Live 2021 isntalled by MacTeX and fully updated. When typesetting using pdflatex I get the expected error. This was using TeXShop as a front end. Commented Oct 23, 2021 at 22:56

1 Answer 1


to simplify the test case a bit you can use plain tex and

\zz{\input test.l2e }

Note you need the wrapping macro, if you just call \input directly it works, presumably related to the input_stack[2] in the error when it fails.


You must log in to answer this question.

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