we've quite often have to write tables in our CI layout (colors, borders, fonts, etc). At the moment we use the standard tabular environment with lots of extra instructions (in the environment parameters as well as individual cells).

I'd like to code my own environment, which handles everything on its own, so I can simply type it like that:

    head a &  head b  & head c \\
    data a1 & data b1 & datac1 \\
    data a2 & data b2 & datac2 \\

And this will automatically produce my CI-formatted table (eg. including horizontal line under head, specific colors for head and body cells, etc, etc).

Could anyone please enlighten me on how do that ?



1 Answer 1


Separation of content and design was a major issue in developing the cals package. The cals tables are verbose, but it allows to add hooks for decorations.

calstable in designs


% The table.
\brow \cell{$\phantom{n^2}n$} \cell{$n^2$} \erow
\brow \cell{1} \cell{1} \erow
\brow \cell{2} \cell{4} \erow
\brow \cell{3} \cell{9} \erow
\brow \cell{4} \cell{16} \erow
\brow \cell{5} \cell{25} \erow

% Display the table in the default design
\noindent Default design\par\smallskip


% Implement the corpodate design

\cals@setpadding{\vbox to 6mm{}}


% Display the table in the corporate design
\noindent Corporate design\par\smallskip


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .