# [OS X TeX] Weird behavior

Alain Schremmer Schremmer.Alain at verizon.net
Fri Aug 13 14:15:22 EDT 2004

I once mentioned a talent I have which is to bring banks to a
standstill.

It seems it occasionally extends to TeXshop. I will do something rather
innocuous like dragging a pdf graphics into a source file. TeXshop
dutifully wraps it as

%\includegraphics[]{Figures/04_07.pdf}

But then, it won't typeset. The console runs amok, I have to force quit
TeXshop and, after that, when I try to typeset again, it gives a
message (which, since TeXshop is stuck, I cannot just copy/paste here.
Is that on purpose?) ending with

Writing index file Math4Learning.idx
(JMath4Learning.aux)  (It's not really a J)
Runaway argument?
{contentsline {figure}{\numberline {4.6}}{ignorespaces A \textbf {\emph
\ETC.

!File ended while scanning use of \@writefile
<inserted text>
\par
1.69 \begin{document}
%begin{document}(that's something I have to flag it in red.)
?

Now I do a lot of dumb things and I am used to it and I just comment
out the offending line and re typeset. Sometimes I have to undo a
couple of things but it always works.

Well, not quite always and that is where it begins getting weird: in
the above case it still wouldn't typeset and the console would still
give me the same message. But it gets weirder.

The first time something like that happened, I had no idea what I had
done to cause it. (I wasn't dragging a graphics as I normally just
copy/paste the code from another figure and just change the id number
of the graphics.) So, I started commenting out bigger and bigger chunks
with still the same result. I commented everything south of the
preamble out with still the same result. And I had not changed the
preamble.

So, I scratched my head a bit and I opened a new file in which I
copy-pasted chunk by chunk, the contents of the old one in the new one.

And the weird thing is that it worked the two or three times this had
happened. This time, I didn't even bother with chunks and copy/pasted
the whole thing. And it worked!

I thus now have a procedure down pat (maybe one day I will even be able
to write an apple script) and so I offer this only as a weird but
harmless example of the perversity of things programmed.

Regards
--schremmer

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>