Fix tab positioning

This commit is contained in:
2024-08-22 18:35:46 +02:00
parent 0c8e20b5f5
commit fbcea43187

View File

@@ -180,29 +180,26 @@
% example:
% \begin{tab}{label}{Title}
% \begin{tabular}{cc}
% \hline
% \textbf{1} & \textbf{2} \\ \hline
% 3 & 4 \\ \hline
% \textbf{1} & \textbf{2} \\
% 3 & 4 \\
% \end{tabular}
% \end{tab}
% reference later with: \tabref{label}
\NewDocumentEnvironment{tab}{m m}{% #1 = label, #2 = title
\begin{table}%
\begin{center}
\caption{#2}%
\label{tab:#1}%
\NewDocumentEnvironment{tab}{O{htbp} m m}{% #1 = position, #2 = label, #3 = title
\begin{table}[#1]%
\centering%
\caption{#3}%
\label{tab:#2}%
}{%
\end{center}%
\end{table}%
}
\NewDocumentEnvironment{tabwide}{m m}{% #1 = label, #2 = title
\begin{table*}%
\begin{center}
\caption{#2}%
\label{tab:#1}%
\NewDocumentEnvironment{tabwide}{O{htbp} m m}{% #1 = position, #2 = label, #3 = title
\begin{table*}[#1]%
\centering%
\caption{#3}%
\label{tab:#2}%
}{%
\end{center}%
\end{table*}%
}