0

I am doing an empirical work on STATA and I used the command sutex in order to obtain the LaTeX code for summary statistics tables. I am just copying and pasting it on TeXworks (pdfLaTeX file) as said in the help page of the command but I obtain this error:

error

I am pretty dummy with LaTeX language so maybe the error is something stupid. The command lines are these:

command lines

2
  • 2
    provided nothing has been excluded from the example as shown, the error message missing \begin{document} is correct. you need to insert that line somewhere after \documentclass{report} and before \begin{table}. Commented May 26, 2015 at 14:52
  • After \documentclass{report} you should have \begin{document} and at the end you should have \end{document}
    – gman
    Commented May 26, 2015 at 14:53

2 Answers 2

3

The error message "Missing \begin{document}" means that you are missing a \begin{document} to begin your document. Google could have told you that, by the way. Please refer to https://en.wikibooks.org/wiki/LaTeX/Document_Structure for more information.

1
  • Thank you all of you guys. And sorry but my mind's gone blank, I'm working from this morning in front of the pc and I did not well interpret the error message.
    – PhDing
    Commented May 26, 2015 at 16:48
0

Try the following:

\documentclass{report}
\begin{document}
\begin{table}[tb]\centering
\begin{tabular}{cc}
\hline
a & 1\\
b & 2\\
\hline
\end{tabular}
\caption{My nice table}
\end{table}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .