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?
36 Answers
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-tkThen create a mount point:
$ sudo mkdir /mntChange 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=perltkThis 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.
After installation, close the terminal and open a new terminal:
$ sudo umount /mntCheck 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.dviYou can also make a .pdf file:
$ pdflatex sample2e.texIf you want to modify settings or get more packages, do this in TeX Live Manager 2013:
$ sudo tlmgr -guiTo 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.debYou may need to install libpoppler-qt4-3.deb first.
References:
6Just install the relevant packages from the repositories:
sudo apt-get install texlive-latex-baseThat will get you a basic LaTeX system. For a more complete installation with more packages and fonts, use this:
sudo apt-get install texlive-latex-base texlive-latex-extra texlive-latex-recommended texlive-fonts-recommended 2 Three ways to go:
- Install the Ubuntu packages for texlive. Described by terdon, Easiest, but they've a tendency to be outdated and only a subset of what would be available through the tlmgr.
- Install texlive from the latest iso image. Described by Medulla Oblongata. Currently available: 2013 - outdated by almost a year, so the first step after installation would be to update it using tlmgr.
- Install using the network installer available at tug.org. This actually is easy, and I'd recommend it, especially if you want to keep installations across different platforms in sync.
see also: How do I update my TeX distribution? on tex.sx, especially for the first (community wiki) answer explaining the TeX Live update scheme.
You can also use Kile - an Integrated LaTeX Environment.
You can easily install it from ubuntu software center.
The most recent version of TeX Live packaged for Ubuntu 12.04 is 2012, which is available from the TeX Live back-ports PPA. It is relatively easy to install from the terminal, start by removing any absolute packages that may be installed:
sudo apt-get remove texlive* Then add the PPA and update:
sudo add-apt-repository ppa:texlive-backports/ppa
sudo apt-get updateFinally install:
sudo apt-get install texliveThis will install the most common modules. If you come to need more specific modules then you will have to install the "extra" package (which at the last check was almost 1 Gb):
sudo apt-get install texlive-latex-extraFor someone coming from Windows I would recommend TexMaker as GUI (available from the Software Centre). This is what we feed to students and they manage mostly well with it.
I ran sudo apt-get install texlive-full which has some of the disadvantages listed above including that it might not be super-up-to-date, but I've not found any problems. (Yet)
Has the advantage that it just installs everything in one quick command. Some may argue this is bad practice / a waste of hard disk space - but I use ubuntu because it's quick and (usually) works, not because it saves me a few hundred megabytes of disk space over other linux distros...