Ubuntu – Easy way to install TeX Live (and TeX Studio) in Ubuntu 12.04

latex

I have recently switched to using Linux (Ubuntu 12.04) and I need to install a LaTeX distribution and editor. I'm reasonably experienced with LaTeX on Win7, so is there an easy way to get LaTeX up and running?

Best Answer

It's probably best to download an .iso image of a TeX distribution from CTAN, texlive2013.iso for example - it's ~2GB. Put this into your Downloads folder.

Just ensure that you have the perl-tk package installed before using the GUI. If not, open a terminal and go:

$ apt-get install perl-tk

Then create a mount point:

$ sudo mkdir /mnt

Change the current directory, mount the .iso and start installation

$ cd ~/Downloads
$ sudo mount -t iso9660 -o ro,loop,noauto texlive2013.iso /mnt
$ cd /mnt
$ sudo ./install-tl --gui=perltk

This opens up a nice GUI. You can to decide what to install in Installation collections. Also change the Create symlinks in system directories as in the screenshot so that the directories will be all laid out for you. This means you won't need to poke around and modify your system files post-installation.

perltk

After installation, close the terminal and open a new terminal:

$ sudo umount /mnt

Check if everything is OK:

$ tex --version

TeX 3.1415926 (TeX Live 2013)
kpathsea version 6.1.1
Copyright 2013 D.E. Knuth.

Try processing a .tex file and preview a PostScript file.

$ latex sample2e.tex
$ dvips sample2e.dvi

You can also make a .pdf file:

$ pdflatex sample2e.tex

If you want to modify settings or get more packages, do this in TeX Live Manager 2013:

$ sudo tlmgr -gui

To install a LaTeX editor, (e.g. TeX Studio), download the relevant .deb file into Downloads folder and install

$ cd ~/Downloads
$ sudo dpkg -i texstudio_2.7.0_i386.deb

You may need to install libpoppler-qt4-3.deb first.

References:

TUG documentation

TeX Live docs

Starlinq blog