Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Fixing up errors in Latex?

  1. Aug 21, 2008 #1

    tgt

    User Avatar

    Do you do it? I tend to not do it as long as it looks fine.
     
  2. jcsd
  3. Aug 21, 2008 #2

    cristo

    User Avatar
    Staff Emeritus
    Science Advisor

    What sort of errors do you mean? Errors in latex tend to make it not compile!
     
  4. Aug 21, 2008 #3

    tgt

    User Avatar

    I've got 12 errors currently and I'm still able to edit and view it in PDF.
     
  5. Aug 21, 2008 #4

    cristo

    User Avatar
    Staff Emeritus
    Science Advisor

    You didn't really answer my question: what sort of errors are you talking about? Presumably you mean aesthetic errors, or typos?
     
  6. Aug 22, 2008 #5
    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
     
  7. Aug 22, 2008 #6

    tgt

    User Avatar

    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?
     
  8. Aug 22, 2008 #7
    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.
     
  9. Aug 22, 2008 #8

    tgt

    User Avatar


    How would I end a subsection?

    '\end{name of subsection}'?
     
  10. Aug 22, 2008 #9
    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
     
  11. Aug 22, 2008 #10

    tgt

    User Avatar

    The thing is if it compiles and viewing with PDF is possible with the desired output, why correct the errors?
     
  12. Aug 23, 2008 #11

    PerennialII

    User Avatar
    Science Advisor
    Gold Member

    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.
     
  13. Aug 23, 2008 #12
    You want to correct your minor bad habits now so that it will be easier to debug more serious errors in the future.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Fixing up errors in Latex?
  1. LaTeX error (Replies: 4)

  2. Latex (Beamer) error (Replies: 1)

  3. Table error in latex (Replies: 5)

Loading...