%% %% This is file `fitbox.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% fitbox.dtx (with options: `style') %% %% IMPORTANT NOTICE: %% %% For the copyright see the source file. %% %% Any modified versions of this file must be renamed %% with new filenames distinct from fitbox.sty. %% %% For distribution of the original source see the terms %% for copying and modification in the file fitbox.dtx. %% %% This generated file may be distributed as long as the %% original source files, as listed above, are part of the %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% Copyright 2015, Boris Veytsman \columnwidth\relax \PackageWarning{fitbox}{Minimal width is larger than page width. Adjusting...}% \def\cmd@KV@FTBX@minwidth{\columnwidth}% \fi \expandafter\ifdim\cmdKV@FTBX@maxwidth>\columnwidth\relax \PackageWarning{fitbox}{Desired width is larger than page width. Adjusting...}% \def\cmd@KV@FTBX@maxwidth{\columnwidth}% \fi \expandafter\ifdim\cmdKV@FTBX@minheight>\textheight\relax \PackageWarning{fitbox}{Minimal height is larger than page height. Adjusting...}% \def\cmd@KV@FTBX@minheight{\textheight}% \fi \expandafter\ifdim\cmdKV@FTBX@maxheight>\textheight\relax \PackageWarning{fitbox}{Desired height is larger than page height. Adjusting...}% \def\cmd@KV@FTBX@maxheight{\textheight}% \fi % Calculating the minimal and maximal height \Gscale@div{\@tempa}{\cmdKV@FTBX@maxwidth}{\fitboxnatwidth}% \FTBX@desired@maxheight=\@tempa\fitboxnatheight\relax \expandafter\ifdim\cmdKV@FTBX@maxheight<\FTBX@desired@maxheight\relax \expandafter\FTBX@desired@maxheight=\cmdKV@FTBX@maxheight\relax \fi \Gscale@div{\@tempa}{\cmdKV@FTBX@minwidth}{\fitboxnatwidth}% \FTBX@desired@minheight=\@tempa\fitboxnatheight\relax \expandafter\ifdim\cmdKV@FTBX@minheight>\FTBX@desired@minheight\relax \expandafter\FTBX@desired@minheight=\cmdKV@FTBX@minheight\relax \fi \ifdim\FTBX@desired@minheight>\FTBX@desired@maxheight\relax \PackageWarning{fitbox}{Desired min scale exceeds desired min scale. Adjusting...}% \FTBX@desired@minheight=\FTBX@desired@maxheight\relax \fi \FTBX@available@height=\pagegoal\relax \ifdim\FTBX@available@height>\vsize\relax \FTBX@available@height=\vsize \fi \advance\FTBX@available@height by -\pagetotal\relax \advance\FTBX@available@height by -\cmdKV@FTBX@belowboxspace\relax \advance\FTBX@available@height by -\baselineskip\relax \ifdim\FTBX@desired@maxheight>\FTBX@available@height\relax \ifdim\FTBX@available@height<\FTBX@desired@minheight\relax \@tempdima=\FTBX@desired@minheight\relax \advance\@tempdima by -\FTBX@available@height\relax \expandafter\ifdim\cmdKV@FTBX@maxenlargepage<\@tempdima\relax \newpage \resizebox*{!}{\FTBX@desired@maxheight}{\box\FTBX@box}% \else \enlargethispage{\@tempdima}% \resizebox*{!}{\FTBX@desired@minheight}{\box\FTBX@box}% \fi \else \resizebox*{!}{\FTBX@available@height}{\box\FTBX@box}% \fi \else \resizebox*{!}{\FTBX@desired@maxheight}{\box\FTBX@box}% \fi } \endinput %% %% End of file `fitbox.sty'.