Create a new environment to include strechted graphics

This commit is contained in:
Fred Pauchet 2022-09-11 16:46:30 +02:00
parent 8a839b2d7b
commit a238fd4eed
1 changed files with 20 additions and 0 deletions

View File

@ -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