summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/slashbox
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-09 00:49:07 +0000
committerKarl Berry <karl@freefriends.org>2006-01-09 00:49:07 +0000
commit007f67a693e4d031fd3d792df8e4d5f43e2cb2e7 (patch)
tree90d17e00e572ecb1e24764b6f29c80e098b08d29 /Master/texmf-dist/doc/latex/slashbox
parent950209b26f70aa87ed07c54f82a95b6f03b7c3a0 (diff)
doc/latex
git-svn-id: svn://tug.org/texlive/trunk@84 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/slashbox')
-rw-r--r--Master/texmf-dist/doc/latex/slashbox/slashbox.tex68
1 files changed, 68 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/slashbox/slashbox.tex b/Master/texmf-dist/doc/latex/slashbox/slashbox.tex
new file mode 100644
index 00000000000..356c81f8ca2
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/slashbox/slashbox.tex
@@ -0,0 +1,68 @@
+\documentstyle[12pt,slashbox]{article}
+\pagestyle{empty}
+\begin{document}
+\begin{center}
+\large\bf
+Sample text for {\tt slashbox.sty}
+\end{center}
+
+The usage is pretty straightforward, such as
+\bigskip
+
+\noindent
+\begin{tabular}{|l||*{5}{c|}}\hline
+\backslashbox{Room}{Date}
+&\makebox[3em]{5/31}&\makebox[3em]{6/1}&\makebox[3em]{6/2}
+&\makebox[3em]{6/3}&\makebox[3em]{6/4}\\\hline\hline
+Meeting Room &&&&&\\\hline
+Auditorium &&&&&\\\hline
+Seminar Room &&&&&\\\hline
+\end{tabular}
+
+\bigskip
+You may include a newline (\verb+\\+) in `Room' and/or `Date'.
+Note that you will get spaces aside the slash line if there is a
+wider column in the same column of a different line.
+In such a case, you need to specify the width of the slashed column
+by saying
+
+\bigskip
+
+\noindent
+\begin{tabular}{|l||*{4}{c|}}\hline
+\backslashbox[48mm]{Room}{Date}
+&\makebox[3em]{5/31}&\makebox[3em]{6/1}&\makebox[3em]{6/2}
+&\makebox[3em]{6/3}\\\hline\hline
+Room With a Long Name &&&&\\\hline
+Auditorium &&&&\\\hline
+Seminar Room &&&&\\\hline
+\end{tabular}
+
+\bigskip
+The specified width is neglected if it is narrower than the natural
+width of the column.
+
+\verb+\(back)slashbox+ assumes by default that there is a blank space
+of width \verb+\tabcolsep+ on both sides of the column.
+Thus the slash line might exceeds the boundary when you use \verb+@{}+
+etc.
+
+You can avoid it by specifying
+\bigskip
+
+\noindent
+\begin{tabular}{|@{\ $\bullet$\hspace*{3mm}}l||*{5}{c|}}\hline
+\multicolumn{1}{|@{}l||}{\backslashbox[0pt][l]{Room}{Date}}
+&\makebox[3em]{5/31}&\makebox[4em]{6/1}&\makebox[3em]{6/2}
+&\makebox[3em]{6/3}&\makebox[3em]{6/4}\\\hline\hline
+Meeting Room &&&&&\\\hline
+Auditorium &&&&&\\\hline
+Seminar Room &&&&&\\\hline
+\end{tabular}
+\bigskip
+
+Here \verb+[l]+ tells the command that there is no extra space on the
+left of this column. You can use \verb+[r]+ and \verb+[lr]+ likewise.
+You have to also specify the width of the column in this case, but it
+can be 0pt.
+\end{document}