From 300c48ee48cd89dab7bc133b81ba84eda8b6d605 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 6 Feb 2011 16:41:05 +0000 Subject: collcell (6feb11) git-svn-id: svn://tug.org/texlive/trunk@21315 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/collcell/README | 45 ----------- Master/texmf-dist/doc/latex/collcell/collcell.pdf | Bin 129764 -> 154309 bytes Master/texmf-dist/source/latex/collcell/Makefile | 86 +++++++++++++++++++++ Master/texmf-dist/source/latex/collcell/README | 45 +++++++++++ .../texmf-dist/source/latex/collcell/collcell.dtx | 11 +-- Master/texmf-dist/tex/latex/collcell/collcell.sty | 8 +- 6 files changed, 141 insertions(+), 54 deletions(-) delete mode 100644 Master/texmf-dist/doc/latex/collcell/README create mode 100644 Master/texmf-dist/source/latex/collcell/Makefile create mode 100644 Master/texmf-dist/source/latex/collcell/README (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/collcell/README b/Master/texmf-dist/doc/latex/collcell/README deleted file mode 100644 index 01b7b6235f5..00000000000 --- a/Master/texmf-dist/doc/latex/collcell/README +++ /dev/null @@ -1,45 +0,0 @@ -The collcell Package --------------------- -Copyright (C) 2009-2011 by Martin Scharrer -http://www.ctan.org/pkg/collcell/ -Version v0.1 -- 2011/02/04 - -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/doc/latex/collcell/collcell.pdf b/Master/texmf-dist/doc/latex/collcell/collcell.pdf index 9c03608085e..db1e605ca35 100644 Binary files a/Master/texmf-dist/doc/latex/collcell/collcell.pdf and b/Master/texmf-dist/doc/latex/collcell/collcell.pdf differ 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 +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 %\ProvidesPackage{collcell} %<*driver> \ProvidesFile{collcell.dtx} % - [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 diff --git a/Master/texmf-dist/tex/latex/collcell/collcell.sty b/Master/texmf-dist/tex/latex/collcell/collcell.sty index 8bfad2e0d8f..9429e396daa 100644 --- a/Master/texmf-dist/tex/latex/collcell/collcell.sty +++ b/Master/texmf-dist/tex/latex/collcell/collcell.sty @@ -25,9 +25,9 @@ %% This work consists of the files collcell.dtx, collcell.ins %% and the derived file collcell.sty. %% -%%^^A $Id: collcell.dtx 2129 2011-02-04 11:36:33Z martin $ +%%^^A $Id: collcell.dtx 2135 2011-02-05 13:45:59Z martin $ \ProvidesPackage{collcell} - [2011/02/04 v0.1 Collect the content of a tabular cell] + [2011/02/05 v0.1a Collect the content of a tabular cell] \newtoks\collect@cell@toks \newenvironment{collectcell}{}{} \def\collectcell#1#2\ignorespaces{% @@ -36,7 +36,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 } @@ -81,7 +81,7 @@ \let\collect@cell@spaces\empty } \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 -- cgit v1.2.3