Install LaTex on Ubuntu
Learn how to install the LaTeX support in Ubuntu for creating beautiful technical and academic documents.
LaTex is a document markup language that is mainly used to write scientific papers (involving complex symbols).
And in this tutorial, I will walk you through how you can install LaTex on Ubuntu.
Also, I will be sharing free resources to learn LaTex in the end!
How to install LaTex on Ubuntu
In the default repository of Ubuntu, you will find multiple LaTex packages available from which the most common ones are:
Package Name | Size |
---|---|
texlive-base | 160 MB |
texlive-latex-recommended | 203 MB |
texlive | 269 MB |
texlive-latex-extra | 464 MB |
texlive-full | 5903 MB |
Where the texlive-base
package is the base install and will include the essential elements only.
So I would recommend going with texlive
or texlive-latex-extra
if you are just getting started.
Sure, if you have plenty of free space, you can go with texlive-full
package and you'll have everything including multiple languages.
Now, let's get started with the installation.
You can use any of the shown packages with the apt install command. I'm going with texlive-latex-extra
so I will be using:
sudo apt install texlive-latex-extra texlive-extra-utils
Here, the texlive-extra-utils
package will be useful for converting your LaTex files into PDFs.
Once you are done with the installation, let's put the installation to the test.
I will show how you can convert your LaTex to PDF.
Using LaTeX in command line
Here, I will be using the nano text editor but if you want, you can choose from one of the best LaTex editors for Linux.
nano sample.tex
And enter the following:
\documentclass{article}
\usepackage{hyperref}
\begin{document}
So what is the most annoying thing in Ubuntu (if we ignore snaps)?\LaTeX
\url{https://https://learnubuntu.com/}
\end{document}
Save changes and exit from the nano text editor.
Now, you can use the pdflatex
command to convert your file to PDF:
pdflatex sample.tex
Once done, you can use any of your preferred PDF viewers.
Here, I will be using Evince PDF viewer that comes pre-installed in Ubuntu:
evince sample.pdf
Working as expected!
But you would be better with a proper GUI-based editor. Here are some recommendations.
Want to Learn LaTex? Here are some free resources
If you are a beginner and want to kick-start the LaTex journey, you can refer to Overleaf's 30 min brief guide:
Similarly, you can refer to LaTex's official learning guide:
I hope you will find them helpful.
And if you have any doubts, let me know in the comments.
A software engineer who loves to tinker with hardware till it gets crashed. While reviving my crashed system, you can find me reading literature, manga, or watering my plants.