Fixing Latex Errors: Tips for Achieving a Polished Document

  • Context: LaTeX 
  • Thread starter Thread starter tgt
  • Start date Start date
  • Tags Tags
    Errors Latex
Click For Summary

Discussion Overview

The discussion revolves around handling errors in LaTeX documents, particularly focusing on the importance of correcting errors and warnings, as well as the implications of ignoring them. Participants share their experiences and strategies for achieving a polished document while managing LaTeX errors.

Discussion Character

  • Debate/contested
  • Technical explanation
  • Exploratory

Main Points Raised

  • Some participants question the necessity of fixing errors if the document compiles and displays correctly in PDF format.
  • Others argue that ignoring errors can lead to incomplete outputs and suggest that both errors and warnings should be addressed for a more polished document.
  • One participant notes the distinction between errors and warnings in LaTeX, emphasizing that errors indicate something is wrong, while warnings may indicate aesthetic issues that should not be overlooked.
  • There is a discussion about the specific nature of errors, with one participant seeking clarification on how to properly end a subsection in LaTeX.
  • Some participants suggest using simpler commands like \section and \subsection instead of the \begin and \end environments to avoid confusion.
  • One participant reflects on the balance between correcting minor issues and the potential impact on the overall presentation of longer documents.

Areas of Agreement / Disagreement

Participants express differing views on the importance of correcting LaTeX errors, with some advocating for addressing all issues while others feel that if the output is satisfactory, corrections may not be necessary. The discussion remains unresolved regarding the best approach to handling errors.

Contextual Notes

Some participants mention specific line numbers and commands, indicating a reliance on particular LaTeX structures, but there is no consensus on the best practices for error correction.

tgt
Messages
519
Reaction score
2
Do you do it? I tend to not do it as long as it looks fine.
 
Physics news on Phys.org
What sort of errors do you mean? Errors in latex tend to make it not compile!
 
cristo said:
What sort of errors do you mean? Errors in latex tend to make it not compile!

I've got 12 errors currently and I'm still able to edit and view it in PDF.
 
tgt said:
I've got 12 errors currently and I'm still able to edit and view it in PDF.

You didn't really answer my question: what sort of errors are you talking about? Presumably you mean aesthetic errors, or typos?
 
tgt said:
I've got 12 errors currently and I'm still able to edit and view it in PDF.
First thing to note here is that LaTeX has two types of "bad messages": Errors and Warnings (you may know this).

Errors mean that there is certainly something wrong and incomplete with your output. Even if you can view the output, likely some pages are missing or something. Fix those, by all means.

Warnings you can ignore, but shouldn't. They mean that for example some lines are too long (which look ugly) or labels and crossreferences are off. You will probably want to fix those as well.

Despite all this, cristos remarks still apply: You are certainly doing everyone (including yourself) a favor if you are as verbose (but concise!) about your problem as you can. It is usually best to flat out post exactly what you have and what is not working. So copy the errors latex gives you from the command line (this should work by selecting all the relevant output with the mouse and copying it via the context menu) and post them here. If you are a bit more latex savvy and can tell an error/warning from regular latex output, then you can make our lives a lot easier by posting the errors alone.

At any rate, please be more specific with your questions, because you'll get help much quicker, and, for that matter, at all.

regards,
/W
 
It's got i.e '1.84 \end{subsection}' What does 1.84 mean? I do have trouble locating the error. How do I end a subsection?
 
tgt said:
It's got i.e '1.84 \end{subsection}' What does 1.84 mean? I do have trouble locating the error. How do I end a subsection?
At line 84 of your file, you must be starting a new subsection with a "\begin{subsection}{Subsection heading goes here}" command before (or probably without) ending the previous subsection with an "\end{subsection}" command. Even better, you could replace all of your "\begin{subsection}{Subsection heading goes here}" commands with "\subsection{Subsection heading goes here}" commands.
 
las3rjock said:
At line 84 of your file, you must be starting a new subsection with a "\begin{subsection}{Subsection heading goes here}" command before (or probably without) ending the previous subsection with an "\end{subsection}" command. Even better, you could replace all of your "\begin{subsection}{Subsection heading goes here}" commands with "\subsection{Subsection heading goes here}" commands.


How would I end a subsection?

'\end{name of subsection}'?
 
tgt said:
How would I end a subsection?

'\end{name of subsection}'?

No, by "\end{subsection}" (literally). BUT. Don't even bother. Just use the \section, \subsection, etc. commands, rather than the environments (I didn't even know they existed until now).

regards,
/W
 
  • #10
The thing is if it compiles and viewing with PDF is possible with the desired output, why correct the errors?
 
  • #11
Longer documents (at least) which have prepared often yield some warnings which am too lazy to correct if get the desired output and tend to let them be, but in general they tend to spill over to the document and something looks awful. Especially occasionally when the document should really be presentable and not just "about there". Sort of a balancing act. Overall think it's a bit like writing code ... if you write 100 pages of error filled crap the next time around you'll probably do it proper and adjust "your ways" to accomplish that.
 
  • #12
tgt said:
The thing is if it compiles and viewing with PDF is possible with the desired output, why correct the errors?
You want to correct your minor bad habits now so that it will be easier to debug more serious errors in the future.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 23 ·
Replies
23
Views
3K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
5K
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 3 ·
Replies
3
Views
9K