Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
3  
In 14.04 Ubuntu has the TeXLive 2013 packaged --- chances are that 12.04 has quite an old version. Depending on what you do, YMMV. Read the answer by @tatjana-heuser and then choose from there... –  Rmano Apr 29 at 16:58
    
Related: How to install “vanilla” TeXLive on Debian or Ubuntu? at TeX.SE. –  ΕΠΑ Sep 8 at 10:01

5 Answers 5

Just install the relevant packages from the repositories:

sudo apt-get install texlive-latex-base

That 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
share|improve this answer
1  
This certainly qualifies as easiest installation, if somewhat incomplete since Ubuntu only packages a subset of the packages available through tlmgr, and some are outdated compared to ctan. If texlive is needed in a productive environment, it may be better to do a vanilla texlive installation with tlmgr updates for better control of syncronous installations and better control when things are updated. (Never update during the final preprint stages of an important document...) –  Tatjana Heuser Apr 29 at 15:57
    
On Ubuntu 12.04 this will install TexLive 2009, not at all recommended. There are multiple issues with the modules in the texlive-latex-extra package that prevent successful compilation of various features. –  Luís de Sousa Aug 12 at 8:28

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

share|improve this answer
    
+1 for effort but you're kind of reinventing the wheel here. The LaTeX packages are available in the Ubuntu repositories. –  terdon Apr 28 at 23:00
1  
@terdon Cheers. I just wanted to share what I did after the Starlinq blog confused me so much. –  Medulla Oblongata Apr 28 at 23:04
2  
And thank you very much for taking the effort to post this! For future reference though, just use the ones from the repos as I show in my answer. It is much easier to install that way and much easier to upgrade and deal with all the packages. –  terdon Apr 28 at 23:05
3  
+1 - good documentation, and the way to go if you want an up-to-date texlive installation. Unfortunately, the one in the repos has a tendency to lag behind quite significantly. Also the way to go if you're running texlive on several platforms and prefer to keep them in sync. (Or you'll never stop tracing back why your book project develops half a page offset by page 916, when translated on a different system. (Leading to a file going to print with all the don't-wrap-at-this-point tweaks done in vain and all the horrors in print)) –  Tatjana Heuser Apr 29 at 15:50

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.

share|improve this answer

You can also use Kile - an Integrated LaTeX Environment.

You can easily install it from ubuntu software center.

enter image description here

share|improve this answer
2  
Yes, but Kile is just an editor. You still need a LaTeX distribution to run it. While installing kile through the repos will bring in most of the needed packages, that's a pretty roundabout way of installing LaTeX and you end up with extra stuff you don't need as well as missing some basic LaTeX packages that won't be listed as kile dependencies. –  terdon May 1 at 22:20
    
Thank you... I didnt knew that. I used Kile for making presentations and report making during my degree days, without much difficulties :) –  Bibi424 May 2 at 11:19

The most recent version of TeX Live packaged for Ubuntu 12.04 is 2012, which is available from the TeX Live backports PPA. It is relatively easy to install from the terminal, start by removing any absolote packages that may be installed:

sudo apt-get remove textlive*

Then add the PPA and update:

sudo add-apt-repository ppa:texlive-backports/ppa
sudo apt-get update

Finally install:

sudo apt-get install texlive

This 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-extra

For 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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.