Diagbox is designed to replace the old slashbox macro Package 1. The reason for writing this macro package is that slashbox is excluded by Tex live due to lack of clear free license information. This macro package is released under the lppl protocol.
Diagbox is a modern version of the slashbox macro package. It adopts new key-Value Syntax parameters, removes some original slashbox length restrictions, and calls the pict2e macro package to draw a diagonal line; in particular, a new function is added to draw the headers of two diagonal lines. Instead of slashbox, diagbox not only provides its own new commands, but also provides the original two commands of slashbox. The syntax remains unchanged and the compilation results are slightly different.
Diagbox depends on the ε-Tex extension (which is always available currently) and the pict2e, keyval, and FP macro packages.
The Code is as follows:
\ Begin {tabular }{| L | CCC |}
\ Hline
\ Diagbox {time} {room} {day} & mon & Tue & wed \\
\ Hline
Morning
& Used &
\\
Afternoon &
& Used \\
\ Hline
\ End {tabular}
The Code is as follows:
\ Begin {tabular }{|{} L | c | [email protected] {}|}
\ Hline
\ Diagbox [width = 5em, trim = L] {time} {day} & mon & Tue & wed \\
\ Hline
Morning
& Used \\
\ Hline
Afternoon &
& Used & \ diagbox [dir = Sw, Height = 2em, trim = R] {A} {B }\\
\ Hline
\ End {tabular}
For specific usage and parameters, see:
Http://ctan.org/tex-archive/macros/latex/contrib/diagbox
Latex: How to Create a diagonal line Header