diff --git a/utils/commands.tex b/utils/commands.tex index 0020565..a35dba0 100644 --- a/utils/commands.tex +++ b/utils/commands.tex @@ -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}% - }{% - \end{center}% +\NewDocumentEnvironment{tab}{O{htbp} m m}{% #1 = position, #2 = label, #3 = title + \begin{table}[#1]% + \centering% + \caption{#3}% + \label{tab:#2}% + }{% \end{table}% } -\NewDocumentEnvironment{tabwide}{m m}{% #1 = label, #2 = title - \begin{table*}% - \begin{center} - \caption{#2}% - \label{tab:#1}% - }{% - \end{center}% +\NewDocumentEnvironment{tabwide}{O{htbp} m m}{% #1 = position, #2 = label, #3 = title + \begin{table*}[#1]% + \centering% + \caption{#3}% + \label{tab:#2}% + }{% \end{table*}% }