General ⇒ Compile hangs
-
- Posts: 156
- Joined: Sat Jan 22, 2011 9:55 pm
Compile hangs
I cannot make an MWE (sorry), so I am attaching my whole file and two log files. And I am completely lost as to how to fix this (and a little desperate). Please can someone figure out what's wrong?
The problem might be with the included graphics. But these have all been used in latex documents before, so I doubt it.
TY
- Attachments
-
- includeTheseGraphics.zip
- (51.91 KiB) Downloaded 301 times
-
- Final Exam.log
- (24.63 KiB) Downloaded 282 times
-
- Final Exam - hangs while compiling.log
- (24.63 KiB) Downloaded 281 times
-
- Final Exam - Copy.tex
- (19.95 KiB) Downloaded 290 times
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Compile hangs

Boiling down your example leads me to
Code: Select all
\q Determine which plot shows the strongest linear correlation.
\begin{oneparchoices}
\begin{multicols}{2}
\ch \includegraphics{T2_Q1_C.png}
\ch \includegraphics{T2_Q1_B.png}
\cc \includegraphics{T2_Q1_D.png}
\ch \includegraphics{T2_Q1_A.png}
\end{multicols}
\end{oneparchoices}
\al{C}
By the way, out there are great editors that can help you with your files. The habit of trying to save typing time by hinding question behind a single letter q is bad. Really really bad. To think you can save time, but you don't. And it makes working with colleagues more complicated (i had to look at the definitions first).
That is not the worst tough, but never think of doing that for math stuff. Never ever do it.
-
- Posts: 156
- Joined: Sat Jan 22, 2011 9:55 pm
Re: Compile hangs
Can you clarify why that's such a bad habit?
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Compile hangs
Suppose you want to change macro
\a
to \c
. You cannot simply redefine \a
for some reasons, and you cannot search&replace all letters a (obviously). Replacing all instances of \a might work, but there is still the chance, that you replace something that should not have been replaced. Another issue arises if you are working with others (colleagues/editors). Suppose you have worked with minipages for some time, and later just called mp to get a minipage. You know what it means, but somebody working with your file has to familiarize himself. mp could stand for marginpar as well.
It is hard to explain, maybe another approach, think of your code as plain text (which it is), but more of the readable kind. When writing code, do you think »now, new q, and some ch. But do not forget the cc«
I myself am the verbose kind, and communication is easier this way: Now, new question and some choices. But do not forget the correct choice.
Or another way, when writing a document (maybe not an exam paper), most time is not spent on the few macros. As a fast typer, typing
\begin{flushleft}
takes about a second, maybe second and a half (haven't stopped actually). Where is the time saving compared to just typing \q
instead of \question
?The above are some general advice. You don't have to follow them. But doing support every day, i have seen much worse things. Trust me

Using the right editor, you can use shorthands. You can define
\q␣
to be expanded automatically to \question
saving you keystrokes but keep the code readable. Many users are learning that the hard way. There are two among the great editor, namely vi and emacs.
I prefer vi, but that is a decision of personal taste and comfort.