I keep getting an error on MikTeX

  • Thread starter flyingpig
  • Start date
  • Tags
    Error
In summary, the conversation is about a person having trouble compiling their code and receiving a "Missing \begin{document}" error. The expert recommends checking for any unexpected content in the pre-amble and suggests using [code] tags to post the document again for further assistance.
  • #1
flyingpig
2,579
1

Homework Statement




I don't know what's going on, but i can't compile anything

I keep getting the following error

error said:
This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8)
entering extended mode
(C:\Users\l\Desktop\untitled-10.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman, ngerman, german-x-2009-06-19, ngerman-x-2009-06-19, french, loaded.

! LaTeX Error: Missing \begin{document}.

This was my input

input said:
documentclass{report}

\begin{document}

hi

\end{document}
 
Physics news on Phys.org
  • #2
Hmm, unfortunately, the forum tries to render the \LaTeX code.
The "Missing \begin{document}" error - apart from the obvious cause - also occurs when you put some stuff in the pre-amble which is not expected there. For example.
Code:
\documentclass{article}
Hello
\begin{document}
world!
\end{document}

would also produce the error, because when LaTeX encounters the text "Hello" it expects that you should have written \begin{document} already.

Did you put a backslash before \documentclass, or is that just the quote being mangled? Otherwise, maybe you can post the document again using
Code:
 tags.
 
  • #3
The stupid backslash!

Thank you very much! you just saved my life.
 

FAQ: I keep getting an error on MikTeX

What is MikTeX and why am I getting an error with it?

MikTeX is a distribution of the TeX/LaTeX typesetting system commonly used for creating scientific and mathematical documents. Errors can occur with MikTeX for a variety of reasons, such as incorrect installation, missing files, or incompatible packages.

How do I troubleshoot errors on MikTeX?

To troubleshoot errors on MikTeX, start by checking the MikTeX website for any known issues or updates. Then, try reinstalling MikTeX and making sure all necessary packages are installed. If the error persists, you can also try compiling your document with a different TeX editor or contacting MikTeX support for assistance.

Why am I getting "file not found" errors with MikTeX?

"File not found" errors on MikTeX typically indicate that the necessary file for compiling your document is missing. This could be due to a missing package, an outdated version of MikTeX, or a file being accidentally deleted. Check your MikTeX installation and make sure all necessary files and packages are present.

How can I update MikTeX to fix errors?

To update MikTeX, open the MikTeX Console and click on the "Updates" tab. Then, click "Check for updates" and follow the prompts to install any available updates. Updating MikTeX can often fix errors, as it ensures that you have the latest versions of packages and files.

What should I do if I encounter a specific error on MikTeX?

If you encounter a specific error on MikTeX, try searching for the error message online to see if others have experienced it and found a solution. You can also consult the MikTeX documentation or forums for help. If all else fails, you can try reaching out to the MikTeX support team for further assistance.

Similar threads

Replies
11
Views
5K
Replies
8
Views
11K
Replies
4
Views
12K
Back
Top