Better figures

This commit is contained in:
2024-09-24 15:07:13 +02:00
parent 9ba5d344a5
commit b8b799df3d
18 changed files with 383 additions and 418 deletions

View File

@@ -59,8 +59,8 @@
}
% Images
% example: \fig[1]{universe}{The Universe}[Additional caption text, not shown in the list of figures]
% reference later with: \figref{universe}
% example: \fig[1]{filename}{Caption}[Additional caption text, not shown in the list of figures]
% reference later with: \figref{filename}
% 1 = \linewidth = 150 mm
\RenewDocumentCommand{\fig}{O{1} O{htbp} m m O{}}{% #1 = width, #2 = position, #3 = filename, #4 = caption, #5 = additional caption
\begin{figure}[#2]%
@@ -81,20 +81,23 @@
}
% example:
% \begin{subfigs}{label}{Fig title}[Subfig titles]
% \subfig{subfig1}%
% \subfig[1][htbp]{subfig2}[caption]%
% \begin{subfigs}{label}{Caption}[Additional caption text, not shown in the list of figures][
% \item Subfig title 1.
% \item Subfig title 2.
% ]
% \subfig{filename1}%
% \subfig[1][htbp]{filename2}%
% \end{subfigs}
% reference later with: \figref{label}
\RenewDocumentEnvironment{subfigs}{O{htbp} m m o}{% #1 = position, #2 = label, #3 = filename, #4 = subfig titles
\RenewDocumentEnvironment{subfigs}{O{htbp} m m O{} o}{% #1 = position, #2 = label, #3 = caption, #4 = additional caption, #5 = subfig titles
\begin{figure}[#1]%
\centering%
}{%
\caption[#3]{%
#3%
\IfValueTF{#4}{%
#3#4%
\IfValueTF{#5}{%
\begin{enumerate*}[label=\textbf{(\alph*)}]%
#4%
#5%
\end{enumerate*}%
}%
}%