#!/usr/bin/env bash # INSTALL # # 1. Run the file kau.ins through LaTeX. # 2. Run the files *.dtx through LaTeX. # 3. Create the index by calling for each DTX file # $ makeindex -s gind.ist -o .ind .idx # 4. Create the change history by calling for each DTX file # $ makeindex -s gglo.ist -o .gls .glo # 5. Run the files *.dtx through LaTeX again. # 6. Move the *.sty and *.pdf files to your local $TEXMF # # -OR- # # Run this INSTALL file through /bin/bash. # # -OR- # # Use the Makefile: # # To build the .sty and .cls files: # make # # To install those same files: # make install # # To build the PDF documentation: # make doc # # To install the docs: # make install_doc # # To do everything at once: # make install install_doc # For Linux, garamondx needs system-wide installation: # $ wget https://www.tug.org/fonts/getnonfreefonts/install-getnonfreefonts # $ texlua install-getnonfreefonts # $ getnonfreefonts –-sys -l (should list the fonts with ‘uninstalled’ status) # $ getnonfreefonts –-sys -a (install all fonts) # $ getnonfreefonts –-sys -l (should show changed status – installed) # $ mktexlsr # $ updmap-sys latex kauthesis.ins || exit 1 rm -f kauthesis.log for FILE in *.dtx do BASENAME=`basename $FILE .dtx` pdflatex $FILE || exit 1 makeindex -s gglo.ist -o $BASENAME.gls $BASENAME.glo || exit 1 makeindex -s gind.ist -o $BASENAME.ind $BASENAME.idx || exit 1 pdflatex $FILE || exit 1 rm -f $BASENAME.aux \ $BASENAME.glo \ $BASENAME.gls \ $BASENAME.idx \ $BASENAME.ilg \ $BASENAME.ind \ $BASENAME.log || exit 1 done for FILE in kauguide do pdflatex $FILE.tex || exit 1 if [[ -f $FILE.idx ]] then makeindex -o $FILE.ind $FILE.idx || exit 1 fi pdflatex $FILE.tex || exit 1 pdflatex $FILE.tex || exit 1 rm -f $FILE.aux $FILE.ind $FILE.idx $FILE.ilg $FILE.log $FILE.out $FILE.toc done PACKAGE=kau TEXMF=`kpsexpand -n latex '$TEXMFHOME'` LATEXDIR=$TEXMF/tex/latex/$PACKAGE LATEXDOC=$TEXMF/doc/latex/$PACKAGE if [[ -e $LATEXDIR ]] then echo Warning: Moving the class and style files to $LATEXDIR failed, since the directory already exists. Move the files to another location in your TEXMF path. exit 1 else if [[ -e $LATEXDOC ]] then echo Warning: Moving the documentation to $LATEXDOC failed, since the directory already exists. Move the files to another location in your TEXMF path. exit 1 fi fi mkdir -p $LATEXDIR || exit 1 mkdir -p $LATEXDOC || exit 1 mv *.sty *.cls $LATEXDIR || exit 1 mv *.pdf $LATEXDOC || exit 1 # vim: sw=2:sts=2:et:nu