Scale figures in the document properly
This commit is contained in:
parent
fcda54fc2f
commit
fd87d7c0f0
|
@ -382,6 +382,20 @@
|
||||||
\graphicspath{{./figures/}}
|
\graphicspath{{./figures/}}
|
||||||
|
|
||||||
|
|
||||||
|
% Scale images if necessary, so that they will not overflow the page
|
||||||
|
% margins by default, and it is still possible to overwrite the defaults
|
||||||
|
% using explicit options in \includegraphics[width, height, ...]{}
|
||||||
|
\makeatletter
|
||||||
|
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
|
||||||
|
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
|
||||||
|
\makeatother
|
||||||
|
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
|
||||||
|
% Set default figure placement to htbp
|
||||||
|
\makeatletter
|
||||||
|
\def\fps@figure{htbp}
|
||||||
|
\makeatother
|
||||||
|
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%
|
%
|
||||||
% Custom macros
|
% Custom macros
|
||||||
|
|
Loading…
Reference in New Issue