More on TikZ tables

At present I don’t have much time for the blog because of my work, but I keep on reading and answering questions and comments.

For instance since I’ve noticed a link by Uwe to a table related topic and because of Oliviers comment there I’ve added another comment to “Fancy tables with TikZ“. It shows a tikz-matrix based table, seperating the actual implementation from the table contents. A simple code like

begin{mytable}{1.2cm}{2.4cm}{1.2cm}{0.6cm}{
   head{Rank} & head{Distribution} & head{Hits} & \
   1 & Ubuntu & 2114 & down \
   2 & Fedora & 1451 & up   \
             ...
  10 & Arch   &  625 & down \
}
end{mytable}

produces the following output.

table with TikZ

Changing the style of tables in the whole document is easier when they are defined as new environments in the preamble. For instance the mytable environment could be implemented without TikZ using just the standard tabular environment without changing the usage of those tables. Likewise with head – I avoid using textbf directly. It allows to change the look of the headings in a consistent way by formatting logically.

Comments and suggestions are always welcome, perhaps following the original post “Fancy tables with TikZ“.

30. April 2010 by stefan
Categories: Uncategorized | 1 comment

One Comment

  1. Thanks, that’s really nice to know – glad I subscribe to your feed.

Leave a Reply

Required fields are marked *