MiKTeX and proTeXtStrange behaviour of the compiler : HELP

Information and discussion about MikTeX distribution for Windows and the related proTeXt: Installing, updating, configuring
Post Reply
erwin
Posts: 1
Joined: Fri Sep 04, 2009 6:36 pm

Strange behaviour of the compiler : HELP

Post by erwin »

Hello everyone,

I have the following problem and I was hoping someone could help me with it.
When I usually want to write a Latex document, I write my lines in WinEdt and then compile it. When you compile it, you get that DOS window that sometimes stops and shows you the eventual mistakes you made.

Lately, and I don't understand why, when the compiler shows I made an error and then I correct the error and compile again I get :

Runaway argument ?
{\contentsline{section}{\numberline {1.15}Terza legge del

moto
!File ended while scanning use of \@writefile.
{inserted text}
\par
l.20 \begin{document}

?

To be clear : no matter what error I make if I make it once, an then correct it in my file (so the file should be compiled correctly) I always get this error.
This is very annoying because it means I can NEVER do any kind of mistake, non even a typing mistake (forgetting a $ for example), cause even if I correct it, it won't be compiled and I'll get the same error (shown above).

Anyone knows what the problem is ? I never had something like that ? Maybe if I copy all the files in another folder it will occasionally work again but this isn't really a solution !

Many thanks in advance for any help!
Erwin

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Strange behaviour of the compiler : HELP

Post by localghost »

For specific help there are some important things missing:
At first sight it seems that you have forgotten at least one curly brace to end a group.


Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
lloydferris
Posts: 4
Joined: Tue Sep 07, 2010 1:46 am

Re: Strange behaviour of the compiler : HELP

Post by lloydferris »

I have been having the exact same problem all morning, with the exact same error message (so no need to reproduce it again). I am using TexWorks 0.2.3 (r466) on a Mac OS 10.4.11, 1.42 Ghz Power PC G4 with 512MB built in. Please tell me if there is another specific app you need to know about (I am assuming that by "WinEdt" you mean the windows operating system, so I have given you the Mac operating system. Similarly, TexWorks is what I use for Mac instead of MikTex which is for Windows). Here is the last section I edited before I got the error message (after editing it back to it's original, which should have then worked). I don't know how to get it down to a smaller example, as I don't know where in the 1518 line code document the problem is, but I included a line from several chapters before the section in question to show that there was a \begin{flushleft} before the \end{flushleft}:

\begin{flushleft}

blah blah blah text text text running on for several pages

\newpage
\chapter{I Met my Brother on Mt. Cassino}

blah, blah more text


\end{flushleft}
\newpage
\begin{figure}[H]
\centering
\includegraphics[width=1\linewidth, angle=03]{MrEd073.jpg}
\caption{The Lawrence brothers, and friends, on the side of the mountain.}
\end{figure}
\begin{flushleft}



\newpage
\chapter{I Am the Leaning Tower}

Blah blah, more text, etc.

Before I put it back to where it was, I was trying to do the following (note that the difference from the above is in the multicol commands. I am using the multicol package, and it has been working well):

\begin{flushleft}

blah blah blah text text text running on for several pages


\end{flushleft}
\end{multicol}
\newpage
\begin{figure}[H]
\centering
\includegraphics[width=1\linewidth, angle=03]{MrEd073.jpg}
\caption{The Lawrence brothers, and friends, on the side of the mountain.}
\end{figure}
\begin{multicol}{2}
\begin{flushleft}



\newpage
\chapter{I Am the Leaning Tower}

Blah blah, more text, etc.

But as I said, I reverted it back, but cannot lose this error message.

Thanks,
Lloyd
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Re: Strange behaviour of the compiler : HELP

Post by gmedina »

Hi,

This error (at least if you're using TeXworks (I have never used WinEdt)) is due to an incomplete entry in the .aux file (produced by an abrupt termination of the compilation) and can be removed by deleting the auxiliary files (File->Remove Aux Files).
1,1,2,3,5,8,13,21,34,55,89,144,233,...
lloydferris
Posts: 4
Joined: Tue Sep 07, 2010 1:46 am

Re: Strange behaviour of the compiler : HELP

Post by lloydferris »

It worked!!!!! Thank you VERY much.
Two questions, if you have the time to answer: 1) Is there a way I can avoid abrupt terminations in the compilation in the future? I.E., is it likely something I did (like think it was done when it was still compiling), or is it likely just one of those things a computer does every now and then?
2) Am I now missing something from before, like all my logs (whatever they are), now that I have removed the auxiliary files (and does it really matter?)?

Again, thanks. If the conversation ends here without a reply, you have made my day. :D
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Strange behaviour of the compiler : HELP

Post by gmedina »

lloydferris wrote:It worked!!!!! Thank you VERY much.
You're welcome.
lloydferris wrote:1) Is there a way I can avoid abrupt terminations in the compilation in the future? I.E., is it likely something I did (like think it was done when it was still compiling), or is it likely just one of those things a computer does every now and then?
When your code contains an error and you compile, TeX stops at the error and asks you for some action; when using TeXworks you will see a horizontal window at the bottom. On that window you can type "h" (for a brief description of the error and a possible remedy) or "x" to stop and exit normally (I mean non abruptly) the compilation or "q" to force the continuation of the compilation quietly, or "enter" to proceed. If your code contains movile arguments (i.e., arguments that will be written to the aux files) and you don't do any of those actions and simply try to compile again after the error then the .aux file has possibly received an incomplete entry and the new compilation will produce the error message that you mentioned.

Try this simple example:

Code: Select all

Code, edit and compile here:
\documentclass{article}
\begin{document}
$a=b
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
There's (obviously) an error. When you compile TeX stops and issues the message:

Code: Select all

! Missing $ inserted.
<inserted text>
$
l.6
?
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
right below the question mark you will see the window I mentioned before. Type there, for example, "?" and "enter" and the following message will appear:

Code: Select all

Type <return> to proceed, S to scroll future error messages,
R to run without stopping, Q to run quietly,
I to insert something, E to edit your file,
1 or ... or 9 to ignore the next 1 to 9 tokens of input,
H for help, X to quit.
?
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
now you can type any of the options suggested (basically you'll type one of the options I mentioned before). For example, if you simple type "enter" TeX will automatically add internally the missing "$" (obviously not in your code) and will produce the resulting document.

lloydferris wrote:2) Am I now missing something from before, like all my logs (whatever they are), now that I have removed the auxiliary files (and does it really matter?)?
When you remove the aux files, you'll delete the files .log, .aux, (and .lot, .lof, .toc (if the corresponding commands were used)), and some others, but the next successful compilation will produce them again, so it's not a big issue.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
lloydferris
Posts: 4
Joined: Tue Sep 07, 2010 1:46 am

Re: Strange behaviour of the compiler : HELP

Post by lloydferris »

Thanks again, gmedina. This is really helpful.
Post Reply