GithubHelp home page GithubHelp logo

collcell's Introduction

The collcell Package
--------------------
Copyright (c) 2009-2022-2022 by Martin Scharrer <[email protected]>
CTAN: http://www.ctan.org/pkg/collcell/
Code repository: https://github.com/MartinScharrer/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.

collcell's People

Contributors

martinscharrer avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.