I see that numerous people have asked a similar question. At the risk of annoying you LaTeX experts, the problem is, as I have expressed before, that LaTeX is a truly awful language. Having said that, someone who is a reasonably competent programmer in Java/C++/Perl/Python etc ought to be able to debug a program that stops working.
Currently, the only way I have to debug a failure is to either quickly undo if I have luckily only written a few lines, or to comment out blocks of code until I identify the region where the problem is. This is completely unacceptable. If that's the only way, then the language is at fault. I am looking for any help in how to find an error WITHOUT having to edit hundreds of lines.
I compile my code and the console given an error on line 709:
\materials
\begin{itemize}
\item photoresistor (3k)
\item resistor (2.2\kohm)
\end{itemize}
The \materials command is defined as:
\newcommand{\materials}{{\bf Materials:}}
The item with photoresistor is the one giving the error. Presumably this means that there are unclosed \begin{itemize} commands before?
Q1: What are the possible causes of this error. Could there be any OTHER unclosed entity causing it? What about \begin{enumerate} ?
Q2: How can I find it, aside from searching every \begin{itemize} and manually looking for the matching \end{itemize}
Q3: Is there any code I can write to assert that everything must be closed, or to display the location of any open \begin? This would go a long way towards solving this problem!!!
\quoteor similar; are you perhaps using\flushleftor\flushright? – egreg Jun 14 '16 at 13:24\bfis deprecated and not defined by default (although unrelated to your error), there is lots of additional traing you can turn on in the log\tracinggroups=1for example will give more info on groups,\tracingallgives more info on everything – David Carlisle Jun 14 '16 at 13:34\end{document}just before the cited\materialsline, and run the job. at the end of the log, it will tell you at what "level" you finished on, if it's not zero. always look for this in a log, and close any open levels before adding more to the file. it will save you much grief later on. – barbara beeton Jun 14 '16 at 13:44C-c ]to close the current environment, and so discover which environments are currently open. – Andrew Swann Jun 14 '16 at 14:30If you post these as answers, I would pick one as an answer. At least its something.
– Dov Jun 14 '16 at 16:15\end{itemize}to a\begin{itemize}or the lack thereof, thus its easy to see if something is missing. And for "having to edit hundreds of lines": use and editor with block comment functionality - this makes such task easy as cake. – samcarter_is_at_topanswers.xyz Jun 14 '16 at 16:56