From a238fd4eeddbe8ff5f6c3783a73f41a78419fe9f Mon Sep 17 00:00:00 2001 From: Fred Pauchet Date: Sun, 11 Sep 2022 16:46:30 +0200 Subject: [PATCH] Create a new environment to include strechted graphics --- gwiftemplate.sty | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gwiftemplate.sty b/gwiftemplate.sty index 4d333e5..59bfd86 100644 --- a/gwiftemplate.sty +++ b/gwiftemplate.sty @@ -51,8 +51,28 @@ \end{tcolorbox} } +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % +% Define image boxes +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % + +\newenvironment{graphic}[1] +% +% I actually tried to make a `newcommand` with two parameters +% instead of a new environnement but captions were not taken back into the correct format. +% + { + \begin{figure}[H] + \centering + \scalebox{1.0}{\includegraphics[max size={\textwidth}{\textheight}]{#1}} + } + { + \end{figure} + } + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % References %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % https://sources.grimbox.be/Sulley/layout_syllabus_ffg/src/branch/master/ffgTemplate.sty +% Définir une nouvelle commande : https://www.overleaf.com/learn/latex/Commands +% Check empty values : https://latex.org/forum/viewtopic.php?t=5976