2

I installed MiKTeX and ran a test file on TeXworks, but am getting an error message.

\documentclass{article}
\begin{document}
This is some sample text.
\end{document}

I get this error message when attempting to compile to a PDF:

This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9)
entering extended mode
("C:\Documents and Settings\USER\Desktop\TeX\tex\plain\vertex\test.tex"
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic, 
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, greek, gujarati, hindi, hungarian, icelandic, indonesian, inter
lingua, irish, italian, kannada, kurmanji, latin, latvian, lithuanian, malayala
m, marathi, mongolian, mongolianlmc, monogreek, ngerman, nynorsk, oriya, panjab
i, pinyin, polish, portuguese, romanian, russian, sanskrit, serbian, slovak, sl
ovenian, spanish, swedish, swissgerman, tamil, telugu, turkish, turkmen, ukengl
ish, ukrainian, uppersorbian, usenglishmax, welsh, loaded.
! Undefined control sequence.
l.1 \topmatter

? 

Now I believe this is happening because my test.tex. file is not in the tex\plain\vertex directory, however, I can't figure out how to make TeXworks automatically look in the directory I want.

Also, when I try one of the templates from tex\plain\vertex, I get the same error message as well.

  • 1
    Where did you save your real test.tex? – Ulrike Fischer Jun 3 '13 at 15:55
  • USER\Desktop\TeX\Workspace – jsan Jun 3 '13 at 15:58
  • I don't think the one you've described is the problem you really have... In fact the error refers to a \topmatter command that can't be found in your example. I think you are compiling one of the examples found in /tex/plain/vertex folder with pdflatex instead of with pdftex (or plain TeX) – karlkoeller Jun 3 '13 at 15:58
  • 2
    Well as the file mentioned in your error is in \USER\Desktop\TeX\tex\plain\vertex this seems to indicated that you created the folder Workspace inside the main texmf-tree of miktex (which you seemed to have named TeX). Don't do this. Miktex doesn't like if if you try to compile things inside a texmf tree. Put your own documents in some external folder. E.g. USER\Documents\TeX. – Ulrike Fischer Jun 3 '13 at 16:21
  • @UlrikeFischer That looks like an answer - why not post it as one, especially since the solution includes general statements that could certainly be helpful to others! – Ari Brodsky Jun 4 '13 at 22:20
4

As the file mentioned in your error is in \USER\Desktop\TeX\tex\plain\vertex this seems to indicated that you created the folder Workspace inside the main texmf tree of miktex (which normally is named something like miktex 2.9 but which you seemed to have named TeX).

Don't do this. Miktex doesn't like if if you try to compile tex files which resides in a texmf tree. It finds files in a texmf tree only through the FNDB - which means that you would have to recreate the FNDB before the compilation (so that is can find the .tex and after the compilation (so that it can find the .aux) and again after your created e.g. a .bbl.

Put your own documents in some external folder. E.g. USER\Documents\TeX. This will avoid the trouble and is also much safer as you don't have to fear that miktex overwrites them during an update.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.