summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-12 23:59:59 +0000
committerKarl Berry <karl@freefriends.org>2006-01-12 23:59:59 +0000
commitdbafb0ef601ebc7c793c783e3d455cf22011c712 (patch)
tree13fdafd80f14912d6ebbf46c10846121f560ec90
parentb8dd51efe06e0984a8c67bff2d3dd69f5b0215a4 (diff)
multicap
git-svn-id: svn://tug.org/texlive/trunk@1117 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/tex/latex/multicap/multicap.sty118
1 files changed, 118 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/multicap/multicap.sty b/Master/texmf-dist/tex/latex/multicap/multicap.sty
new file mode 100644
index 00000000000..d05f71562f7
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/multicap/multicap.sty
@@ -0,0 +1,118 @@
+%%
+%% 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'. \ No newline at end of file