Skip to content

Latest commit

 

History

History
116 lines (95 loc) · 2.65 KB

tables.md

File metadata and controls

116 lines (95 loc) · 2.65 KB

Tables -- Using Tabular

Click here for longtables i.e. multi-page tables.

tabular is the most straight forwards in my opinion for this.

It should be auto-imported so there isn't a need to use \usepackage{tabular}.

Below is a template you can copy and paste in if you'd prefer, but it's good to understand how it works incase some issue comes up! E.g. if a character is accidently deleted.

\begin{tabular}{rc|c}
    \# & \textbf{Statement} & \textbf{Reason} \\
    \hline

    1.  & insert statement & insert reasoning \\
    2.  & ... &  \\
    .   & ... &  \\
    .   & ... &  \\
    .   & ... &  \\
\end{tabular}

Character Meanings

Expression Functionality Additional Information
\\ New line/row $\rightarrow$ even if you're in the middle column it'll jump to cell 0 of the next line
& Next column && will skip the cell and leave it blank
\hline Horizontal line Adds a horizontal line that helps create a t shape table
\# Hashtag Hashtags are special characters so the \ indicates that we want a literal hashtag. This is optional I just like using it to denote the row count column. You could just leave this column blank.

Additional Character Meanings

These are specifically for the {rc|c} part of \begin{tabular}

Character Functionality Notes
r Adds a right-aligned column
j Adds a justified column
c Adds a centred-column
| Inserts vertical bar into table at this spot The bar character between BACKSPACE and ENTER
|| Inserts a double dividing bar

Character Examples

r c c 3 columns right, centred, centred
j | c 2 columns with a dividing bar justified, centred
r r c || j l 5 columns with a doublebar between the first 3 and last 2 right, right, centred, BAR, justified, left

Full Examples

Code Output Notes
j | c 2 columns with a dividing bar justified, centred