From aa99d80a12145ce76f361e5110fa77bf8ca4d357 Mon Sep 17 00:00:00 2001 From: Erwan Normand Date: Fri, 2 Aug 2024 18:21:11 +0200 Subject: [PATCH] Rewew \fig command --- config/thesis_commands.tex | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/config/thesis_commands.tex b/config/thesis_commands.tex index 666fe8e..6135bfb 100644 --- a/config/thesis_commands.tex +++ b/config/thesis_commands.tex @@ -30,6 +30,17 @@ \renewcommand{\tabref}[2][\labelprefix]{Table~\ref{#1:tab:#2}} % 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}{% + \begin{figure}[#2] + \centering% + \includegraphics[width=#1\linewidth]{#3}% + \caption[#4]{#4\IfValueTF{#5}{ #5}}% voluntary space before the subfig titles + \label{fig:#3}% + \end{figure}% +} + % example: % \begin{subfigs}{label}{Fig title}[Subfig titles] % \subfig{subfig1}%