7

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?)

Aishwar
  • 9,284
  • 10
  • 59
  • 80
  • 1
    Can you look at the log? Are there any errors? – Josh Lee Nov 13 '09 at 14:45
  • I don't think, it is a latex bug. Probably it has to do with TeXnicCenter. Try removing usepackage, then try to build it. – bhups Nov 13 '09 at 15:01
  • @jleedev: I compared the log before and after the addition of the usepackage - this is what changes: in the LaTeX-Result line, "0 Page(s)" is shown instead of "1 Page(s)" and I see the line '("C:\...\size10.clo") latex.exe: GUI framework cannot be initialized - this seems to have passed before. – Aishwar Nov 13 '09 at 16:23
  • @bhups: If I remove the usepackage it works, but my question is why does it not work when I have the usepackage – Aishwar Nov 13 '09 at 16:24
  • This error still mystifies me... I mean, it's not like there's a `DISPLAY` environment variable to unset or anything, so how does TeXnicCenter *cause* this error in the first place? – SamB May 07 '11 at 18:24

4 Answers4

5

Let me google that for you:

http://miktex.org/2.8/issues

First item.

shoosh
  • 76,898
  • 55
  • 205
  • 325
  • Haha, yes, I found the solution after I posted my edit. That is what I found as well. :) – Aishwar Nov 14 '09 at 02:02
  • 1
    Link is currently broken, could not find an alternative, I emailed the author but if someone can find a cached copy we might include it here. – bcleary Jan 28 '13 at 22:17
5

Changing the "Install missing packages on-the-fly" option to "Yes" doesn't always work. I was having this same problem (using Miktex 2.9 and Texniccenter RC 1.0), and that setting was set to "Yes." The problem started for me when I chose a specific package repository in the "Packages" tab of the Miktex Options window, rather than keeping the default of (I changed it because the repository that it always chooses is kinda slow). Unfortunately, I couldn't find any way to revert back to the random repository, so I reinstalled Miktex, and left the Package repository option on random.

GordonM
  • 364
  • 1
  • 4
  • 6
3

http://docs.miktex.org/2.8/relnotes/#id517080

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".

MattAllegro
  • 6,455
  • 5
  • 45
  • 52
park
  • 31
  • 1
0

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
  • 76,898
  • 55
  • 205
  • 325
  • 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. – Aishwar Nov 13 '09 at 16:19