# Get started with Latex on Linux [closed]

## Problem

I’m impressed by is-latex-worth-learning-today and a slew of Windows how-tos.

What is the best way to get someone started with LaTeX on Linux?

How do you make a pdf from it without using the OOO Word processor?

Update:

Thank you for all of your suggestions. Using the Beamer class, I was able to construct a fantastic ppt: http://github.com/becomingGuru/gids-django-ppt This method was considerably superior to using powerpoint and other such tools in my opinion.

Those interested can look at the TEX file, which has a number of custom instructions as well as a presentation.

## Solution #1

You’ll need to install it first:

If you’re running Ubuntu or Debian, try something like:

<code>apt-get install texlive</code>


…I’ll get it set up.

RedHat or CentOS require the following:

<code>yum install tetex</code>


Note that this requires root access, so if you aren’t already logged in as the root user, either use su to switch to root or prefix the commands with sudo.

The next step is to obtain a text editor. Any editor will suffice, so use whoever you feel most at ease with. Advanced editors, like as Emacs (and vim), add a lot of capability and can assist you make sure your syntax is right before you start to generate your document output.

Make a file called test.tex and fill it with material, such as the following example from the LaTeX primer:

\documentclass[a4paper,12pt]{article}
\begin{document}

The foundations of the rigorous study of \emph{analysis}
were laid in the nineteenth century, notably by the
mathematicians Cauchy and Weierstrass. Central to the
study of this subject are the formal definitions of
\emph{limits} and \emph{continuity}.

Let $D$ be a subset of $\bf R$ and let
$f \colon D \to \mathbf{R}$ be a real-valued function on
$D$. The function $f$ is said to be \emph{continuous} on
$D$ if, for all $\epsilon > 0$ and for all $x \in D$,
there exists some $\delta > 0$ (which may depend on $x$)
such that if $y \in D$ satisfies
$|y - x| < \delta$
then
$|f(y) - f(x)| < \epsilon.$

One may readily verify that if $f$ and $g$ are continuous
functions on $D$ then the functions $f+g$, $f-g$ and
$f.g$ are continuous. If in addition $g$ is everywhere
non-zero then $f/g$ is continuous.

\end{document}


Once you have this file, you’ll need to run latex on it to get some output (in the form of a.dvi file, which can be converted to a variety of other formats):

latex test.tex


This will generate a lot of output, which will look something like this:

=> latex test.tex

This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)
entering extended mode
(./test.tex
LaTeX2e &lt;2003/12/01&gt;
Babel &lt;v3.8d&gt; and hyphenation patterns for american, french, german, ngerman, b
ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e
stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis
h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size12.clo))
No file test.aux.
[1] (./test.aux) )
Output written on test.dvi (1 page, 1508 bytes).
Transcript written on test.log.


…don’t bother about the majority of this output; what matters is the Output stated on the test.dvi line, which indicates that the test was successful.

Now you must use xdvi to view the output file:

xdvi test.dvi &


This will open a window containing the well formatted output. You can quit this by pressing ‘q,’ or you can leave it open and it will update automatically when the test is finished. The dvi file has been changed (so whenever you run latex to update the output).

You can make a PDF of this by using pdflatex instead of latex:

pdflatex test.tex


…and then there’ll be a test. Instead of the test.dvi file, a pdf file was created.

After you’ve verified that everything is operating properly, I recommend heading to the LaTeX primer page and going over the items there, as you’ll need features for the documents you’ll be writing.

Things to think about in the future are:

## Solution #2

You’ll need to install a couple of packages to get started with LaTeX on Linux:

## Solution #3

Start using Lyx; you can use Latex just as easily with it as you can with OOO-Writer. It allows you to take a deeper dive into Latex by manually adding Latex-Code to your document. After installation, you can access PDF with a single click. Lyx is a cross-platform application.

## Solution #4

It depends on your Linux distribution and editor preferences, but I would recommend starting with Kile (a KDE software) because it is simple to learn and installs most of the necessary tools for LaTex and PDF production. Take a look at the screenshots to see what I mean.