diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-11 23:53:21 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-11 23:53:21 +0000 |
commit | 4b0f98fb13b641aa4107a30d6cf55118078ede6c (patch) | |
tree | 433e9518cf5f5f2a9238d2dffbf6cb4740f1e7d2 /Master/texmf-dist/source/latex/flabels/makedoc | |
parent | b7c1c08f6ae99fcb12401036d4bf4cd0e2730578 (diff) |
trunk/Master/texmf-dist/source/latex/flabels
git-svn-id: svn://tug.org/texlive/trunk@285 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/flabels/makedoc')
-rw-r--r-- | Master/texmf-dist/source/latex/flabels/makedoc | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/flabels/makedoc b/Master/texmf-dist/source/latex/flabels/makedoc new file mode 100644 index 00000000000..377f6492aed --- /dev/null +++ b/Master/texmf-dist/source/latex/flabels/makedoc @@ -0,0 +1,64 @@ +#!/bin/sh +# +# Everything after a `#' is ignored +# +# remove the string `> /dev/null' if you want more log-output +# remove the line containing `batchmode' if you want even more +# log-information while running LaTeX +# +#----------------- create a `ltxdoc.cfg': -------------------------- + +# Make sure that we start with an clean 'ltxdoc.cfg': +echo -n > ltxdoc.cfg + +# Put here a (comma-separated) list of options to pass to +# class 'article': +C_OPT=a4paper + +# Put here a (comma-separated) list of options to pass to +# package 'flabels' (color?): +#P_OPT=color + +if [ -n "$C_OPT" ]; then + echo "\PassOptionsToClass{$C_OPT}{article}" >> ltxdoc.cfg +fi +if [ -n "$P_OPT" ]; then + echo "\PassOptionsToPackage{$P_OPT}{flabels}" >> ltxdoc.cfg + if echo $P_OPT | grep color > /dev/null && [ ! -s color.cfg ]; then + echo "Package 'color' needs a file 'color.cfg'!" + fi +fi +echo "\batchmode" >> ltxdoc.cfg + +# The next lines produce full indexes and change logs +# you may not want those (comment the lines out with +# TeX-comment-character '%'!) +cat >> ltxdoc.cfg <<EOF +% \AtBeginDocument{\RecordChanges} +% \AtEndDocument{\PrintChanges} +\AtBeginDocument{\CodelineIndex\EnableCrossrefs} +\AtEndDocument{\PrintIndex} +\AtEndDocument{\addcontentsline{toc}{section}{Index}} +EOF + +# If you do not want any code listings, just documentation, then instead +# of the lines above, uncomment the following: +#echo "\AtBeginDocument{\OnlyDescription}" >> ltxdoc.cfg + +#---------- latex the documentation using `ltxdoc.cfg': -------------- + +ThisDoc=flabels.dtx +Base=flabels + +echo "1st latex $ThisDoc" +if (latex $ThisDoc > /dev/null); then + echo "2nd latex $ThisDoc" + latex $ThisDoc > /dev/null + + echo "makeindex -s gind.ist $Base.idx" + makeindex -s gind.ist $Base.idx + echo "3rd latex $ThisDoc" + latex $ThisDoc > /dev/null +else + echo "!!! LaTeX ERROR: $ThisDoc. (See $Base.log.)" +fi |