Conversion Toolscompiling tex file

Information and discussion about output converters related to LaTeX (e.g. dvips, ps2pdf, ...)
Post Reply
kentman234
Posts: 8
Joined: Wed Dec 09, 2015 11:40 pm

compiling tex file

Post by kentman234 »

Hello I've just installed Texmaker, and i'm totally new to it.

I tried to compile a prepared tex file that I have but it simply didn't do anything. I have tried all levels of compiling:DVI,Ps, PDF..

Can you give me an advice please? Thank you.

Recommended reading 2024:

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

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

kentman234
Posts: 8
Joined: Wed Dec 09, 2015 11:40 pm

Re: compiling tex file

Post by kentman234 »

I found that when i try to compile it to PDF, it shows file not found! Other tex files worked peoperly..but still i can't believe the file doesn't exist because it does exist.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

compiling tex file

Post by Johannes_B »

Have you installed a TeX distribution like TeX Live or MikTeX?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10321
Joined: Mon Mar 10, 2008 9:44 pm

Re: compiling tex file

Post by Stefan Kottwitz »

Welcome to the forum!

Just try to give us more information. Do you get another error message? Is there a file produced in your folder with the file name extension .log? If yes, please post it here as attachment.

I think, the PDF file for viewing cannot be found, because there's a error in the LaTeX syntax so there's no file produced.

Stefan
LaTeX.org admin
kentman234
Posts: 8
Joined: Wed Dec 09, 2015 11:40 pm

Re: compiling tex file

Post by kentman234 »

The error message I get is: Cannot execute command: pdflatex.exe -synctex=1 -interaction=nonstopmode '***'.tex
User avatar
Stefan Kottwitz
Site Admin
Posts: 10321
Joined: Mon Mar 10, 2008 9:44 pm

Re: compiling tex file

Post by Stefan Kottwitz »

As the pdflatex command doesn't work, you don't have TeX installed (or not properly). This happens if one installed simply an editor but not TeX itself.

Stefan
LaTeX.org admin
kentman234
Posts: 8
Joined: Wed Dec 09, 2015 11:40 pm

Re: compiling tex file

Post by kentman234 »

So tell me what can I do in this case?
kentman234
Posts: 8
Joined: Wed Dec 09, 2015 11:40 pm

Re: compiling tex file

Post by kentman234 »

Ok, I installed Mikitex and it works fine now. I run the file, there are many errors but the main one is:

! LaTeX Error: Can be used only in preamble.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

compiling tex file

Post by Johannes_B »

You probably have something in your document body like \usepackage, which can only be used in the preamble (hence the message).

I suggest to read some basic introductory material. This is much much better than to search on the internet using google. The linked material is of high quality and free, google on the other hand looks for keywords. As a starter, you might not know the right keywords, which leaves you quite soon lost with strange code. Reading LaTeX for complete novices just takes a couple of hours (get coffee and some cookies ;-)) and you have all you need to properly start.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10321
Joined: Mon Mar 10, 2008 9:44 pm

Re: compiling tex file

Post by Stefan Kottwitz »

If you got any question while reading the introduction, you can ask here in the forum, of course. We can explain the background, reasons, or further things.

It's good to have read introductory information as a basis, that makes it easier here to talk and to fix harder issues. :-)

Stefan
LaTeX.org admin
Post Reply