Table Frames beyond simple lines
Perhaps tikz
can help here
Of course, because it's tikz
, you can get much more adventurous with your affects if you want to.
\documentclass{article}
\usepackage{tikz}
\begin{document}
\tikz\node[draw=red,thick,double,inner sep=1pt]{
\begin{tabular}{l|l}
A & B\\
\hline
C & D\\
\end{tabular}};
\end{document}
If you'd like to apply the idea to every tabular
, then you could use the etoolbox
, perhaps something like the following- note the gradient shading :)
\documentclass{article}
\usepackage{tikz}
\usepackage{etoolbox}
\BeforeBeginEnvironment{tabular}{\tikzpicture\node[draw=red,thick,double,inner sep=1pt,top color=blue,bottom color=yellow]\bgroup}
\AfterEndEnvironment{tabular}{\egroup;\endtikzpicture}
\begin{document}
\begin{tabular}{l|l}
A & B\\
\hline
C & D\\
\end{tabular}
\end{document}
Perhaps you'd like rounded corners
\BeforeBeginEnvironment{tabular}{\tikzpicture\node[rounded corners=3pt,draw=red,thick,double,inner sep=1pt,top color=blue,bottom color=yellow]\bgroup}
You could even go completely crazy and surround the tabular
in a circle
or a star
, but I'll leave that up to you :)
The possibilities are limited only by imagination- have fun, and check out the manual for more ideas and options.
You could be interested in the features provided by the tabu
package: a simple example:
\documentclass{article}
\usepackage{xcolor}
\usepackage{tabu}
\begin{document}
{\arrayrulewidth=3pt
\begin {tabu}{|[5pt cyan!60!black]c|[5pt red!60!black] c|[5pt cyan!60!black]}
\taburulecolor{orange}
\hline
A & B \\
\hline
C & D \\
\hline
\end {tabu}
}
\end{document}
Besides the TikZ solution where you can create very interesting tables, there is the hhline
package which is suited for just tables.
Code
\documentclass{article}
\usepackage{hhline}
\begin{document}
\begin{tabular}{||l|l||}
\hhline{#==#}
A & B \\ \hhline{|--|}
C & D \\ \hhline{#==#}
\end{tabular}
\begin{tabular}{||l|l||}
\hhline{|t:==:t|}
A & B \\ \hhline{||--||}
C & D \\ \hhline{|b:==:b|}
\end{tabular}
\end{document}