Menu

Tree [70101c] default tip /
 History

Read Only access


File Date Author Commit
 .hgignore 2012-05-12 Martin Scharrer Martin Scharrer [846edb] Added .hgignore file.
 .hgtags 2011-07-26 Martin Scharrer Martin Scharrer [980888] Added tag v0.5 for changeset 598172b1f04f
 Makefile 2020-09-29 Martin Scharrer Martin Scharrer [70101c] Updated email address in Makefile
 README 2016-04-24 Martin Scharrer Martin Scharrer [09e228] Updated ZIP Makefile target and copyright year.
 cc_example.tex 2011-02-21 Martin Scharrer Martin Scharrer [eb373f] dev/cc_example.tex::
 collcell.dtx 2012-05-12 Martin Scharrer Martin Scharrer [1ee1b2] Changed to new ydocstrip format.
 collcell.ins 2012-05-12 Martin Scharrer Martin Scharrer [1ee1b2] Changed to new ydocstrip format.
 collcell.sty 2012-05-12 Martin Scharrer Martin Scharrer [1ee1b2] Changed to new ydocstrip format.
 test.tex 2011-01-28 Martin Scharrer Martin Scharrer [f9b70d] dev/collcell.dtx:: Changed order and def macro...

Read Me

The collcell Package
--------------------
Copyright (C) 2009-2016 by Martin Scharrer <martin@scharrer-online.de>
CTAN: http://www.ctan.org/pkg/collcell/
Code repository: https://bitbucket.org/martin_scharrer/collcell

This 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.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.