diff --git a/preamble.tex b/preamble.tex index 3cde049..5cccd8b 100644 --- a/preamble.tex +++ b/preamble.tex @@ -25,4 +25,15 @@ % Cancel common factors in Math \usepackage[makeroom]{cancel} +\usepackage[export]{adjustbox} %Needed for max width +\usepackage{etoolbox} %Needed for \pathcmd +%\patchcmd{}{}{}{}{} +%The following codes add max dimension option to includegraphics +%Gin@ii is from graphicx package and looks for a second optional argument +\expandafter\patchcmd\csname Gin@ii\endcsname +{\setkeys{Gin}{#1}} +{\setkeys{Gin}{max width=\textwidth, max height=.5\textwidth,keepaspectratio,#1}} +{} +{} + \frontmatter