views:

1179

answers:

3

I have just begun using LaTeX. I am working in Windows and am using TeXnicCenter as my editor. When I build and output, having the following code:

\documentclass{article}

\begin{document}

This is a test document

\end{document}

I do get a document that has the words "This is a test document". If I change the sentence in the above code to "This is a test", and build and output - the change gets reflected.

However, say after doing the above, I change the code to this:

\documentclass{article}

\usepackage[table]{xcolor}

\begin{document}

Hello World!

\end{document}

Now if I build and output, I don't get "Hello World!" in the output, I get the last thing I had before making this change ("This is a test"). Is this a bug in TeXnicCenter or LaTeX or am I missing something here? Thanks for your answers.

Edit:

I also see this line in the new output log: '("C:...\size10.clo") latex.exe: GUI framework cannot be initialized' and in the end of the log LaTeX results says "0 Page(s)" (were generated I guess?)

+1  A: 

I'm not sure about xcolor but using some packages such as hyperef for instance means you now have to compile your latex two or three times before a change propagates to the final output.

Whenever I want to see the final output I compile atleast 3 times and only then look.

On every pass latex updates some intermediate file and then only after a few compiles your change ends up in the final output. This unfortunately is how LaTeX works.

You might get some indication about this from the warnings count. Usually after a change you'll get some warnings that will dwindle down after a few compiles. When the warnings cound stays the same it usually means you've hit the baseline where every intermediate output is updated with everything else.

shoosh
I tried compiling it multiple times, the outputs did not change. There were no warnings in the log - I am just looking at the last line: o Error(s), 0 Warning(s), 0 Bad Box(es), 0 Page(s). But something is definitely wrong - since it says 0 Page(s) when I add the line with xcolor.
aip.cd.aish
+4  A: 

Let me google that for you:

http://miktex.org/2.8/issues

First item.

shoosh
Haha, yes, I found the solution after I posted my edit. That is what I found as well. :)
aip.cd.aish
A: 

http://miktex.org/2.8/issues

Please go to miktex directory and try to find mo.exe (Miktex option). Remedy: start MiKTeX Options and choose either Yes or No (but not "Ask me first") for the option "Install missing packages on-the-fly".

park