Getting started with Latex on Ubuntu

Updated: 02 September 2024

The number of possible options for getting started with Latex can be a little overwhelming! This is what I did:

Install texlive at approx 250MB

sudo apt install texlive

Then, from this answer on StackOverflow, create file test.tex

\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}

Create a .dvi file

latex test.tex

xdvi is an open-source computer program for displaying TeX-produced .dvi files under the X Window System on Linux.

Optionally, view the output file with xdvi

xdvi test.dvi &

Produce a pdf

pdflatex test.tex

Leave a comment