Debian

How to Install LaTeX on Debian

LaTeX is an open-source tool allowing users to write a well-organized, fully formatted document. Academic Researchers and Scientists use this tool for writing research papers since it includes built-in tools that can quickly add tables, flow charts, figures, and codes. To add the features, the users must add a code and compile the tex document to generate a PDF File. The PDF file can then easily be viewed on any PDF viewer installed on your system.

You can install LaTeX on Debian from this article’s guidelines.

How to Install LaTeX on Debian

To install LaTeX on Debian, you must follow the below-given steps:

Step 1: Update Debian Repository

First update the Debian repository from the following command:

sudo apt update && sudo apt upgrade

Step 2: Install LaTeX on Debian

The Debian repository makes the LaTeX installation simple since it already includes packages, such as texlive-base, texlive-latex-recommended, texlive, texlive-latex-extra and texlive-full and they can be installed from the “apt” command. However, you can go with the texlive-latex-extra package, a recommended one on the system to use LaTeX features. You can go with texlive-full, if you have enough space on the Debian system.


Here I am going with texlive-latex-extra, which can be installed from the following command:

sudo apt install texlive-latex-extra -y

Step 3: Confirm LaTeX Installation

After completing the LaTeX installation on Debian, confirm the installation using the following command:

latex --version

How to Use LateX on Debian

To use LaTeX on Debian, first create a sample file with .tex extension (the LaTeX default extension) on through nano editor:

nano myfile.tex

Inside the file, add the following Latex code:

\documentclass{article}

\usepackage{hyperref}

\begin{document}

<Type Text Here> \LaTeX

\url{<URL>}

\end{document
}

Save the file using “CTRL+X”, add “Y” and press enter to exit.

To compile the LaTeX file on Debian, run the following command:

pdflatex myfile.tex

The above command creates a PDF file in a directory where the tex file is saved.

After the compilation, the file can be viewed on the Debian system from any PDF viewer.

You can create any document with LaTeX on the Debian system through the above steps.

How to Remove LaTeX from Debian

The Debian users can use the following command to remove LaTeX from the system:

sudo apt remove texlive-latex-extra -y

Conclusion

LaTeX is an effective documentation tool that makes it easier for users to create a fully-formatted research document. There are several versions of LaTeX that you can install on Debian through the “apt” command. However, the guide mentioned above shows you the installation of texlive-latex-extra on Debian and how to use LaTeX on the system.

About the author

Awais Khan

I'm an Engineer and an academic researcher by profession. My interest for Raspberry Pi, embedded systems and blogging has brought me here to share my knowledge with others.