<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% lcaption.sty  1.0
%
% Provides smart formatting of long captions. The captions are 
% formatted like:
%			Figure 1: This is a
%				  long text.
%
%                       &lt;-----\CapSize-----&gt;
%
% If \CapSize is set to ZERO, it will fit the caption to \hsize
% (the width of the surrounding text)
%
% The syntax is \lcaption[short]{long} just like LaTeX's caption command.
% the [short] argument may be omitted.
%
% The command \smartcap will make \caption act like \lcaption. It
% should be used only once.
%
% \CapSize defaults to ZERO, and may be set by a command like:
%
%     \CapSize=5in
%
% Based on original by Lars P. Fischer &lt;fischer@iesd.auc.dk&gt;
% Parts of the code is taken from latex.tex (c) by Leslie Lamport
% Put together by Kresten Krab Thorup &lt;Krab@iesd.auc.dk&gt; january 1991
% You may not redistribute modified versions of this code, unless
% you name it to something else than lcaption.sty
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\typeout{Style Option `lcaption' r1.0 &lt;01/06/91&gt; (KKT)}

\newdimen\CapSize\CapSize\z@

\long\def\@lmakecaption#1#2{
 \vskip 10pt 
 \setbox\@tempboxa\hbox{#1:\ }
 \@tempdima\hsize\advance\@tempdima-\wd\@tempboxa
 \ifdim\CapSize=\z@\else
   \ifdim\@tempdima&gt;\CapSize \@tempdima\CapSize\fi\fi
 \setbox\@tempboxa\hbox{#1: #2}
 \ifdim\wd\@tempboxa&lt;\hsize\hfil #1: #2\hfil\par\else
 \hbox to\hsize{\hfil #1: \parbox[t]\@tempdima{#2}\hfil} 
 \fi}

\def\lcaption{\let\@makecaption\@lmakecaption\caption}

\def\smartcap{\def\caption{\let\@makecaption\@lmakecaption
\refstepcounter\@captype \@dblarg{\@caption\@captype}}}


</pre></body></html>