I keep getting an error on MikTeX

  • Thread starter Thread starter flyingpig
  • Start date Start date
  • Tags Tags
    Error
AI Thread Summary
Users are experiencing a "Missing \begin{document}" error in MikTeX, which typically arises from issues in the document preamble or incorrect syntax. The error can occur if text is placed before the \begin{document} command, as LaTeX expects this command to be the first after the document class declaration. Additionally, users should ensure that the \documentclass command is correctly formatted without any extraneous characters. Suggestions include using code tags for clarity when sharing code snippets. Proper formatting and syntax are crucial for successful compilation in LaTeX.
flyingpig
Messages
2,574
Reaction score
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
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.
 
The stupid backslash!

Thank you very much! you just saved my life.
 
Thread 'Have I solved this structural engineering equation correctly?'
Hi all, I have a structural engineering book from 1979. I am trying to follow it as best as I can. I have come to a formula that calculates the rotations in radians at the rigid joint that requires an iterative procedure. This equation comes in the form of: $$ x_i = \frac {Q_ih_i + Q_{i+1}h_{i+1}}{4K} + \frac {C}{K}x_{i-1} + \frac {C}{K}x_{i+1} $$ Where: ## Q ## is the horizontal storey shear ## h ## is the storey height ## K = (6G_i + C_i + C_{i+1}) ## ## G = \frac {I_g}{h} ## ## C...

Similar threads

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