summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-02-06 16:41:05 +0000
committerKarl Berry <karl@freefriends.org>2011-02-06 16:41:05 +0000
commit300c48ee48cd89dab7bc133b81ba84eda8b6d605 (patch)
treebc791b8456ea85e23e3ced78b6a9e33a81eaea2e /Master/texmf-dist/source
parent2733a432619241f3ce0d8b5cd0a77bb2e259af99 (diff)
collcell (6feb11)
git-svn-id: svn://tug.org/texlive/trunk@21315 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/collcell/Makefile86
-rw-r--r--Master/texmf-dist/source/latex/collcell/README45
-rw-r--r--Master/texmf-dist/source/latex/collcell/collcell.dtx11
3 files changed, 137 insertions, 5 deletions
diff --git a/Master/texmf-dist/source/latex/collcell/Makefile b/Master/texmf-dist/source/latex/collcell/Makefile
new file mode 100644
index 00000000000..1c9d16be7d1
--- /dev/null
+++ b/Master/texmf-dist/source/latex/collcell/Makefile
@@ -0,0 +1,86 @@
+TEXMF=${HOME}/texmf
+INSTALLDIR=${TEXMF}/tex/latex/collcell
+DOCINSTALLDIR=${TEXMF}/doc/latex/collcell
+CP=cp
+RMDIR=rm -rf
+PDFLATEX=pdflatex -interaction=batchmode
+LATEXMK=latexmk -pdf -silent
+
+PACKEDFILES=collcell.sty
+DOCFILES=collcell.pdf
+SRCFILES=collcell.dtx collcell.ins README Makefile
+
+all: unpack doc
+
+package: unpack
+class: unpack
+
+${PACKEDFILES}: collcell.dtx collcell.ins
+ yes | pdflatex collcell.ins
+
+unpack: ${PACKEDFILES}
+
+# 'doc' and 'collcell.pdf' call itself until everything is stable
+doc: collcell.pdf
+ @${MAKE} --no-print-directory collcell.pdf
+
+pdfopt: doc
+ @-pdfopt collcell.pdf .temp.pdf && mv .temp.pdf collcell.pdf
+
+collcell.pdf: collcell.dtx collcell.gls collcell.ind
+ ${LATEXMK} collcell.dtx
+
+collcell.idx collcell.glo: collcell.dtx
+ ${LATEXMK} collcell.dtx
+
+collcell.ind: collcell.idx
+ -makeindex -s gind.ist -o "$@" "$<"
+
+collcell.gls: collcell.glo
+ -makeindex -s gglo.ist -o "$@" "$<"
+
+.PHONY: test
+
+test: unpack
+ for T in test*.tex; do echo "$$T"; pdflatex -interaction=batchmode $$T && echo "OK" || echo "Failure"; done
+
+clean:
+ -latexmk -C collcell.dtx
+ ${RM} ${PACKEDFILES} *.zip *.log *.aux *.toc *.vrb *.nav *.pdf *.snm *.out *.fdb_latexmk *.glo *.gls *.hd *.sta *.stp *.cod
+ ${RMDIR} tds
+
+install: unpack doc ${INSTALLDIR} ${DOCINSTALLDIR}
+ ${CP} ${PACKEDFILES} ${INSTALLDIR}
+ ${CP} ${DOCFILES} ${DOCINSTALLDIR}
+ texhash ${TEXMF}
+
+${INSTALLDIR}:
+ mkdir -p $@
+
+${DOCINSTALLDIR}:
+ mkdir -p $@
+
+ctanify: ${SRCFILES} ${DOCFILES} collcell.tds.zip
+ ${RM} collcell.zip
+ zip collcell.zip $^
+ unzip -t collcell.zip
+ unzip -t collcell.tds.zip
+
+zip: collcell.zip
+
+tdszip: collcell.tds.zip
+
+collcell.zip: ${SRCFILES} ${DOCFILES} | pdfopt
+ ${RM} $@
+ zip $@ $^
+
+collcell.tds.zip: ${SRCFILES} ${PACKEDFILES} ${DOCFILES} | pdfopt
+ ${RMDIR} tds
+ mkdir -p tds/tex/latex/collcell
+ mkdir -p tds/doc/latex/collcell
+ mkdir -p tds/source/latex/collcell
+ ${CP} ${DOCFILES} tds/doc/latex/collcell
+ ${CP} ${PACKEDFILES} tds/tex/latex/collcell
+ ${CP} ${SRCFILES} tds/source/latex/collcell
+ cd tds; zip -r ../$@ .
+
diff --git a/Master/texmf-dist/source/latex/collcell/README b/Master/texmf-dist/source/latex/collcell/README
new file mode 100644
index 00000000000..a187804e29a
--- /dev/null
+++ b/Master/texmf-dist/source/latex/collcell/README
@@ -0,0 +1,45 @@
+The collcell Package
+--------------------
+Copyright (C) 2009-2011 by Martin Scharrer <martin@scharrer-online.de>
+http://www.ctan.org/pkg/collcell/
+Version v0.1a -- 2011/02/05
+
+This small package provides macros which collect the cell content of
+a tabular and provide it to a macro as argument. It was inspired by the
+\collect@body macro defined by the amsmath or the environ package,
+which can be used to collect the body of an environment. Special care
+is taken to remove all aligning macros inserted by tabular from the cell
+content. The macros also work in the last column of a table. They do not
+support verbatim material inside the cells.
+
+
+Usage
+
+This package provides the macros \collectcell and \endcollectcell which are
+supposed to be used with the >{ } and <{ } tabular column declarations of the
+array package. This can be done either in the argument of tabular or using
+\newcolumntype.
+
+The following code defines a 'E' column which passes the contents of its cell to
+\usermacro as an argument. The macro can the process the content as usual.
+
+% Preamble:
+\usepackage{array}
+\usepackage{collcell}
+% Preamble or document:
+\newcolumntype{E}{>{\collectmacro\usermacro}c<{\endcollectmacro}}
+% Document:
+\begin{tabular}{lE}
+A & Example \\ % Same as \usermacro{Example}
+B & Text \\ % Same as \usermacro{Text}
+\end{tabular}
+
+For example \usermacro could be \fbox and wrap the cell content in a frame box.
+More complicated macros are also supported as long they take one argument. This
+package was originally programmed to be used with the \tikztiming macro of the
+tikz-timing package. This macro takes some complex user input and draws a timing
+diagram from it
+
+Note that if such a cell contains a tabular environment by itself, the
+environment must be wrapped in braces '{ }' to ensure proper operation.
+
diff --git a/Master/texmf-dist/source/latex/collcell/collcell.dtx b/Master/texmf-dist/source/latex/collcell/collcell.dtx
index 2bf3c89d5a5..b6523aa4d45 100644
--- a/Master/texmf-dist/source/latex/collcell/collcell.dtx
+++ b/Master/texmf-dist/source/latex/collcell/collcell.dtx
@@ -21,14 +21,14 @@
% and the derived file collcell.sty.
%
% \fi
-%%^^A $Id: collcell.dtx 2129 2011-02-04 11:36:33Z martin $
+%%^^A $Id: collcell.dtx 2135 2011-02-05 13:45:59Z martin $
%
% \iffalse
%<package>\ProvidesPackage{collcell}
%<*driver>
\ProvidesFile{collcell.dtx}
%</driver>
- [2011/02/04 v0.1 Collect the content of a tabular cell]
+ [2011/02/05 v0.1a Collect the content of a tabular cell]
%<*driver>
\documentclass{ydoc}
\GetFileInfo{\jobname.dtx}
@@ -67,6 +67,7 @@
%
% \changes{v0.0}{2009/08/13}{Created package}
% \changes{v0.1}{2011/02/04}{First released version}
+% \changes{v0.1a}{2011/02/05}{Fixed unwanted spaces. Fixed misspelled macros in example.}
%
%
% \DoNotIndex{\newcommand,\newenvironment,\def,\edef,\xdef,\DeclareRobustCommand}
@@ -116,7 +117,7 @@
% |\usepackage{array}|\\
% |\usepackage{collcell}|\\
% |% Preamble or document:|\\
-% |\newcolumntype{E}{>{\collectmacro\usermacro}c<{\endcollectmacro}}|\\
+% |\newcolumntype{E}{>{\collectcell\usermacro}c<{\endcollectcell}}|\\
% ||\\
% |% Document:|\\
% |\begin{tabular}{lE}|\\
@@ -153,7 +154,7 @@
\def\collect@cell@end{%
\expandafter\scantokens\expandafter
{\expandafter#1\expandafter{\the\collect@cell@toks}}%
- }
+ }%
\def\collect@cell@next{\collect@cell@look}%
\collect@cell@next
}
@@ -235,7 +236,7 @@
% \begin{macro}{\collect@cell@arg}
% \begin{macrocode}
\def\collect@cell@arg#1{%
- \ifx\collect@cell@lettoken\\
+ \ifx\collect@cell@lettoken\\%
\def\collect@cell@next{\collect@cell@end#1}%
\else
\ifx\collect@cell@lettoken\unskip