%% %% multicap.sty %% %% Copyright (C) 2002 John Vassilogiorgakis. %% Postgraduate student %% Department of Informatics %% University of Athens. %% %% Please report errors or suggestions for improvement to %% %% giannis@iris.math.aegean.gr %% %% This program may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.2 %% of this license or (at your option) any later version. %% The latest version of this license is in %% http://www.latex-project.org/lppl.txt %% and version 1.2 or later is part of all distributions of LaTeX %% version 1999/12/01 or later. %% %% This program consists of the files multicap.dtx and multicap.sty %% \NeedsTeXFormat{LaTeX2e}% \ProvidesPackage{multicap}[2002/05/04 v1.0 formatting captions inside multicols]% \RequirePackage{ifthen}% \newcommand*{\@mcaptype}{\@empty}% \DeclareOption{Sans}% {\renewcommand*{\@mcaptype}{\textsf}}% \DeclareOption{normal}% {\renewcommand*{\@mcaptype}{\relax}}% \DeclareOption*% {\PackageWarning{multicap}{Unknown option `\CurrentOption'.\MessageBreak Going into default mode}}% \ExecuteOptions{Sans}% \ProcessOptions*% \newcounter{mcapsize}% \newcounter{mcapskip}% \newsavebox{\mf@tempbox}% \newsavebox{\mt@tempbox}% \newsavebox{\@temp@box}% \newlength{\abvmcapskip}% \newlength{\blwmcapskip}% \setlength{\abvmcapskip}{10\p@}% \setlength{\blwmcapskip}{\parsep}% \newboolean{@cent@er}% \renewenvironment*{center}% {\setboolean{@cent@er}{true}\trivlist% \centering\item\relax}% {\setboolean{@cent@er}{false}\endtrivlist}% \DeclareRobustCommand*{\@mcap@size}{\relax}% \newcommand*{\@mcap@fs}{% \ifthenelse{\equal{\value{mcapsize}}{0}% \and\equal{\value{mcapskip}}{0}}{}% {\renewcommand*{\@mcap@size}% {\fontsize{\value{mcapsize}}{\value{mcapskip}}% \selectfont% }% }% }% \newcommand*{\mfcaption}[2][\@empty]{% \\[\abvmcapskip]% \@mcap@fs% \refstepcounter{figure}% \ifthenelse{\equal{\protect#1}{\protect\@empty}}% {\addcontentsline{lof}{figure}% {\protect\numberline{\thefigure}#2}}% {\addcontentsline{lof}{figure}% {\protect\numberline{\thefigure}#1}}% \sbox{\mf@tempbox}{% \@mcap@size\@mcaptype{% \figurename\ \textsc{\thefigure{}:} #2% }% }% \ifthenelse{\lengthtest{\wd\mf@tempbox > \linewidth}}% {\begin{minipage}[t]{\linewidth}% \@mcap@size\@mcaptype% {\figurename\ \textsc{\thefigure{}:} #2}% \end{minipage}\par}% {{\centering\usebox{\mf@tempbox}\\}}% \ifthenelse{\boolean{@cent@er}}{}% {\vspace{\blwmcapskip}}% }% \newcommand*{\mtcaption}[2][\@empty]{% \\[\abvmcapskip]% \@mcap@fs% \refstepcounter{table}% \ifthenelse{\equal{\protect#1}{\protect\@empty}}% {\addcontentsline{lot}{table}% {\protect\numberline{\thetable}#2}}% {\addcontentsline{lot}{table}% {\protect\numberline{\thetable}#1}}% \sbox{\mt@tempbox}{% \@mcap@size\@mcaptype{% \tablename\ \textsc{\thetable{}:} #2% }% }% \ifthenelse{\lengthtest{\wd\mt@tempbox > \linewidth}}% {\begin{minipage}[t]{\linewidth}% \@mcap@size\@mcaptype% {\tablename\ \textsc{\thetable{}:} #2}% \end{minipage}\par}% {{\centering\usebox{\mt@tempbox}\\}}% \ifthenelse{\boolean{@cent@er}}{}% {\vspace{\blwmcapskip}}% }% \renewcommand{\@makecaption}[2]{% \vspace{10\p@}% \@mcap@fs% \sbox{\@temp@box}{\@mcap@size\@mcaptype{#1{}\textsc{:} #2}}% \ifthenelse{\lengthtest{\wd\@temp@box > \linewidth}}% {\@mcap@size\@mcaptype{#1{}\textsc{:} #2}\par}% {\centering\@mcap@size\@mcaptype{#1{}\textsc{:} #2}}% }% \endinput %% %% End of file `multicap.sty'.