4

When running XeLaTeX on my document, I frequently get error messages like this:

)
Runaway argument?
! File ended while scanning use of \next.
<inserted text> 
                \par
<*> myfile.tex

This is virtually useless, as it doesn't tell me where it thinks the runaway argument is. \par is not helpful in locating the error.

Googling around, I saw some suggestions to use \errorcontextlines=20 or the like, but this has no effect for me.

How can I get TeX to give me more context so I know where the error is actually happening?

BrenBarn
  • 212
  • The error is at the file close denoted by ) the matching ( in the log shows you which file it is. Normally you get a line number but here the error is at the end of file. – David Carlisle Mar 02 '14 at 01:55
  • 3
    You may be interested in --file-line-error to get c style errors. –  Mar 02 '14 at 01:58
  • @DavidCarlisle: Presumably it's at the end of the file because it thinks it's a runaway argument and it "runs away" all the way to the end of the file, but it would be more useful to know where the beginning of that runaway argument was. – BrenBarn Mar 02 '14 at 02:12
  • Normally TeX would give you the 'beginning' of the runaway argument. As it doesn't, it suggests the error is right at the end of the file: as David says, you can find out which file using the parenthesis. – Joseph Wright Mar 02 '14 at 08:27
  • 1
    @BrenBarn perhaps but given the tiny fragment of context that you have provided, it is impossible to give more help. You could generate a complete small document that makes that error and post the full error context then someone could tell you how to extract the information from the log to help locate the error. – David Carlisle Mar 02 '14 at 10:35
  • @user202729: Well, actually that would be a duplicate of this, considering this was asked 6 years before the other one. – BrenBarn Nov 25 '22 at 21:35
  • Well, technically yes. But that one has answers so just post there if any future readers come across this question. – user202729 Nov 25 '22 at 21:36

0 Answers0