Intuitive table layouting in Latex (package tabulary)
While writing my paper I found out a nice page table layouting package - tabulary). If has the following advantages over tabularx:
- The results are “intuitive”, i.e. the table columns can be scaled proportionally to their original width (it takes some manual tricks to make
Xwith different widths). This is similar to HTML rendering in the browser. - Yet you can specify maximum and minimum width for layouting to avioid overly imbalanced tables.
- You can use various aligning (
C,L,Rdoes exactly what you think it does). - Obviously, similarly to
tabularxyou can mix the variable-width columns with fixed width ones.
The only problem was that tabulary (v.0.8) didn’t work well for me in all cases. I looked a bit into the code and I think I found the bug (I’m not a TeX expert, so I’m not sure, but it works for me now). The fix is the following one-line patch file:
--- tabulary.dtx 2006-01-11 15:45:03.000000000 +0100
+++ tabulary.dtx.orig 2006-01-11 15:44:29.000000000 +0100
@@ -599,7 +599,7 @@
\let\TY@checkmin\relax
\ifdim\TY@tablewidth>\z@
\Gscale@div\TY@ratio\TY@linewidth\TY@tablewidth
- \ifdim\TY@tablewidth <\TY@linewidth
+ \ifdim\TY@tablewidth <\linewidth
\def\TY@ratio{1}%
\fi
\else