diff options
author | Karl Berry <karl@freefriends.org> | 2014-05-07 20:35:21 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-05-07 20:35:21 +0000 |
commit | e3ee374de9d7f8a3b3e71651c1ae021102fe5928 (patch) | |
tree | f09d29f363d59072c651d17b164765789986bb04 /Master/texmf-dist/doc/latex/ctable | |
parent | 2aa6431ce4bd094a95775701737700466683f820 (diff) |
ctable (7may14)
git-svn-id: svn://tug.org/texlive/trunk@33900 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/ctable')
-rw-r--r-- | Master/texmf-dist/doc/latex/ctable/README | 8 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/ctable/ctable.pdf | bin | 830675 -> 831750 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/ctable/doit | 5 | ||||
-rwxr-xr-x | Master/texmf-dist/doc/latex/ctable/inst | 177 |
4 files changed, 98 insertions, 92 deletions
diff --git a/Master/texmf-dist/doc/latex/ctable/README b/Master/texmf-dist/doc/latex/ctable/README index da45ffd93f1..3415d3dc345 100644 --- a/Master/texmf-dist/doc/latex/ctable/README +++ b/Master/texmf-dist/doc/latex/ctable/README @@ -1,4 +1,3 @@ -------------------------------------------------------------------------------------- ctable --- Flexible typesetting of table and figure floats using key/value directives Author: Wybo Dekker E-mail: wybo@dekkerdocumenten.nl @@ -13,8 +12,11 @@ environment, a command with 4 arguments is used; the first is optional and is used for key,value pairs generating variations on the defaults and offering a route for future extensions. +Full documentation: +https://bitbucket.org/wybodekker/ctable/downloads/ctable.pdf + Installation: Execute the inst script with the --help option for more information. -Changes in version 1.28: - added percent characters at EOLs causing whitespace +Changes in version 1.29: + reorganized inst script diff --git a/Master/texmf-dist/doc/latex/ctable/ctable.pdf b/Master/texmf-dist/doc/latex/ctable/ctable.pdf Binary files differindex 7bbee2646bc..885e1a09de8 100644 --- a/Master/texmf-dist/doc/latex/ctable/ctable.pdf +++ b/Master/texmf-dist/doc/latex/ctable/ctable.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/doit b/Master/texmf-dist/doc/latex/ctable/doit index ddf387dcf65..c62c1ca30f4 100644 --- a/Master/texmf-dist/doc/latex/ctable/doit +++ b/Master/texmf-dist/doc/latex/ctable/doit @@ -11,7 +11,6 @@ # nn[a-z].pdf for the ctable picture # and snn[a-z].pdf for the source code verbatim. # The prefix (s) for source verbatims and (empty) for result files is set by PRE -# Windows users should replace NULL with perhaps "c:/temp/null" set=${1:-[0-9][0-9][a-z]} for j in $set; do # source verbatim @@ -30,7 +29,7 @@ for j in $set; do EOD } >s$j.tex - pdflatex --interaction=nonstopmode s$j.tex >& /dev/null || die "error compiling s$j.tex" + mk --noprint --noview s$j.tex >/dev/null && mk -c s$j pdfcrop s$j.pdf s$j.pdf >& /dev/null # result { echo '\documentclass[twoside]{article}' @@ -45,6 +44,6 @@ for j in $set; do cat $j echo '\end{document}' } > $j.tex - pdflatex --interaction=nonstopmode $j.tex >& /dev/null || die "error compiling $j.tex" + mk --noprint --noview $j.tex >/dev/null && mk -c $j pdfcrop $j.pdf $j.pdf >& /dev/null done diff --git a/Master/texmf-dist/doc/latex/ctable/inst b/Master/texmf-dist/doc/latex/ctable/inst index 968e73b1827..6db01fd85bd 100755 --- a/Master/texmf-dist/doc/latex/ctable/inst +++ b/Master/texmf-dist/doc/latex/ctable/inst @@ -1,89 +1,102 @@ #!/bin/bash + dtxname=ctable + dtxtype=package + ext=sty + delete=($dtxname.$ext README.tex doc/\*.tex) + dtxversion=$(grep " v[0-9.]\+[a-z]\{0,1\} $dtxname $dtxtype" $dtxname.dtx |sed 's/.* v\([0-9.]\+[a-z]\{,1\}\) .*/\1/') +executables=(mk texlog_extract zip getopt pdfseparate pdfcrop pdflatex) - NAME=ctable - DOCTYPE=package - EXT=sty - VERSION=`grep " v[0-9.]\+[a-z]\{,1\} $NAME $DOCTYPE" $NAME.dtx |sed 's/.* v\([0-9.]\+[a-z]\{,1\}\) .*/\1/' ` -EXECUTABLES=(zip getopt) + version=1.00 + myname=$(basename $0) -die() { - echo -e "$*" - exit 1 -} +<<'DOC' += inst - install ctable -help() { - cat <<-EOD - This is inst - install the $NAME LaTeX $DOCTYPE - Options: - -h, --help print this help - -c, --clean remove all files created by the installation, except the zip file - -z, --zip Create zip for CTAN (no install, developer only) - - Without any options, inst installs $NAME in the first writable - TEXMFMAIN, TEXMFLOCAL or TEXMFHOME tree. - EOD - exit -} += Synopsis +inst [options] + +Without any options, inst installs ctable in the first writable +TEXMFMAIN, TEXMFLOCAL or TEXMFHOME tree. + +Options: +-h,--help print this help and exit +-H,--Help print full documentation via less and exit +-V,--version print version and exit + + += Description +inst must be run in its own directory (|./inst|) and then does the following: +- generates the documentation for isodoc, +- installs ctable in one of your TeX trees: TEXMFMAIN, TEXMFLOCAL or TEXMFHOME. + The first one writable by you will chosen. +- creates a zip file named |ctable-x.yy.zip| for upload to CTAN +- cleans up + += Author and copyright +Author Wybo Dekker +Email U{wybo@dekkerdocumenten.nl}{wybo@dekkerdocumenten.nl} +License Released under the U{www.gnu.org/copyleft/gpl.html}{GNU General Public License} +DOC + + die() { echo -e "$myname: $Err$@$Nor" 1>&2; exit 1; } + help() { sed -n '/^= Synopsis/,/^= /p' $0|sed '1s/.*/Usage:/;/^= /d'; exit; } +helpall() { sed -n '/^<<.DOC.$/,/^DOC$/p' $0|sed -n '1d;$d;p'|less; exit; } +version() { echo $version; exit; } + +Nor='\e[0m' # reset color ] +Err='\e[31;1m' # light red ] setdir() { # create installation directory for i in MAIN LOCAL HOME; do - TREE=$(kpsewhich --expand-var \$TEXMF$i) - test -w $TREE && break - TREE= + tree=$(kpsewhich --expand-var \$TEXMF$i) + test -w $tree && break + tree= done - test "$TREE" = "" && die "Could not find a writable TeX tree" - INSTTEX=${TREE}/tex/latex/$NAME - INSTSRC=$TREE/source/latex/$NAME - INSTDOC=$TREE/doc/latex/$NAME - mkdir -p $INSTTEX || die could not create $INSTTEX - mkdir -p $INSTSRC || die could not create $INSTSRC - mkdir -p $INSTDOC || die could not create $INSTDOC + [[ -n $tree ]] || die "Could not find a writable TeX tree" + insttex=${tree}/tex/latex/$dtxname + instsrc=$tree/source/latex/$dtxname + instdoc=$tree/doc/latex/$dtxname + mkdir -p $insttex || die could not create $insttex + mkdir -p $instsrc || die could not create $instsrc + mkdir -p $instdoc || die could not create $instdoc } testexecs() { # test presence of executables - for i in ${EXECUTABLES[*]}; do + for i in ${executables[*]}; do type $i &> /dev/null || die executable $i not found done } readme() { # generate the README file sed -n '/^%<\*readme>/,/^%<\/readme>/p - /\\changes{v'$VERSION'}/,/^% }/p' $NAME.dtx | + /\\changes{v'$dtxversion'}/,/^% }/p' $dtxname.dtx | sed 's/^%//;s/\\\\$// /<.readme>/d /^ }/d - s/ \\changes.*/Changes in version '$VERSION':/ + s/ \\changes.*/Changes in version '$dtxversion':/ s/$\\Rightarrow\$/=>/g s/\\textbackslash/\\/g s/\\text\(sl\|it\){\([^}]\+\)}/\/\2\//g # \textsl{...} -> /.../ s/{\([^}]*\)}/\1/g # keep last, removes all {...} ' >README -} - -clean() { # clean but keep what goes in the zip - rm -f $NAME.{aux,fls,glo,gls,idx,ilg,ind,log,out,toc,$EXT} - rm -f doc/{$NAME.$EXT,*.{pdf,aux,log,out}} - rm -f doc/{s,}[0-9][0-9][a-z].* -} - -Clean() { - clean - rm -f $NAME.pdf README + grep "Changes in version" README >/dev/null || die changes not detected } makeall() { - echo y |tex $NAME.ins >/dev/null + grep '%<\*install>' $dtxname.dtx >/dev/null && # for self-extracting dtx files + delete+=($dtxname.ins) || + echo y |tex $dtxname.ins >/dev/null + # install any .ttf files mkdir -p ~/.fonts find doc -name '*.ttf' -exec cp {} ~/.fonts \; fc-cache ~/.fonts - # create the README file - readme + readme # create the README file # compile all examples cd doc - ln -sf ../$NAME.sty || exit 1 # use the version to be installed + ln -sf ../$dtxname.sty || exit 1 # use the version to be installed for i in [0-9][0-9]?; do if [ ! -f $i.pdf -o ! -f s$i.pdf ]; then ./doit || exit 1 @@ -91,55 +104,47 @@ makeall() { fi done cd .. - # make $NAME.pdf - pdflatex --recorder --interaction=batchmode $NAME.dtx >/dev/null || - die "`texlog_extract $NAME.log`" - test -f $NAME.glo && makeindex -q -s gglo.ist -o $NAME.gls $NAME.glo - test -f $NAME.idx && makeindex -q -s gind.ist -o $NAME.ind $NAME.idx - pdflatex --interaction=batchmode $NAME.dtx > /dev/null - pdflatex --interaction=batchmode $NAME.dtx > /dev/null + + mk --noprint --noview $dtxname.dtx && mk -c $dtxname.dtx # make $dtxname.pdf } installall() { # install and cleanup - echo installing in $TREE - - rm -rf $INSTTEX/* $INSTSRC/* $INSTDOC/* - cp -f $NAME.$EXT $INSTTEX - cp -a $NAME.{ins,dtx} $INSTSRC - cp -a README inst $NAME.pdf $INSTDOC - mktexlsr $TREE 2>/dev/null - clean -} - -mkzip() { - clean + echo installing in $tree + + rm -rf $insttex/* $instsrc/* $instdoc/* + find doc \( -type l -o -name '*.pdf' \) -delete + cp -f $dtxname.$ext $insttex + cp -a $dtxname.{ins,dtx} $instsrc + cp -a README inst $dtxname.pdf $instdoc + mktexlsr $tree 2>/dev/null + for i in ${delete[@]}; do rm -f $i; done cd .. - zipfile=$NAME/$NAME-$VERSION.zip + zipfile=$dtxname/$dtxname-$dtxversion.zip rm -f $zipfile - zip -Drq $zipfile $NAME/* -x $NAME/test/* - cd $NAME - Clean + zip -rq $zipfile $dtxname/* -x $dtxname/test\* + cd $dtxname } -testexecs -setdir - -if ! options=$(getopt -o hcz \ - -l help,clean,zip -- "$@"); then exit 1; fi +options=$(getopt \ + -n $myname \ + -o hHV \ + -l help,Help,version \ + -- "$@" +) || exit 1 eval set -- "$options" - while [ $# -gt 0 ]; do case $1 in - -c|--clean) Clean; exit;; - -z|--zip) makeall; mkzip; exit;; - -h|--help) help;; - (--) shift; break;; - (*) break;; + (-h|--help) help;; + (-H|--Help) helpall;; + (-V|--version) version;; + (--) shift; break;; + (*) break;; esac - shift done -test "$1" = "" || die No arguments expected +[[ -z $1 ]] || die No arguments expected +testexecs +setdir makeall installall |