Files
latex/docs/parts/reference/tables-index.tex
Janis Hutz b9d9f6772c
All checks were successful
Build docs / build_docs (push) Successful in 21s
Build helpers / build_helpers (push) Successful in 5s
[Tables] Add env for labeled table
2026-01-05 16:05:14 +01:00

42 lines
1.5 KiB
TeX

\newpage
\subsection{Tables}
\textit{Included in \texttt{most} and up}
You can set up nice looking tables using the \texttt{booktab} and \texttt{tabulary} environments.
\textit{New as of October 28 2025:} Tables and figures are now also numbered according to your settings
\begin{minted}{latex}
\begin{tables}{ll}{Left & Right}
Left content & Right Content\\
\end{tables}
\end{minted}
This outputs as
\begin{tables}{ll}{Left & Right}
Left content & Right Content \\
\end{tables}
This doesn't use the \texttt{table} environment, so no captions are possible, as to why there is also
\begin{minted}{latex}
\begin{fullTable}{ll}{Left & Right}{This is a caption}
Left content & Right Content\\
\end{fullTable}
\end{minted}
This outputs as
\begin{fullTable}{ll}{Left & Right}{This is a caption}
Left content & Right Content\\
\end{fullTable}
You may also use the \verb|labeledTable| environment, which takes as fourth argument the label you want to give the table a label to reference using \verb|\ref{tab:<your-label>}|
\subsection{Index}
\textit{Included in \texttt{most} and up}
If you want to use index, add \verb|\prepareIndex| to the preamble. Using \verb|\addIndexBold|\{\textit{string}\}, you can add entries to the index. They are printed in bold typeface in your document.
Using \verb|\addIndex|\{\textit{string}\}, you can do the same, but the text remains normal and using \verb|\addIndexItalic|\{\textit{string}\}, it is printed in italics