This tutorial will show the step-by-step installation process of the LaTeX package, editor, and compiler on Debian 10 and Debian 11. We will also show you various tools for editing and compiling LaTeX files and how to convert LaTeX .tex files to PDF. LaTeX is free software and a typing system specialized for technical and scientific documents. It is especially very useful for writing documents including mathematical formulas and equations. It is excessively used by academia and the technological community.

Installing LaTeX in Debian

For installing LaTeX in Debian, you need to follow the following steps in order:

Step 1: Installing LaTeX package:

There are multiple LaTeX packages offered by Debian that the user can install. Some of them are:

  • texlive-science
  • texlive-pictures
  • texlive-metapost
  • texlive-xetex
  • texlive-luatex
  • texlive-games
  • texlive-latex-extra

The user can install any package of his choice by running the following command in the terminal. For this particular guide, I am installing the texlive-latex-extra package.

$ sudo apt install texlive-latex-extra

You can simply replace the package-name ‘texlive-latex-extra’ with the name of the LaTeX package you want to install in the above-mentioned command. For clarity, look at the highlighted attached image below.

<img alt="Install LaTeX" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/01/echo/word-image-1503.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="103" src="data:image/svg xml,” width=”794″>

Once you press hit enter, it will start installing the LaTeX, as shown in the below image:

Getting Started with LaTeX on Debian 11 Debian

The process will take some time to complete.

Step 2: Confirm the installation of LaTeX package

Once you have done with installing the laTeX package of your own choice, confirm it by performing the following bullet points:

  • Open any available text editor on your PC.
  • Write some demo code.
  • Save the code with the extension of .tex, for example, “File.tex”.

Look at the below image.

<img alt="LaTeX Editor" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/01/echo/word-image-1505.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="236" loading="lazy" src="data:image/svg xml,” width=”796″>

Step 3: Compile a .tex file to PDF through the command

Once you have written the code and saved it as .tex, now compile the file to a PDF by running the pdflatex command in the terminal. If the user has the pdflatex, he first has to install texlive-extra-utils before applying the pdflatex command.

<img alt="Use pdflatex app" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/01/echo/word-image-1506.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="24" loading="lazy" src="data:image/svg xml,” width=”460″>

Running the above command will convert the File.tex into File.pdf. Open the home folder and look for the CONVERTED PDF FILE. You will find a pdf file along with the .tex file in the home folder as shown highlighted in the below image.

<img alt="Convert LaTeX .tx file to .pdf" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/01/echo/word-image-1507.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="484" loading="lazy" src="data:image/svg xml,” width=”797″>

You can also see the converted file through the following command:

$ evince File.pdf

Look at the attached image below.

<img alt="View PDF file on Debian" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/01/echo/word-image-1508.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="65" loading="lazy" src="data:image/svg xml,” width=”796″>

Step 4: LaTeX editor and compiler installation:

After getting done with the installation of the LaTeX package, the user can also install LaTeX editor and compiler so that he can easily work on document editing and compiling in LaTeX. There are multiple LaTeX editors and compilers provided by Linux. Such as,

  • gedit latex plugin
  • LyX latex editor and compiler
  • Texmaker latex editor and compiler
  • LaTeXila latex editor and compiler and others.

The user can go with any of the choices, hence for this particular guide I am going to install:

  • LyX latex editor and compiler.
  • LaTeXila latex editor and compiler.

Step 5: Installation of LyX latex editor and compiler

  • Open the terminal and write the following command for installing LyX.
$ sudo apt install lyx

<img alt="Install Lyx" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/01/echo/word-image-1509.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="25" loading="lazy" src="data:image/svg xml,” width=”515″>

Once it gets installed, search the LyX from the search bar and open it. It will display the menu as shown in the below -attached image:

<img alt="Ly graphical LaTeX editor" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/01/echo/word-image-1510.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="539" loading="lazy" src="data:image/svg xml,” width=”692″>

  • For creating a file in LyX, follow the following points:
  1. Go to the top left corner.
  2. Click on the File field.
  3. Click on the New field.

<img alt="Lyx document processor" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/01/echo/word-image-1511.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="542" loading="lazy" src="data:image/svg xml,” width=”689″>

A new file will open, write code in the file and save the file with the name of your choice. For this particular guide, I am saving the file as File1. Look at the attached image for further clarity.

<img alt="Edit LaTeX file in Lyx" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/01/echo/word-image-1512.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="305" loading="lazy" src="data:image/svg xml,” width=”685″>

After getting done with LyX, we will now explain how to install LaTeXila.

Step 6: Installation of LaTeXila latex editor and compiler

  • Open the terminal and write the following command for installing LaTeXila.
$ sudo apt install latexila

<img alt="Install latexila" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/01/echo/word-image-1513.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="23" loading="lazy" src="data:image/svg xml,” width=”534″>

Once it gets installed, search the LaTeXila from the search bar and open it. It will display the menu as shown below:

<img alt="Latexila" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/01/echo/word-image-1514.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="565" loading="lazy" src="data:image/svg xml,” width=”791″>

For creating a file in LyX, follow the following points:

  1. Go to the top left corner.
  2. Click on the File field.
  3. Click on the New field.

<img alt="Using LaTeXila" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/01/echo/word-image-1515.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="572" loading="lazy" src="data:image/svg xml,” width=”801″>

A new file will open, write code in the file and save the file with the name of your choice. For this particular guide, I am saving the file as Filelate. Look at the attached image for further clarity.

<img alt="Edit LaTeX file" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/01/echo/word-image-1516.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="565" loading="lazy" src="data:image/svg xml,” width=”791″>

This is how you can create a new file in LaTeXila, edit your files and compile them.