summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-05-07 20:35:21 +0000
committerKarl Berry <karl@freefriends.org>2014-05-07 20:35:21 +0000
commite3ee374de9d7f8a3b3e71651c1ae021102fe5928 (patch)
treef09d29f363d59072c651d17b164765789986bb04
parent2aa6431ce4bd094a95775701737700466683f820 (diff)
ctable (7may14)
git-svn-id: svn://tug.org/texlive/trunk@33900 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/ctable/README8
-rw-r--r--Master/texmf-dist/doc/latex/ctable/ctable.pdfbin830675 -> 831750 bytes
-rw-r--r--Master/texmf-dist/doc/latex/ctable/doit5
-rwxr-xr-xMaster/texmf-dist/doc/latex/ctable/inst177
-rw-r--r--Master/texmf-dist/source/latex/ctable/ctable.dtx9
-rw-r--r--Master/texmf-dist/tex/latex/ctable/ctable.sty2
6 files changed, 106 insertions, 95 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
index 7bbee2646bc..885e1a09de8 100644
--- a/Master/texmf-dist/doc/latex/ctable/ctable.pdf
+++ b/Master/texmf-dist/doc/latex/ctable/ctable.pdf
Binary files differ
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
diff --git a/Master/texmf-dist/source/latex/ctable/ctable.dtx b/Master/texmf-dist/source/latex/ctable/ctable.dtx
index 130998b5771..fe7dee2dfa4 100644
--- a/Master/texmf-dist/source/latex/ctable/ctable.dtx
+++ b/Master/texmf-dist/source/latex/ctable/ctable.dtx
@@ -3,7 +3,6 @@
\iffalse
%</internal>
%<*readme>
--------------------------------------------------------------------------------------
ctable --- Flexible typesetting of table and figure floats using key/value directives
Author: Wybo Dekker
E-mail: wybo@dekkerdocumenten.nl
@@ -18,6 +17,9 @@ 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.
@@ -31,7 +33,7 @@ Execute the inst script with the --help option for more information.
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{ctable}
%<*package>
- [2014/02/20 v1.28 ctable package for \
+ [2014/04/25 v1.29 ctable package for \
flexible typesetting of table and figure floats using key/value directives]
%</package>
%
@@ -234,6 +236,9 @@ Execute the inst script with the --help option for more information.
% \changes{v1.28}{2014/02/20}{
% added percent characters at EOLs causing whitespace
% }
+% \changes{v1.29}{2014/04/20}{
+% reorganized inst script
+% }
%
% \GetFileInfo{ctable.dtx}
%
diff --git a/Master/texmf-dist/tex/latex/ctable/ctable.sty b/Master/texmf-dist/tex/latex/ctable/ctable.sty
index a4385a0fe0d..50dd98a22c7 100644
--- a/Master/texmf-dist/tex/latex/ctable/ctable.sty
+++ b/Master/texmf-dist/tex/latex/ctable/ctable.sty
@@ -22,7 +22,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{ctable}
- [2014/02/20 v1.28 ctable package for \
+ [2014/04/25 v1.29 ctable package for \
flexible typesetting of table and figure floats using key/value directives]
\RequirePackage{ifpdf,xcolor,xkeyval,array,tabularx,booktabs,rotating}
\ifpdf