Notes on Ubuntu (Linux) computing

Brief notes on installation, setup and other tasks in the Ubuntu world

Install Tex Live 2012

with 2 comments

The default LaTeX version (the one you find in the repository) for Ubuntu 12.04 LTS is Tex Live 2009. For most purposes, the Tex Live 2009 version is fine, and I would suggest using the repository version to make your life easier. However, I want to use the latest elements of pgf and pgfplots for creating graphics and plots, so I need a current Tex Live install. Previously I have done this manually, but it seems there is now an “official backport” of Tex Live 2012 —

NOTE — this all assumes that you have NOT already added the LaTeX version from the repository. If you have, you will have to do slightly different commands. Again, see here.

Using the information for the links above, we first add the ppa, then update and install (as always, enter each line separately):

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

Add fonts

I needed to install the fonts-extra, not found in the ppa — reflected, in may case, by LaTeX not finding bbm.sty.

sudo apt-get install texlive-fonts-extra

Adding packages

Unfortunately, this is not a full distrbution and many packages are not included. I will add details for adding specific packages here. In general, the install process is pretty simple.

pgfplots

The pgfplots website is here, and provides a download link. This provides a zip archive, in my case: pgfplots_1.6.1.tds.zip

Using ideas from the pgfplots manual, and this nice blog entry, we do the following:

  • Create a directory in the LaTeX search path:
      mkdir -p ~/texmf/tex/latex
      
  • Unzip the contents of the package, downloaded above, in this directory.
  • The pgfplots manual suggests that you run texhash at this point:
      sudo texhash
      

Other packages

Adding other packages is the same as above, except there is no need to create the ~/texmf/tex/latex directory. Just find the package, place the unzipped folder in ~/texmf/tex/latex, and run sudo texhash, as above.

Advertisements

Written by Chris S

October 5, 2012 at 7:29 pm

2 Responses

Subscribe to comments with RSS.

  1. Hi

    I installed texlive 2012 on ubuntu 12.04 LTS 64 bit machine following the instructions given in the following web

    How do I install the latest TeX Live 2012?

    which is exactly as you recommended in the above.

    After, a successful installation( I think), I got the following error when I do a latex/pdflatex to compile a give tex file

    This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)

    restricted \write18 enabled.

    entering extended mode

    (./user_guide.tex

    LaTeX2e

    Babel and hyphenation patterns for english, dumylang, nohyphenation, lo aded.

    (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls

    Document Class: article 2007/10/19 v1.4h Standard LaTeX document class

    (/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo))

    ! LaTeX Error: File `html.sty’ not found.

    Type X to quit or to proceed, or enter new name. (Default extension: sty)

    so would you help me in getting a solution?

    Thank you in advance

    GGS

    October 25, 2012 at 3:03 pm

    • Hi GGS,

      I think your latex file needs `html.sty’ — as I said in the post, the install of TeX Live 2012 is not a full install and you will run into issues with packages that you have to add by hand. Under the heading ‘Adding Packages’, above, I described how I solved this issue for pgfplots and revtex.

      Usually, there are two approaches to solving this:

      1) Find a copy of html.sty and put it in the same directory as your latex document and try running latex again. Depending on what you are doing this may, or may not, work.

      2) Find the larger package that contains html.sty — in this case, a search on google indicates that latex2html is a likely candidate — see http://www.latex2html.org/ for information. Then, install the package using the information that comes with the package. If all else fails, you should be able to find html.sty in the downloaded tar.gz archive.

      I hope that helps.

      livesoncoffee

      October 26, 2012 at 12:01 am


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: