Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is there an automated script which places files in the relevant directory tree in ~/texmf/ and is that all that is required to install a package (in addition to calling texhash on ~/texmf/)?

share|improve this question
    
With a recent TeX Live, you don't need to texhash ~/texmf/ –  Joseph Wright Oct 3 '11 at 5:59
add comment

2 Answers

up vote 3 down vote accepted

Only some packages on CTAN come also in so called TDS ZIP files which already hold the required directory structure so that you only need to unzip them over your $TEXMF tree (e.g. ~/texmf). If the package author didn't uploaded a TDS ZIP file it most likely isn't on CTAN.

To my knowledge there is no direct script available which turns a CTAN package into the required TDS structure and installs it directly. (The TeXLive developers should have something like that to build the TeXLive package files.) I was thinking writing such a script recently. So far I wrote a Makefile which does it for most LaTeX packages, but currently it is ydoc specific, i.e. for my packages only.

However, you could download the whole CTAN directory for a package as a flat ZIP file, unpack it and then use the ctanify script on the directory. It is intended to create an upload ZIP file for CTAN which also includes a TDS ZIP file. You then can use this TDS ZIP file and unpack it over your TEXMF tree.

I just tested this using colortbl as a random example. The steps are as follows and could be turned into a script easily. Simple add #!/bin/sh as first line and replace colortbl with $1 and call it using yourscriptname <name of package>. However, most but not all LaTeX package are located in /macro/latex/contrib, so for the others you would need to provide the download link somehow.

cd /tmp
wget http://mirror.ctan.org/macros/latex/contrib/colortbl.zip
unzip colortbl.zip 
cd colortbl/
tex colortbl.ins
ctanify *.ins *.dtx
tar -xzf colortbl.tar.gz
unzip -d ~/texmf colortbl.tds.zip 
test -e ~/texmf/ls-R && texhash ~/texmf

Note that you only need to run texhash for the per-user TEXMF directory if the ls-R file already exists. Modern TeXLive installation search it automatically every run if the ls-R file doesn't exists.

share|improve this answer
add comment

Short answer: no.

Slightly longer answer: If your package is on this list, kind of. The tds.zip files already have the structure of the TeX Directory Structure built in, so when you unzip it in the root of your texmf tree, all the files go in the right places. So if you download that zip file, then it should work.

share|improve this answer
    
Note that there are other directories with TDS ZIP files on CTAN, e.g. PGF related packages are not in macros/latex/contrib but somewhere below graphics/... The package entry should link to the TDS ZIP file for the package. –  Martin Scharrer Oct 3 '11 at 7:56
    
Ah yes, for more on this issue, see this question: tex.stackexchange.com/questions/24636/… –  Seamus Oct 3 '11 at 10:48
add comment

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.