You are not logged in.

#1 2008-07-10 23:28:43

bozack
Member
From: Denmark
Registered: 2008-07-10
Posts: 45
Website

[SOLVED] TexLive and new packages

Hi!

I'm new to Arch Linux and an old (and very forgetful) user of Linux. I'm used to work with LaTeX on Windows with MikTeX, which made it very easy for me to install missing packages via a friendly UI. But how do I add a package to my TexLive installation on Arch Linux, say, for example the subfigure package?

Thanks on advance smile
Bozack

Last edited by bozack (2008-07-13 09:50:32)

Offline

#2 2008-07-11 00:03:14

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: [SOLVED] TexLive and new packages

First, check the wiki http://wiki.archlinux.org/index.php/Texlive if what you want isn't already a part of some arch package. (For instance, subfigure is in texlive-latexextra). If it's not, then you need to manually download the package (usually from CTAN), and copy it over to either your ~/texmf, or to /opt/texlive/texmf-local (or any other texmf tree, but these two are standard locations); update the tree index (run texhash or mktexlsr), and that should be it.\

EDIT: there is currently no (reasonable) way of adding just individual packages in texlive.

Last edited by bender02 (2008-07-11 00:09:46)

Offline

#3 2008-07-11 00:27:04

bozack
Member
From: Denmark
Registered: 2008-07-10
Posts: 45
Website

Re: [SOLVED] TexLive and new packages

I had already read through the wiki a couple of times, but did not see that there were links to see the contents of the different packages, like texlive-latexextra.

What I really needed was the information that I could download the packages by my self from CTAN (or the like) into /opt/texlive/..., and of course the command to update the tree. Thanks for that! smile

Offline

#4 2008-07-11 00:42:43

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: [SOLVED] TexLive and new packages

Well, I'd still recommend using texlive-* packages when possible, since manual downloading is pain in the ** in the long run - you need to remember what you've downloaded manually, check for updates from time to time, etc... If you really need to, use ~/texmf - that way it will not interfere with texlive-* packages. Also, more popular additions to texlive (like for instance biblatex) are in AUR, so be sure to search that before you download manually.

Offline

#5 2009-08-09 15:10:59

basb
Member
Registered: 2009-08-08
Posts: 13

Re: [SOLVED] TexLive and new packages

Hi,


I'm an arch newbie and using texlive, which works fine, but I can't get a new package to work.

I downloaded the package (listingst.sty) and when I use "kpsewhich listings.sty" it returns the path
/home/Bas/texmf/tex/listings.sty

I am using pdflatex to compile. I added this line to my /etc/profile:
    TEXINPUTS=$TEXINPUTS:.:/home/Bas/texmf/tex//:  ; export TEXINPUTS

When compiling a tex file which contains
\begin{lstlisting}
put your code here
\end{lstlisting}

I get this error:
    LaTeX Error: Environment lstlisting undefined.

Thanks for any help!

Last edited by basb (2009-08-09 15:12:28)

Offline

#6 2009-08-13 12:36:47

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: [SOLVED] TexLive and new packages

First of all, you should not revive old threads, especially if you have a problem that's unrelated to the original posters' problem. So in the future, just open a new thread.

Second, you don't need to modify the TEXINPUTS variable at all, $HOME/texmf tree is automatically searched by texlive programs (by the way, the files that texlive can find are precisely the files that is found by kpsewhich).

Third, make sure that
- you have \usepackage{listings} in the header of your tex file
- if you don't get an error that listings.sty is not found, but you get the error you described above, you're not using the package correctly (ie it gets loaded fine, so the problem is somewhere else - are you sure that that package defines the 'lstlisting' environment)?

Offline

Board footer

Powered by FluxBB