Tables

Standard layout

1
2
3
4
5
\begin{table}
A & B & C \\
D & E & F \\
G & H & I
\end{table}

head, body, foot

1
2
3
4
5
6
7
8
9
10
\begin{table}
  \head
     Name & Value & Description
  \body
     A   &  12   & Something \\
     B   &  25   & Something else \\
     C   &   0   & Nothing
  \foot
     Sum &  37   & Total value
\end{table}

align

It controls the horizontal align of the table.
Alignchar must be one of the characters l, r, c for left, right, center

1
2
3
4
\begin{table}[\align{l}]
  Abba & Babba \\
  C & D
\end{table}

1
2
3
4
\begin{table}[\align{c}]
  Abba & Babba \\
  C & D
\end{table}

1
2
3
4
\begin{table}[\align{r}]
  Abba & Babba \\
  C & D
\end{table}

cellaligns

Possible alignment characters are: l, r, c for left, right, center.

The n-th character in aligns controls sets the n-th column of the table.

1
2
3
4
5
6
7
8
\begin{table}[\cellaligns{rcl}]
  \head
    1 & 2 & 3
  \body
    A & B & C \\
    D & E & F \\
    G & H & I
\end{table}

cellvaligns

Possible alignment characters are: t, m, b, B for top, middle, bottom, baseline

The n-th character in aligns controls sets the n-th column of the table.

1
2
3
\begin{table}[\cellvaligns{Btbm}]
  A \newline A & B & C & D\\
\end{table}

no border

1
2
3
4
5
\begin{table}[\class{layout}]
    $\underline{\mu_1}= 1$ &  $\qquad \qquad \overline{\mu_1}= 3$  \\
    $\underline{\mu_2}= 2$ &  $\qquad \qquad \overline{\mu_2}= 4$  \\
    $\underline{\mu_3}= 3$ &  $\qquad \qquad \overline{\mu_3}= 5$  \\
\end{table}

Addition

1
2
3
4
5
6
\begin{table}[\class{layout}]
 & & 3,& 8 & 3\\
 +& & 7,& 8 & 1\\
 \colspan{5}\hrule\\
 & 1 & 1, & 6 & 4
\end{table}

Colspan

1
2
3
4
5
6
\begin{table}[\cellaligns{ccc}]
 3 & 8 & 3\\
 7 & \colspan{2} 8 \\
 \colspan{2} 3 & 5 \\
 1 & 6 & 4
\end{table}

Rowspan

1
2
3
4
5
\begin{table}[\cellaligns{ccc}]
 3 & 8 & 3\\
 7 & \rowspan{2} 8 & 1\\
 1 &  4
\end{table}

background

This command sets the background style property of e.g. a table or explicitly of a table header, body or footer.
Valid parameters are:

  • CSS color names, e.g. red, lavender
  • RGB values, e.g. rgb(255,228,196)
  • Hexadecimal, e.g. #00FF00
1
2
3
4
5
6
7
8
9
\begin{table}[\background{green}]
\head[\background{rgb(255,228,196)}]
A & B & C & D
\body
& 3 & 8 & 3\\
& 7 & 8 & 1
\foot[\background{#EEEEEE}]
A & B & C & D        
\end{table}

items

1
2
3
4
5
\begin{table}[\class{items}]
 3 & 8 & 3\\
 4 & 7 & 8\\
 1 & 1 & 6
\end{table}

Generic Problem Example - butcher - Not yet available everywhere

1
2
3
4
5
\begin{table}[\class{butcher}\cellaligns{cccc}]
\ansref & & \\
\ansref & \ansref & \\
 & \ansref & \ansref\\
\end{table}

Generic Problem Example - simple - Not yet available everywhere

1
2
3
4
5
\begin{table}[\class{simple}\cellaligns{ccccccc}]
$ \phantom{.}_t$ ╲ $\phantom{.}^x$& 0 & 5 & 10 & 15 & 20 & 25\\
0 & \ansref & \ansref & \ansref & \ansref & \ansref & \ansref \\
5 & \ansref & \ansref & \ansref & \ansref & \ansref & \ansref \\
\end{table}