% Override default figure placement To be within the flow of the text rather
% than on it's own page.
\usepackage{float}
\usepackage{graphicx}
\makeatletter
\def\fps@figure{H}
\makeatother

% Scale all large images to 50% of twext width
\makeatletter
\setkeys{Gin}{width=\ifdim\Gin@nat@width>\linewidth
    0.5\linewidth
\else
    \Gin@nat@width
\fi}
\makeatother
