Skip to content

Instantly share code, notes, and snippets.

@carlosal1015
Last active March 27, 2024 14:51
Show Gist options
  • Save carlosal1015/932dd45c589e9b65bd1c4ab11b31154c to your computer and use it in GitHub Desktop.
Save carlosal1015/932dd45c589e9b65bd1c4ab11b31154c to your computer and use it in GitHub Desktop.
Installation of LaTeX on Debian.

Installing TeX Live for Debian users

TeX Live for Debian

Hello πŸ˜„, I'm Oromion πŸ‡΅πŸ‡ͺ. I'm an undergraduate student of mathematics and in this video tutorial, we will show how to download and install the last version of the TeX Live Manager in order to use LaTeX for all users on your distribution of Debian.

What is LaTeX? πŸš€

LaTeX is a document preparation system. In my opinion, is very useful and funny for writing beautiful math equations like that Green's theorem:

$$
\color{yellow}\Large\oint_{\scriptstyle C}(L\, \mathrm{d}x + M\, \mathrm{d}y) =
\iint_{D} \left(\frac{\partial M}{\partial x} -
\frac{\partial L}{\partial y}\right)\, \mathrm{d}x + M\, \mathrm{d}y
$$

or detailed graphics with PGF, for example

or with Tikz (TikZ ist kein Zeichenprogramm)

Requirements before starting πŸ†

  • Permanent internet connection, the download may take between 1 and two hours.
  • Use your favorite shell (like Bash or Z shell), we will use some commands that we will explain below.
  • Install wget, gksu and perl-tk if not yet installed in your sistem. Do it in the terminal with sudo apt install wget gksu perl-tk.
  • A web browser such as Mozilla Firefox, Chromium for example.

We will use the commands sudo, mkdir, chown, whoami, id and tar. If you yet not familiarized with these commands, do not worry, just follow my steps, right?

Checking the current status πŸ“‘

Please, ascertain you have TeX and LaTeX installed on your computer, for this we will execute the next commads:

carlosal1015@Oromion:~$ tex --version & latex --version

if you already have installed an earlier version of TeX Live and wish to update it, type the command

carlosal1015@Oromion:~$ sudo su
root@Oromion:/home/carlosal1015# rm -rf /usr/local/texlive/2018
root@Oromion:/home/carlosal1015# exit
carlosal1015@Oromion:~$ rm -rf ~/.texlive2018

specifying the year of the TeX Live version. We recommend two directories to install TeX Live. The first is to create /opt/texlive which is used for third-party programs or use the default path of the TeX Live installer.

The first one will not have conflict with its package manager (APT or APTITUDE).

carlosal1015@Oromion:~$ sudo su
root@Oromion:/home/carlosal1015# mkdir /opt/texlive
root@Oromion:/home/carlosal1015# chown carlosal1015.carlosal1015 /opt/texlive # In my case
root@Oromion:/home/carlosal1015# exit
carlosal1015@Oromion:~$ cd Downloads/
carlosal1015@Oromion:~$ wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
carlosal1015@Oromion:~$ tar -xf install-tl-unx.tar.gz
carlosal1015@Oromion:~$ cd install-tl-20181010/
carlosal1015@Oromion:~$ ./install-tl

Now, we can start with the installation.

Steps to follow πŸ“œ

First way

Second way

  1. Check if please visit the TeX Live web page.
  2. Download this file install-tl-unx.tar.gz.
  3. Change directory to the compressed file and unzip your file with the command tar -xf install-tl-unx.tar.gz.
  4. Change directory to install-tl-20180301 and execute the TeX Live Manager installer with sudo ./install-tl.

After the installation (adding the $PATH) ⌨️

First way

Now we need to add the $PATH to the root's profile or the user's profile, in my case, I will do it with the user.

gedit ~/.bashrc	# ~/.zshrc
export PATH=/opt/texlive/bin/x86_64-linux:$PATH
export MANPATH=/opt/texlive/texmf-dist/doc/man:$MANPATH
export INFOPATH=/opt/texlive/texmf-dist/doc/info:$INFOPATH

Second way

gedit ~/.bashrc	# ~/.zshrc
export PATH=/usr/local/texlive/2017/bin/x86_64-linux:$PATH
export MANPATH=/usr/local/texlive/2017/texmf-dist/doc/man:$MANPATH
export INFOPATH=/usr/local/texlive/2017/texmf-dist/doc/info:$INFOPATH
source ~/.bashrc	# ~/.zshrc

Finally, create a nice file helloworld.tex and try to compile with pdflatex. πŸ˜ƒ

Disclaimer ⚠️

I am not responsible for the damage caused. It's just a joke, everything will be fine.

Renderized thanks to $\KaTeX$.

Credits 🌠

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment