Deyan Ginev edited section_Tables__.tex  almost 9 years ago

Commit id: 4c7d3945cec304be7bfac99967f07bb733796bba

deletions | additions      

       

\section{Tables}  \subsection{Merging rows and columns}  \begin{itemize}  \item To merge columns: \verb|\multicolumn{cell count}{layout}{content}|  \item To merge rows: \verb|\multirow{cell count}{layout}{content}|  \end{itemize}  \begin{lstlisting}  \begin{tabular}{|l|l|l|}  \hline  \multicolumn{3}{|c|}{Table cheat sheet} \\  \hline  Goalkeeper & GK & Paul Robinson \\ \hline  \multirow{4}{*}{Defenders} & LB & Lucus Radebe \\  & DC & Michael Duberry \\  & DC & Dominic Matteo \\  & RB & Didier Domi \\ \hline  \multirow{3}{*}{Midfielders} & MC & David Batty \\  & MC & Eirik Bakke \\  & MC & Jody Morris \\ \hline  Forward & FW & Jamie McMaster \\ \hline  \multirow{2}{*}{Strikers} & ST & Alan Smith \\  & ST & Mark Viduka \\  \hline  \end{tabular}  \end{lstlisting}  \begin{table}  \begin{tabular}{|l|l|l|}  \hline  \multicolumn{3}{|c|}{Table cheat sheet} \\  \hline  Goalkeeper & GK & Paul Robinson \\ \hline  \multirow{4}{*}{Defenders} & LB & Lucus Radebe \\  & DC & Michael Duberry \\  & DC & Dominic Matteo \\  & RB & Didier Domi \\ \hline  \multirow{3}{*}{Midfielders} & MC & David Batty \\  & MC & Eirik Bakke \\  & MC & Jody Morris \\ \hline  Forward & FW & Jamie McMaster \\ \hline  \multirow{2}{*}{Strikers} & ST & Alan Smith \\  & ST & Mark Viduka \\  \hline  \end{tabular}  \label{tab:cheatsheet}  \end{table}