4

Steps to reproduce. Minimal LaTeX file test.tex:

\documentclass{article}

\begin{document} \input{test.l2e} \end{document}

file test.l2e:

\oops

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.

Don Hosek
  • 14,078
  • 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 – David Carlisle Apr 27 '21 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 Apr 27 '21 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. – Herb Schulz Oct 23 '21 at 22:56

1 Answers1

2

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


\def\zz#1{#1}
\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.

David Carlisle
  • 757,742