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: % example:
% \begin{tab}{label}{Title} % \begin{tab}{label}{Title}
% \begin{tabular}{cc} % \begin{tabular}{cc}
% \hline % \textbf{1} & \textbf{2} \\
% \textbf{1} & \textbf{2} \\ \hline % 3 & 4 \\
% 3 & 4 \\ \hline
% \end{tabular} % \end{tabular}
% \end{tab} % \end{tab}
% reference later with: \tabref{label} % reference later with: \tabref{label}
\NewDocumentEnvironment{tab}{m m}{% #1 = label, #2 = title \NewDocumentEnvironment{tab}{O{htbp} m m}{% #1 = position, #2 = label, #3 = title
\begin{table}% \begin{table}[#1]%
\begin{center} \centering%
\caption{#2}% \caption{#3}%
\label{tab:#1}% \label{tab:#2}%
}{% }{%
\end{center}%
\end{table}% \end{table}%
} }
\NewDocumentEnvironment{tabwide}{m m}{% #1 = label, #2 = title \NewDocumentEnvironment{tabwide}{O{htbp} m m}{% #1 = position, #2 = label, #3 = title
\begin{table*}% \begin{table*}[#1]%
\begin{center} \centering%
\caption{#2}% \caption{#3}%
\label{tab:#1}% \label{tab:#2}%
}{% }{%
\end{center}%
\end{table*}% \end{table*}%
} }