LaTeX Fixing Latex Errors: Tips for Achieving a Polished Document

  • Thread starter Thread starter tgt
  • Start date Start date
  • Tags Tags
    Errors Latex
AI Thread Summary
The discussion centers around handling errors in LaTeX documents. Participants note that LaTeX generates two types of messages: errors and warnings. Errors indicate significant issues that may prevent proper output, while warnings, though often ignorable, highlight aesthetic problems or potential mislabeling that should be addressed for better document quality. One user mentions having 12 errors but still being able to compile and view the document in PDF format, raising the question of whether it's necessary to fix these errors if the output appears acceptable. Others emphasize the importance of correcting even minor issues to avoid complications in future projects, suggesting that maintaining good practices now can prevent more serious problems later. The conversation also touches on specific commands for managing subsections, recommending the use of simpler commands for clarity and ease of use. Overall, the dialogue reflects a balance between achieving immediate results and fostering long-term document quality.
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
Views
2K
Replies
23
Views
3K
Replies
7
Views
3K
Replies
1
Views
1K
Replies
4
Views
3K
Replies
3
Views
8K
Back
Top