GeneralWrong Line Numbers in Error Messages

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Jessica_Beame
Posts: 3
Joined: Sun Jul 03, 2011 2:50 pm

Wrong Line Numbers in Error Messages

Post by Jessica_Beame »

This is a basic question, but I couldn't find it anywhere on the web:
I compile with LaTex a source file. The source file has a big preamble, but NO include or input files.
Why do line numbers in error messages are completely wrong?

:(

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Re: Wrong Line Numbers in Error Messages

Post by kaiserkarl13 »

Please post an example. Otherwise, it's like asking, "why doesn't my program compile" without posting any source code.
Jessica_Beame
Posts: 3
Joined: Sun Jul 03, 2011 2:50 pm

Re: Wrong Line Numbers in Error Messages

Post by Jessica_Beame »

I don't have a specific example. It happens to me all the time. I'm trying to understand what are the possible reasons for this. One reason is include and input files. But I don't have these, so I would like to know what are the other possible options.

Thanks.
kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Re: Wrong Line Numbers in Error Messages

Post by kaiserkarl13 »

If you don't give me an example, I can't help you!

One possible suggestion is that you may have lines that are automatically wrapped by whatever editor you are using, so that editor is reporting fictional line numbers that don't correspond to the REAL line numbers. Open it with line wrap off and you'll see the line numbers TeX actually sees.

If the above paragraph doesn't address your problem, then you need to post an example or NO ONE will be able to help you.
Jessica_Beame
Posts: 3
Joined: Sun Jul 03, 2011 2:50 pm

Re: Wrong Line Numbers in Error Messages

Post by Jessica_Beame »

Kaiserkarl13, you're right!! I turned off the "wrap" option, and the correct line appears in the message!
:D

Thanks! I knew it was something simple like this! :lol:
Post Reply