[Tables] Add env for labeled table
All checks were successful
Build docs / build_docs (push) Successful in 21s
Build helpers / build_helpers (push) Successful in 5s

This commit is contained in:
2026-01-05 16:05:14 +01:00
parent b0e161e133
commit b9d9f6772c
5 changed files with 69 additions and 0 deletions

18
dist/full.tex vendored
View File

@@ -1036,6 +1036,24 @@
}{
\end{tables}
\caption{\tableCaption}
\ifnum\value{numberingConfig}=3
\labelIt{all}
\else
\labelIt{table}
\fi
\end{table}
}
% Labeled table. #1 layout, #2 title row, #3 caption, #4 label
\newenvironment{labeledTable}[4]{
\edef\tableLabel{#4}
\edef\tableCaption{#3}
\begin{table}[h!]
\begin{tables}{#1}{#2}
}{
\end{tables}
\caption{\tableCaption}
\label{\tableLabel}
\end{table}
}

18
dist/most.tex vendored
View File

@@ -1036,5 +1036,23 @@
}{
\end{tables}
\caption{\tableCaption}
\ifnum\value{numberingConfig}=3
\labelIt{all}
\else
\labelIt{table}
\fi
\end{table}
}
% Labeled table. #1 layout, #2 title row, #3 caption, #4 label
\newenvironment{labeledTable}[4]{
\edef\tableLabel{#4}
\edef\tableCaption{#3}
\begin{table}[h!]
\begin{tables}{#1}{#2}
}{
\end{tables}
\caption{\tableCaption}
\label{\tableLabel}
\end{table}
}

18
dist/recommended.tex vendored
View File

@@ -1036,6 +1036,24 @@
}{
\end{tables}
\caption{\tableCaption}
\ifnum\value{numberingConfig}=3
\labelIt{all}
\else
\labelIt{table}
\fi
\end{table}
}
% Labeled table. #1 layout, #2 title row, #3 caption, #4 label
\newenvironment{labeledTable}[4]{
\edef\tableLabel{#4}
\edef\tableCaption{#3}
\begin{table}[h!]
\begin{tables}{#1}{#2}
}{
\end{tables}
\caption{\tableCaption}
\label{\tableLabel}
\end{table}
}

View File

@@ -30,6 +30,8 @@ This outputs as
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}

View File

@@ -31,3 +31,16 @@
\caption{\tableCaption}
\end{table}
}
% Labeled table. #1 layout, #2 title row, #3 caption, #4 label
\newenvironment{labeledTable}[4]{
\edef\tableLabel{#4}
\edef\tableCaption{#3}
\begin{table}[h!]
\begin{tables}{#1}{#2}
}{
\end{tables}
\caption{\tableCaption}
\label{\tableLabel}
\end{table}
}