Linux Commands Examples

A great documentation place for Linux commands

kpsexpand

script to make teTeX-style kpsetool , kpsexpand , and kpsepath available


see also : kpsewhich

Synopsis

kpsetool [ OPTIONS... ] COMMAND

kpsexpand [ OPTIONS... ] STRING

kpsepath [ OPTIONS... ] PATHTYPE


add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!

examples

0
source
            
TEXMFMAIN=`kpsexpand '$TEXMFMAIN'`
SLANT=0.3
INSTALL_DIR="/usr/bin/install -d -m 0755 -o root -g wheel"
0
source
            
local texmfhome=$(kpsexpand \$TEXMFHOME)
grep 'SELFAUTOPARENT\|^TEXMF \|^TEXMFDBS \|^SYSTEXMF ' $TEXMFMAIN/web2c/texmf.cnf |
if [ $(kpsexpand \$$var) != \$$var ]; then
echo "$var is used already!" >&2
return 1
0
source
            
texmf=`kpsexpand '$TEXMFLOCAL'`
else
texmf=`kpsexpand '$HOMETEXMF'`
fi
if [ -z "$texmf" ]; then
echo "kpsexpand '$TEXMFLOCAL' or kpsexpand '$HOMETEXMF' failed!" >&2
echo "You have to use option --texmf=<DIR>." >&2
0
source
            
which kpsexpand >/dev/null || {
echo "Can't find your TeXLive installation, do you set your PATH properly?" >&2
TEXMFHOME="`kpsexpand '$TEXMFHOME'`"
fi
echo "TEXMFHOME is $TEXMFHOME"
[ -d "$TEXMFHOME" ] || mkdir -p "$TEXMFHOME"
0
source
            
TEXMF=`kpsexpand -n latex '$TEXMFHOME'`
LATEXDIR=$TEXMF/tex/latex/$PACKAGE
LATEXDOC=$TEXMF/doc/latex/$PACKAGE

description

kpsetool is a Bourne shell script that makes a teTeX-style kpsetool, kpsexpand, and kpsepath available. kpsetool uses web2c´s (new) kpsexpand binary, so the syntax for kpsexpand is incompatible with teTeX´s as of version 0.4.

options

-m mode

set Metafont mode

-n progname

pretend to be progname to kpathsea

-p

act like kpsepath(1)

-v

act like kpsexpand(1)

-w

act like kpsewhich(1)

usage

PATHTYPE can be

base

Metafont memory dump

bib

BibTeX bibliography source

bst

BibTeX style files

cnf

Kpathsea runtime configuration files

dvips_config

dvips config files

dvips_header

dvips header files

fmt

TeX memory dump

gf

generic font bitmap

mem

MetaPost memory dump

mf

Metafont source

mfpool

Metafont program strings

mp

MetaPost source

mppool

MetaPost program strings

mpsupport

MetaPost support files

pict

Other kinds of figures

pk

packed bitmap font

tex

TeX source

texpool

TeX program strings

tfm

TeX font metrics

troff_font

troff fonts

vf

virtual font


bugs

None known, but report any bugs found to <tetex[:at:]dbs[:dot:]uni-hannover.de> (mailing list).


see also

kpsewhich

Kpathsea: A library for path searching (info or DVI file)

Web page: <http://tug.org/teTeX/>


author

kpsetool was written by Thomas Esser <te[:at:]dbs[:dot:]uni-hannover.de> in March, 1997. kpsetool is in the public domain.

This manual page was written by C.M. Connelly <c[:at:]eskimo[:dot:]com>, for the Debian GNU/Linux system. It may be used by other distributions without contacting the author. Any mistakes or omissions in the manual page are my fault; inquiries about or corrections to this manual page should be directed to me (and not to the primary author).

How can this site be more helpful to YOU ?


give  feedback