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.

Apparently I am using Tex Live as my LaTeX distribution:

martin@martin-XPS-8300:~$ pdflatex -v

pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian) kpathsea version
6.1.0 Copyright 2012 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX). 
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and the Lesser GNU
General Public License. For more information about these matters, see
the file named COPYING and the pdfTeX source. Primary author of
pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX). Compiled
with libpng 1.2.49; using libpng 1.2.49 Compiled with zlib 1.2.7;
using zlib 1.2.7 Compiled with poppler version 0.20.5

I would like to install additional packages using this guide.

They say:

With TeX Live manually installed, use tlmgr to manage packages individually.

tlmgr install <package1> <package2> ... 
tlmgr remove <package1> <package2> ...

But when I try:

tlmgr install algorithm2e

I get:

tlmgr: command not found

I also do not seem to have a ~/texmf folder, only a ~/.texmf-var folder. Is my installation corrupt or am I doing something wrong?

EDIT:

I found that I actually have a

/usr/local/share/texmf

EDIT2:

The command:

apt-cache policy texlive

results in:

texlive:
  Installed: 2012.20120611-5
  Candidate: 2012.20120611-5
  Version table:
 *** 2012.20120611-5 0
        500 http://jp.archive.ubuntu.com/ubuntu/ raring/main amd64 Packages
        100 /var/lib/dpkg/status

folder.

share|improve this question
    
How did you installed Tex Live? –  Braiam Nov 5 '13 at 11:24
    
I am sorry, but I really do not remember. I think it was through the command line or it was pre-installed. I did not use a package management tool. –  Martin Drozdik Nov 5 '13 at 11:26
    
what's the output of apt-cache policy texlive? –  Braiam Nov 5 '13 at 11:41
1  
If you put the package I linked to in /usr/local/share/texmfthat should work too I think. Then run sudo texhash. –  Minos Nov 5 '13 at 11:49
1  

3 Answers 3

up vote 4 down vote accepted

If you install TeXLive from the ubuntu repositories (Ubuntu software Center). Then tlmgr isn't installed, because all packages should use the system package management system 'apt-get'. Hence you get the error:

tlmgr: command not found

So you will have to install the package manually:

Download algorithm2e.sty here

Then, go to the folder ~/textmf or if it doesn't exist create it:

mkdir ~/textmf

and copy algorithm2e.sty to it. Then run:

sudo texhash

put in root password when requested.

unfortunately the TexLive packages in Ubuntu are not very often updated so some errors might come up.

The alternative is manually installing the entire TexLive distribution and following the guide you posted.

Hope that helps

share|improve this answer
    
Thank you! I tried both putting it into /usr/local/share/texmf as well as creating my own texmf folder in the home directory and running texhash, but it did not work. But when I include the algorithm2e.sty directly into the same folder as the .tex file that I am compiling, it works. –  Martin Drozdik Nov 5 '13 at 11:59
1  
The canonical answer is tex.stackexchange.com/questions/1137/… –  Martin Schröder Nov 6 '13 at 11:56
    
Could you try putting it in /usr/local/texlive/texmf-local if it works I will update my answer. –  Minos Nov 6 '13 at 12:48

go to ubuntu software center, and install the software TeX Live: Additional fonts.

share|improve this answer
    
This is correct in pointing to the Software Center (for some packages at least) - but the question was about any packages, not just fonts. –  guntbert Sep 13 at 14:48

TeXLive is divided into collections. Every TeXLive package belongs to one (and only one) collection, for example the package algorithm2e belongs to the collection science. For simplicity, most distributions, including Ubuntu, do not have a package for every individual TeXLive package, but group together all the TeXLive packages in a given collection and distribute the entire collection as a single package.

In Ubuntu, the TeXLive collection foo is distributed as the Ubuntu package texlive-foo, so for example the collection science is distributed as the Ubuntu package texlive-science. Hence, the Ubuntu answer to your question about how to install the TeXLive package algorithm2e is that you need to install the Ubuntu package texlive-science. (Of course, a side effect is that it will also install all the other packages in the science collection.)

The standard way to determine which collection a TeXLive packages belongs to is to use tlmgr:

$ tlmgr info algorithm2e
package:     algorithm2e
category:    Package
shortdesc:   Floating algorithm environment with algorithmic keywords.
longdesc:    Algorithm2e is an environment for writing algorithms. An algorithm becomes a floating object (like figure, table, etc.). The package provides macros that allow you to create different keywords, and a set of predefined key words is provided; you can change the typography of the keywords. The package allows vertical lines delimiting a block of instructions in an algorithm, and defines different sorts of algorithms such as Procedure or Function; the name of these functions may be reused in the text or in other algorithms.
installed:   Yes
revision:    28749
sizes:       doc: 661k, run: 137k
relocatable: Yes
cat-version: 5.0
cat-date:    2013-01-06 21:16:44 +0100
cat-license: lppl
collection:  collection-science

But in Ubuntu, tlmgr is not installed. I like to use apt-file:

$ apt-file search algorithm2e.sty
texlive-science: /usr/share/texlive/texmf-dist/tex/latex/algorithm2e/algorithm2e.sty

or you can search for it in the "Search the contents of packages" section of http://packages.ubuntu.com/.

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.