<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%%    FIGSIZE
%%        Package to dynamically size figures relative to the page
%%        size.
%%
%%    USER COMMANDS
%%    \usepackage{figsize}
%%        If option distort is present then the included images will
%%        be allowed to have different x &amp; y scaling.  Otherwise
%%        the aspect ratio will be kept.
%%
%%    \SetFigLayout[extra lines of space to add]{rows}{cols}
%%    To set the sizes of graphics relative to the page size in a
%%    cell of a matrix with rows and cols specified.  Optional
%%    integers can be specified to increase the space allowed for
%%    captions.  If a value of 8 is placed, then 8 extra lines of
%%    caption text will be allowed for.
%%
%%    \includegraphics{file}
%%    To include the graphics with the current most size settings.
%%
%%
%%    Anthony Tanbakuchi
%%    Mar.18.2002
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{figsize}[2002/03/18 v0.1 FigSize sizes graphics for graphicx package]
\RequirePackage{calc}[1998/07/07]

%\RequirePackage[tight]{subfigure}[2002/01/01]
\RequirePackage{subfigure}


\RequirePackage{graphicx}[1999/01/01]
\RequirePackage{ifthen}[1994/06/01]

    %The new includegraphics command to automatically size figure
    \let\Oldincludegraphics\includegraphics
    \renewcommand{\includegraphics}[2][width=\figwidth, totalheight=\figheight, keepaspectratio]{\Oldincludegraphics[#1]{#2}}



\newlength{\figwidth}
\newlength{\figheight}


\newcommand{\SetFigLayout}[3][0]{\setlength{\figheight}{\textheight}%
%\addtolength{\figheight}{-0.1\textheight}% 10% for the bottom caption
%\addtolength{\figheight}{-1.4cm}% for caption text 1 line
\addtolength{\figheight}{-\baselineskip-\parskip}% for caption text 1 line
\addtolength{\figheight}{-\abovecaptionskip}%
\addtolength{\figheight}{-\belowcaptionskip}%
\setlength{\figheight}{\figheight / #2}%
\addtolength{\figheight}{(-\baselineskip-\parskip) * (#2-1)}% for subcaption 1 line
\addtolength{\figheight}{-\baselineskip * #1}%  %For additional optional spacing
%
\setlength{\figwidth}{\textwidth}%
\ifthenelse{#3 &gt; 1}{\addtolength{\figwidth}{-0.05\textwidth}}{}% 5% space if multiple cols
\setlength{\figwidth}{\figwidth / #3}%
}

\endinput
</pre></body></html>