Generalhelp getting started

LaTeX specific issues not fitting into one of the other forums of this category.
i#&*computers
Posts: 10
Joined: Fri May 18, 2007 3:33 pm

help getting started

Post by i#&*computers »

I am totally new to texniccenter, and I seem to have som problems downloading. I have downloades texniccenter and miktex and reinstalled adobe reader, but it won't build. What am I missing?
Also, when the wizard is on I have to tell it where the file directory is, but it says none of my directories have latex in them. What am I doing wrong. Please help me because I don't know anymore.
I am already feeling like going back to Word!
Thanks a million

Recommended reading 2024:

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

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

User avatar
pumpkinegan
Posts: 91
Joined: Thu May 03, 2007 10:29 pm

Re: help getting started

Post by pumpkinegan »

Do you have Ghostscript installed? You would need this if you want LaTeX >> PS >> PDF. You can get it at: http://www.cs.wisc.edu/~ghost/

However you should be able to pdfLaTeX right now.
In TeXnicCenter go to Build >> Define Output Profiles. Click on LaTeX => PDF. The "Path to the (La)TeX compiler" should be something like: C:\Program Files (x86)\MiKTeX 2.5\miktex\bin\pdflatex.exe

If this is set correctly you should be able to pdfLaTeX. From the drop build down menu select "LaTeX => PDF" and "Build and View". (Alternatively do this through the build menu).

Note pdfLaTeX only works with pdf, jpeg or png figures.

Patrick.
Last edited by pumpkinegan on Mon May 21, 2007 6:49 pm, edited 1 time in total.
i#&*computers
Posts: 10
Joined: Fri May 18, 2007 3:33 pm

Re: help getting started

Post by i#&*computers »

Nope, it is not working :cry: . Now it says it is not compatible with acrobat, so acrobat can not open a file. There must be something else.
Besides, the path for the wizard does not work: there is no bin file.
User avatar
pumpkinegan
Posts: 91
Joined: Thu May 03, 2007 10:29 pm

help getting started

Post by pumpkinegan »

Acrobat has nothing to do with getting the document from LaTeX into PDF. It is only a viewer for the pdfLaTeX output. Therefore, do not worry too much about Acrobat errors for the time being. (To remedy this, go to "Build >> Define Output Profiles >> LaTeX => PDF" and in the "Viewer" tab verify that the "Path of executable" is correctly set to where acrord32.exe is, for example: C:\PROGRAM FILES (X86)\ADOBE\ACROBAT 7.0\READER\ACRORD32.EXE)

More important is to verify that you can compile your tex file to pdf by pdfLaTeX.
Besides, the path for the wizard does not work: there is no bin file.

There is no bin file. In the folder C:\Program Files (x86)\MiKTeX 2.5\miktex\bin (or where ever it is located on your system) you should find the executable pdflatex.exe. You just need to point TeXnicCenter to that location, and compile with pdfLaTeX to get a pdf file.

What happens when you build with LaTeX => PDF? Do you see any files in the folder of you tex file?
i#&*computers
Posts: 10
Joined: Fri May 18, 2007 3:33 pm

Re: help getting started

Post by i#&*computers »

Wow, thanks a lot, it seems to be working. I just can not put figures is my file (I use the 'includegraphics{figurename} command). Did something go wrong with my installation or somthing? Graphix is on my computer, so that is not it.
User avatar
pumpkinegan
Posts: 91
Joined: Thu May 03, 2007 10:29 pm

help getting started

Post by pumpkinegan »

To insert graphics you will have to include a graphicx package in the document preamble. For example:

Code: Select all

\documentclass[12pt,a4paper]{article}
\usepackage{graphicx}
Then to insert the figure into the document, you will have to use a figure environment. For example:

Code: Select all

%%------------------
\begin{figure}[ht]
    \centering
    \includegraphics[width=\linewidth]{figure_name}
    \caption{Description of figure.}
    \label{fig:figure_label}%
\end{figure}
%%------------------
Some things worth noting:
  • "[ht]" means place "here" and/or at "top" of the page. A "!" before the "h" will try and force it more.
  • "\centering" centers the graphic.
  • "width=\linewidth" means that the graphic will be the width page margins. Many alternatives exist, such as: "width=6cm" or "width=0.5\linewidth".
  • "figure_name" is the name of the figure, and you do not need to specify the file extension (although some may suggest it is a good idea). The actual figure file will have to be in the same folder as the tex file (but there are ways to change this and make the tex folder tidier---ask me if you are interested).
  • Remember pdfLaTeX is only compatible with jpg, png, or pdf. If you work with vector (postscript) graphics consider LaTeX => ps2pdf compilation or eps2pdf.exe (a great application to convert eps figures to pdf).
  • "\caption" is the figure caption. The figure number is automatically generated.
  • "\label" is the figure label. You can reference this figure number anywhere in the document. For example: "As shown in Figure \ref{fig:figure_label} ...".
Patrick.
i#&*computers
Posts: 10
Joined: Fri May 18, 2007 3:33 pm

Re: help getting started

Post by i#&*computers »

Nope, that does not seem to be working. It does not seem to recognize the preamble anymore. Every package I add, it types the word between the {} in the document, so my pdf document has the words graphicx, amsmath, url, and some other things in it. It does recognise the \usepackage part, and the brackets itself.
Maybe it is Acrobat that is wrong, I don't know. Does anybody know what's wrong?
User avatar
pumpkinegan
Posts: 91
Joined: Thu May 03, 2007 10:29 pm

help getting started

Post by pumpkinegan »

Would you post your tex file, as it would be easier to see where the problem is? Basically the tex file should look something like:

Code: Select all

\documentclass[12pt,a4paper]{article}
\usepackage{graphicx}
\usepackage{url}

\begin{document}

\title{Title of document}
\author{Firstname Surname}

\maketitle

\section{Name of Section}
Default text .....
\begin{figure}[ht]
    \centering
    \includegraphics[width=\linewidth]{figure_name}
    \caption{Description of figure.}
    \label{fig:figure_label}%
\end{figure}
Default text .....

\end{document}
i#&*computers
Posts: 10
Joined: Fri May 18, 2007 3:33 pm

Re: help getting started

Post by i#&*computers »

latex does not seems to recognise the \begin{document} anymore. It keeps telling me it cannot find it. Because of this, I can not see if all the packages are working. What am I doing wrong?
User avatar
pumpkinegan
Posts: 91
Joined: Thu May 03, 2007 10:29 pm

Re: help getting started

Post by pumpkinegan »

So if you copy the sample code I posted, paste it into a tex file, open with TeXnicCenter, and run pdfLaTeX, you do not get a pdf with a title, author, date, section, and so forth? If so, this seems strange to me, and I am running out of advice.

What LaTeX distribution and operating system are you using and how did you install LaTeX?
Post Reply