Menu
CTAN
Comprehensive TeX Archive Network
Cover Upload Browse

Direc­tory tex-archive/macros/latex/contrib/collcell

The collcell Package
--------------------
Copyright (C) 2009-2011 by Martin Scharrer <martin@scharrer-online.de>
http://www.ctan.org/pkg/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.

Files

Name Size Date Notes
Makefile 2029 2011-02-27 03:23
README 1780 2011-02-27 03:24
collcell.dtx 19355 2011-02-27 03:23
collcell.ins 1741 2011-02-27 03:23
collcell.pdf 274551 2011-02-27 03:24

Down­load the con­tents of this pack­age in one zip archive (230.5k).

coll­cell – Col­lect con­tents of a tab­u­lar cell as ar­gu­ment to a macro

The pack­age pro­vides macros that col­lect the con­tent of a tab­u­lar cell, and of­fer them as an ar­gu­ment to a macro. Spe­cial care is taken to re­move all align­ing macros in­serted by tab­u­lar from the cell con­tent. The macros also work in the last col­umn of a ta­ble, but do not sup­port ver­ba­tim ma­te­rial in­side the cells.

Pack­age De­tailscoll­cell
Ver­sion0.5
Li­censeThe LaTeX Project Public Li­cense 1.3
Copy­right2009-2011 Martin Schar­rer
Main­tainerMartin Schar­rer
TDS archivecollcell.tds.zip
Con­tained inTeXlive as coll­cell
MikTeX as coll­cell
Topics ta­ble type­set­ting
Guest Book Sitemap Contact