Updated \crfigure command

This commit is contained in:
Lukian 2025-01-04 17:43:59 +01:00
parent 6a50f1d208
commit 2c50af1e51

View file

@ -2,6 +2,7 @@
\usepackage{geometry} \usepackage{geometry}
\usepackage[french]{babel} \usepackage[french]{babel}
\usepackage[T1]{fontenc} \usepackage[T1]{fontenc}
\usepackage{xparse}
\graphicspath{{images/}} \graphicspath{{images/}}
\geometry{ \geometry{
@ -51,10 +52,11 @@
\end{titlepage} \end{titlepage}
} }
\newcommand{\crfigure}[2] { \NewDocumentCommand{\crfigure}{O{0.75\textwidth} m m}{
\begin{figure}[h] \begin{figure}[h]
\centering \centering
\includegraphics[width=0.75\textwidth]{#1} \includegraphics[width=#1]{#2}
\caption{#2} \caption{#3}
\end{figure} \end{figure}
} }