# Tables

## Tables in Column

Use the following template to include tables in the column:

```latex
\begin{table}[htbp!]
\centering\small{ %\resizebox{\columnwidth}{!}{
\begin{tabular}{c|ccc} 
\toprule
\bf A & \bf B & \bf C & \bf D \\
\midrule
0 & A0 & B0 & C0 \\
1 & A1 & B1 & C1 \\
2 & A2 & B2 & C2 \\
3 & A3 & B3 & C3 \\
\bottomrule
\end{tabular}}
\caption{Description of this table.}
\label{tab:name}
\end{table}
```

Use the following options for all tables:

```latex
\begin{table}[htbp!]
\centering\small{ %\resizebox{\columnwidth}{!}{
```

If the table exceeds the column width, put the `tabular` inside a `\resizebox` instead:

```latex
\centering\resizebox{\columnwidth}{!}{
\begin{tabular}{c||c|c|c}
...
\end{tabular}}
```

Make sure values in the header row are always center-aligned regardless of the configuration. You can specify this by using `\multicolumn`:

```latex
\begin{tabular}{c||r|r|r} 
\bf A & \multicolumn{1}{c|}{\bf B} & \multicolumn{1}{c|}{\bf C} & \multicolumn{1}{c}{\bf D} \\
```

Make sure the label starts with the prefix `tab:`.

## Tables in Page

Use the following template to include tables that expand to the full page.

```latex
\begin{table*}[htbp!]
\centering\small{ %\resizebox{\textwidth}{!}{
\begin{tabular}{c|ccc} 
\toprule
\bf A & \bf B & \bf C & \bf D \\
\midrule
0 & A0 & B0 & C0 \\
1 & A1 & B1 & C1 \\
2 & A2 & B2 & C2 \\
3 & A3 & B3 & C3 \\
\bottomrule
\end{tabular}}
\caption{Description of this table.}
\label{tab:name}
\end{table*}
```

* If the table exceeds the page width, use `\textwidth` instead of `\columnwidth` for `\resizebox`.
* See the other explanations for the [Tables in Column](#tables-in-column).

## Sub-Tables

Use the following template to create sub-tables.

```latex
\begin{table}[htbp!]
\centering

\begin{subtable}{\columnwidth}
\centering\small{ %\resizebox{\columnwidth}{!}{
\begin{tabular}{c|ccc} 
\toprule
\bf A & \bf B & \bf C & \bf D \\
\midrule
0 & A0 & B0 & C0 \\
1 & A1 & B1 & C1 \\
2 & A2 & B2 & C2 \\
3 & A3 & B3 & C3 \\
\bottomrule
\end{tabular}}
\caption{Sub-table 1.}
\label{tab:name-1}
\end{subtable}
\vspace{0.5em}

\begin{subtable}{\columnwidth}
\centering\small{ %\resizebox{\columnwidth}{!}{
\begin{tabular}{c|ccc} 
\toprule
\bf A & \bf B & \bf C & \bf D \\
\midrule
0 & A0 & B0 & C0 \\
1 & A1 & B1 & C1 \\
2 & A2 & B2 & C2 \\
3 & A3 & B3 & C3 \\
\bottomrule
\end{tabular}}
\caption{Sub-table 2.}
\label{tab:name-2}
\end{subtable}

\caption{Description.}
\label{tab:name}
\end{table}
```

* The `subtable` environment requires the `subcaption` package.
* Put `\vspace{0.5em}` at the end of every sub-table except for the very last one.
* See [Tables in Page](#tables-in-page) to create sub-tables that expand to the full page.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://emory.gitbook.io/ai-research-practicum/supplementary/latex-guidelines/tables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
