TeXLive from iso
From ArchWiki
Contents |
[edit] Introduction
As I prefer to run all the tex stuff right from the downloaded iso image, I want to outline an alternative approach to installing TeXLive packages. I am always happy about suggestions on how to integrate this better with arch's directory and package structure... Note that I agree with some arguments in this forum thread, according to which this here is not quite the ARCH WAY, and I would encourage you to consider taking the approach mentioned there, but as I don't have the time right now to risk breaking my setup, and as I need a similar working environment in both linux and windows (including gvim+latex-suite, but that is another question), and as I finally have the harddisk space ready and the iso lying around, I for one stick with the setup described here for now.
(Finally, thanks to ezzetabi for pointing out that you could just as well copy the whole dvd tree into /opt/texlive/dvd instead of mounting the iso file there. Then you would even be able to erase parts of which you are sure that you won't need them ... In that case, the item "Mounting" below would have to be replaced by "Copying", but I am sure you can figure this out.)
[edit] Read more: Forum threads
- replace TeTex package by TeX Live
- TeX Live packages (follow-up to the above)
- TeXLive-Installation [gelöst] (german)
[edit] set up texlive environment in linux
[edit] Directories
- create /opt/tex with subdirectories iso, dvd, texmf-local, texmf-var and texmf-config
- get correct (group) permissions on those directories (FIXME)
- get texlive2007-live-20070212.iso (1.8G) and put it in /opt/tex/iso
- copy the directory texmf/web2c from the temporarily mounted dvd/iso to /opt/tex/texmf-var/web2c
[edit] Variables
- edit /opt/tex/texmf-var/web2c/texmf.conf as follows:
TEXMFMAIN = $TEXLIVE/texmf (instead of $SELFAUTOPARENT/texmf) TEXMFDIST = $TEXLIVE/texmf-dist (instead of $SELFAUTOPARENT/texmf-dist) TEXMFLOCAL = $TEXROOT/texmf-local (instead of $SELFAUTOPARENT/../texmf-local) TEXMFSYSVAR = $TEXROOT/texmf-var (instead of $SELFAUTOPARENT/texmf-var) TEXMFSYSCONFIG = $TEXROOT/texmf-config (instead of $SELFAUTOPARENT/texmf-config) TEXMFHOME = $TEXMFLOCAL (instead of $HOME/texmf) TEXMFVAR = $TEXMFSYSVAR (instead of $HOME/.texlive2007/texmf-var) TEXMFCONFIG = $TEXMFSYSCONFIG (instead of $HOME/.texlive2007/texmf-config)
- set the following environment vars in /etc/profile.d/texlive.sh (and make that file executable):
export MANPATH=$MANPATH:/opt/tex/dvd/texmf/doc/man export PATH=$PATH:/opt/tex/dvd/bin/x86_64-linux (or whatever your architecture is) export TEXLIVE=/opt/tex/dvd export TEXROOT=/opt/tex export TEXMFCNF=/opt/tex/texmf-var/web2c
[edit] Mounting
- create ~/bin/mounttexlive.sh and have it launched at appropriate occasions (f.ex. in xinitrc, .profile, suspend-resume etc. - I have it in ~/.profile):
#!/bin/sh # TeXLive-2007 test -e /opt/tex/dvd/00LIVE.TL || echo "9ce7337507a67f95812b58f95e4e2661 /opt/tex/iso/texlive2007-live-20070212.iso" | md5sum -c - && \ sudo mount "/opt/tex/iso/texlive2007-live-20070212.iso" -t iso9660 -o ro,exec,loop /opt/tex/dvd
if you prefer, you can also skip the md5sum check (maybe do it in a cronjob?) and just do
#!/bin/sh # TeXLive-2007 test -e /opt/tex/dvd/00LIVE.TL || \ sudo mount "/opt/tex/iso/texlive2007-live-20070212.iso" -t iso9660 -o ro,exec,loop /opt/tex/dvd
(note that this obviously requires to have sudo authority to execute the mount program. I even allow myself to call it without giving a password. YMMV.)
[edit] dummy package
In order to not have pacman bitch about missing tetex dependencies, I have the following dummy package (as per this forum thread):
PKGBUILD
pkgname=texlive-dummy
pkgver=1.0
pkgrel=1
pkgdesc="TeX typesetting program"
arch=(i686 x86_64)
license=
provides=('tetex' 'texinfo')
conflicts=('tetex')
build() {
/bin/true
}
makepkg complains about missing licence field (but TLs licences are manyfold) and tar doesn't find any files to pack, but still it goes...
[edit] windows
- My /opt/tex/iso actually is a symlink to a fat32 dir "D:\ISOs\TeXLive"
- With Microsoft's Virtual CD Control Panel (only for Win XP und W2k) or the Daemon Tools, the iso file there is mounted as drive T:.
- In D:, I also have a directory Daten\aw\TeX\TeXLive, whose subdirectories texmf-config, texmf-local und texmf-var are the ones that the corresponding directories in linux's /opt/tex are actually mere symlinks to.
- These are the environment variables:
- user-defined vars
HOME d:\daten\aw
- system vars
Path T:\bin\win32;... TEXLIVE T:\ TEXMFCNF D:\Daten\AW\TeX\TeXLive\texmf-var\web2c TEXROOT D:\Daten\AW\TeX\TeXLive
[edit] conclusion
so far so good. now it should work and all those nifty tex commands (xetex, pdftex, bibtex etc.) should be in the path already. Packages I download from CTAN go to texmf-local, of course.