Doc command arguments

This commit is contained in:
2024-08-10 17:26:13 +02:00
parent a90e19f03a
commit c4bb93d4e2
2 changed files with 11 additions and 11 deletions

View File

@@ -32,7 +32,7 @@
% Images
% example: \fig[1]{universe}{The Universe}[Additional caption text, not shown in the list of figures]
% reference later with: \figref{universe}
\RenewDocumentCommand{\fig}{O{1} O{htbp} m m o}{%
\RenewDocumentCommand{\fig}{O{1} O{htbp} m m o}{% #1 = width, #2 = position, #3 = label, #4 = caption, #5 = additional caption
\begin{figure}[#2]
\centering%
\includegraphics[width=#1\linewidth]{#3}%
@@ -47,7 +47,7 @@
% \subfig[1][htbp]{subfig2}[caption]%
% \end{subfigs}
% reference later with: \figref{label}
\RenewDocumentEnvironment{subfigs}{O{htbp} m m o}{%
\RenewDocumentEnvironment{subfigs}{O{htbp} m m o}{% #1 = position, #2 = label, #3 = title, #4 = subfig titles
\begin{figure}[#1]%
\centering%
}{%
@@ -63,11 +63,11 @@
\end{figure}%
}
\NewDocumentCommand{\subfigsheight}{m}{%
\NewDocumentCommand{\subfigsheight}{m}{% Set the height of the subfigures
\setkeys{Gin}{height=#1}%
}
\RenewDocumentCommand{\subfig}{o O{b} m O{}}{%
\RenewDocumentCommand{\subfig}{o O{b} m O{}}{% #1 = width, #2 = valign, #3 = filename, #4 = caption
\hfill%
\subfloat[#4\label{fig:#3}]{%
\IfValueTF{#1}{%