Splitting a cell diagonally
If we need a header for the first column but also for the entries of the first row, the top-left cell can be split to contain both header entries, separated by a diagonal line.
How to do it...
We will use the slashbox
package. It is part of MiKTeX, but not of
TeX Live. Users of TeX Live can download it from CTAN
at http://ctan.org/pkg/slashbox.
In this recipe, we will build a time table. It's intended to be filled out by hand later, so we willuse vertical lines for delimiting fields. Follow these steps:
Use any document class. Here, we simply use the
article
class:\documentclass{article}
Load the
slashbox
package:\usepackage{slashbox}
Within the document body, create the
tabular
layout:\begin{document} \renewcommand{\arraystretch}{1.8} \begin{tabular}{|l|c|c|c|c|c|} \hline \backslashbox{Time}{Weekday} & Monday & Tuesday & Wednesday & Thursday & Friday \\ \hline 8--10 & & & & & \\ 10--12 &...