1\documentclass{article} 2\usepackage{tabularx} 3\usepackage{rotating} 4\usepackage{multirow} 5%\usepackage{slashbox} 6\usepackage{makecell} 7\usepackage{xcolor} 8\renewcommand\theadfont{\color{red}\bfseries} 9\begin{document} 10 11\section{makecell} 12\begin{tabular}{|c|c|} 13\hline 14Cell text & 28--31\\ 15\hline 16\makecell{Multilined \\ cell text} & 28--31\\ 17\hline 18\makecell[l]{Left aligned \\ cell text} & 37--43\\ 19\hline 20\makecell*[r]{Right aligned \\ cell text} & 37--43\\ 21\hline 22\makecell[b]{Bottom aligned \\ cell text} & 52--58\\ 23\hline 24\makecell*[{{p{3cm}}}]{Cell long text with predefined width} & 52--58\\ 25\hline 26\makecell[{{>{\parindent1em}p{3cm}}}]{Cell long...} & 52--58\\ 27\hline 28\end{tabular} 29 30\section{thead} 31\renewcommand\theadset{\def\arraystretch{.85}}% 32\begin{tabular}{|l|c|} 33 \hline 34 \thead{First column head}& 35\thead{Second \\multlined \\ column head}\\ 36\hline 37Left column text & 28--31\\ 38\hline 39\end{tabular} 40 41\section{rothead} 42\settowidth\rotheadsize{\theadfont Second multilined} 43\begin{tabular}{|l|c|} 44\hline 45\thead{First column head}& 46\rothead{Second multilined \\ column head}\\ 47\hline 48Left column text & 28--31\\ 49\hline 50\end{tabular} 51 52\section{Cell settings: cellset, cellalign, cellgape, cellrotangle} 53\section{Head settings:theadfont,theadset, theadalign, theadgape, rotheadgape} 54\section{Height/Depth settings: gape, Gape, bottopstrut,topstrut,botstrut} 55\section{Vertical space: setcellgapes, makegapedcells, nomakegapedcells} 56\section{Multirow: multirowcell, multirowthead} 57\renewcommand\theadset{\def\arraystretch{.85}}% 58\begin{tabular}{|l|c|c|} 59 \hline 60\multirowthead{4}{First ...}& 61%\multirowthead{2}{First ...}& 62\multicolumn{2}{c|}{\thead{Multicolumn head}}\\ \cline{2-3} 63& \thead{Second ...} & \thead{Third ...}\\ \hline 64Cell text & A &\multirowcell{3}{28--31}\\ \cline{1-2} 65\makecell{Multilined\\Cell text} & B& \\ \hline 66\makecell[l]{Left ...} & C & \multirowcell{4}[1ex][l]{37--43}\\ \cline{1-2} 67\makecell[r]{Right ...} & D & \\ \hline 68\makecell[b]{Bottom ...} & E & \multirowcell{5}[1ex][r]{37--43\\52--58}\\ \cline{1-2} 69\makecell[{{p{5cm}}}]{Cell ...} & F & \\ \cline{1-2} 70\makecell[{{>{\parindent1em}p{5cm}}}]{Cell ...} & G & \\ \hline 71\end{tabular} 72 73%\end{document} 74 75 76% \makegapedcells 77% \renewcommand\theadset{\def\arraystretch{.85}}% 78% \renewcommand\theadgape{} 79 80% \makegapedcells 81% \renewcommand\theadset{\def\arraystretch{.85}}% 82% \renewcommand\theadgape{} 83% \begin{tabularx}\hsize{|X|c|c|} 84% %... 85% \cline{1-2} 86% \makecell[{{p{\hsize}}}]{Cell ...} & F & \\ 87% \cline{1-2} 88% \makecell[{{>{\parindent1em}p{\hsize}}}]{Cell ...} & G & \\ 89% \hline 90% \end{tabularx} 91 92\section{Numbered Lines} 93\begin{tabular}{|*{12}{c|}} 94\hline 95\eline{6} \\ \hline 96\nline{6} \\ \hline 97\eline{3} & \nline[1][4]{3} \\ \hline 98\nline[(a)]{6} \\ \hline 99\nline[column I]{6} \\ \hline 100\end{tabular} 101 102% \begin{tabular}{|*{4}{c|}} 103% \hline 104% \thead{No}&\thead{First Data}&\thead{Second Data}&\thead{Third Data} \\ 105% \hline 106% \erows{4}{8} 107% \end{tabular}\quad 108% \begin{tabular}{||c||c||c||c||} 109% \hhline{|t:=:t:=:t:=:t:=:t|} 110% \thead{No}&\thead{First Data}&\thead{Second Data}&\thead{Third Data} \\ 111% \hhline{|:=::=::=::=:|} 112% \erows[\\ \hhline{|:=::=::=::=:|}]{4}{8} 113% \eline{4}\\ \hhline{|b:=:b:=:b:=:b:=:b|} 114% \end{tabular}\quad 115% \begin{tabular}{|*{4}{c|}} 116% \hline 117% \thead{No}&\thead{First Data}&\thead{Second Data}&\thead{Third Data} \\ 118% \hline 119% \Xrows{\refstepcounter{enumi}\arabic{enumi}.\eline{3}\\ \hline}{8} 120% \end{tabular} 121 122\section{Diagonally divided} 123% \makegapedcells 124% \begin{tabular}{|l|c|c|}\hline 125% \diaghead{\theadfont Diag ColumnmnHead II}% 126% {Diag Column \\Head I}{Diag\\Column Head II}& 127% \thead{Second\\column}&\thead{Third\\column}\\ 128% \hline... 129% \end{tabular}\medskip 130% \begin{tabularx}{.62\hsize}{|X|c|c|}\hline 131% \diaghead(-4,1){\hskip\hsize}% 132% {Diag \\Column Head I}{Diag Column \\Head II}& 133% \thead{Second\\column}&\thead{Third\\column}\\ 134% \hline... 135% \end{tabularx}\medskip 136 137\nomakegapedcells 138\begin{tabular}{|l|c|c|}\hline 139\diaghead(4,1){\hskip4.2cm}% 140{Diag \\Column Head I}{Diag Column \\Head II}& 141\thead{Second\\column}&\thead{Third\\column}\\ 142 \hline 143 one & two & three \\\hline 144\end{tabular} 145 146\end{document} 147 148\section{slashbox} 149\begin{tabular}{|l||*{5}{c|}}\hline 150\backslashbox{Room}{Date} 151&\makebox[3em]{5/31}&\makebox[3em]{6/1}&\makebox[3em]{6/2} 152&\makebox[3em]{6/3}&\makebox[3em]{6/4}\\\hline\hline 153Meeting Room &&&&&\\\hline 154Auditorium &&&&&\\\hline 155Seminar Room &&&&&\\\hline 156 \end{tabular} 157 158\begin{tabular}{|l||*{4}{c|}}\hline 159\backslashbox[48mm]{Room}{Date} 160&\makebox[3em]{5/31}&\makebox[3em]{6/1}&\makebox[3em]{6/2} 161&\makebox[3em]{6/3}\\\hline\hline 162Room With a Long Name &&&&\\\hline 163Auditorium &&&&\\\hline 164Seminar Room &&&&\\\hline 165\end{tabular} 166 167\begin{tabular}{|@{\ $\bullet$\hspace*{3mm}}l||*{5}{c|}}\hline 168\multicolumn{1}{|@{}l||}{\backslashbox[0pt][l]{Room}{Date}} 169&\makebox[3em]{5/31}&\makebox[4em]{6/1}&\makebox[3em]{6/2} 170&\makebox[3em]{6/3}&\makebox[3em]{6/4}\\\hline\hline 171Meeting Room &&&&&\\\hline 172Auditorium &&&&&\\\hline 173Seminar Room &&&&&\\\hline 174\end{tabular} 175 176\begin{tabular}{|l||*{5}{c|}}\hline 177\theadset\theadfont\backslashbox{Room}{Date} 178&\makebox[3em]{\thead{5/31}}&\makebox[3em]{\thead{6/1}}&\makebox[3em]{\thead{6/2}} 179&\makebox[3em]{6/3}&\makebox[3em]{\thead{6/4}}\\\hline\hline 180Meeting Room &&&&&\\\hline 181Auditorium &&&&&\\\hline 182Seminar Room &&&&&\\\hline 183\end{tabular} 184 185\begin{tabular}{|l||*{4}{c|}}\hline 186\theadset\backslashbox[48mm]{Room}{Date} 187&\makebox[3em]{\thead{5/31}}&\makebox[3em]{\thead{6/1}}&\makebox[3em]{\thead{6/2}} 188&\makebox[3em]{\thead{6/3}}\\\hline\hline 189Room With a Long Name &&&&\\\hline 190Auditorium &&&&\\\hline 191Seminar Room &&&&\\\hline 192\end{tabular} 193 194\begin{table} 195\renewcommand\theadset{\def\arraystretch{.85}}% 196\renewcommand\theadgape{} 197\ttabbox 198{\caption{...}\label{...}}% 199{\begin{tabular}{!{\vrule width1.2pt}c 200!{\vrule width1.2pt}c|c 201!{\vrule width1.2pt}} 202\Xhline{1.2pt} 203\multirowthead{4}{First Column head}& 204\multicolumn{2}{c!{\vrule width1.2pt}}{\thead{Multicolumn head}}\\ 205\Xcline{2-3}{1.2pt} 206& \thead{Second \\multlined \\ column head} & 207\thead{Third \\ column head}\\ 208\Xhline{1.2pt} 209Cell text & A &\multirowcell{4}{28--31}\\ 210... 211\Xhline{1.2pt} 212\end{tabular}} 213\end{table} 214 215 216\end{document}