Texmaker and TeXstudio! LaTeX Error: Can be used only in preamble.

Information and discussion about Texmaker, an integrated LaTeX environment for several platforms, and the related TeXstudio
Post Reply
Lybrial
Posts: 1
Joined: Thu Oct 06, 2011 7:54 pm

! LaTeX Error: Can be used only in preamble.

Post by Lybrial »

Hey Guys,

i use the newest TexMaker Version on a Windows 7 PC with
MikTex 2.9. However, i tried to compile a little Script today
but it didnt work.

! LaTeX Error: Can be used only in preamble. was the Error Message
and he explains about that some packages are not installed.
MikTex PackageManager says that all Packages are installed.....

Maybe a Fail of TexMaker?
Someone a idea?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10340
Joined: Mon Mar 10, 2008 9:44 pm

! LaTeX Error: Can be used only in preamble.

Post by Stefan Kottwitz »

Hi,
Lybrial wrote:i tried to compile a little Script today
but it didnt work.
why don't you show us the little code? So we would not have to guess what you are doing.
Lybrial wrote:! LaTeX Error: Can be used only in preamble. was the Error Message
That means you used a command after \begin{document} which can be used only before, such as \usepackage for example.
Lybrial wrote:and he explains about that some packages are not installed.
Which packages? For which commands in your code?

Lybrial wrote:MikTex PackageManager says that all Packages are installed.....
How does it say it? What's the message? I doubt MiKTeX knows about all packages in general.
Lybrial wrote:Maybe a Fail of TexMaker?
I guess it's not a problem of Texmaker. Texmaker is just an editor, which calls the LaTeX compiler of MiKTeX.

Perhaps provide some information.

Stefan
LaTeX.org admin
Post Reply