summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/captcont/captcont.sty
blob: 2e4c157316143113a9236b08bd7c9f5087d8a006 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
%%
%% This is file `captcont.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% captcont.dtx  (with options: `package')
%% 
%% Copyright (C) 1996-2002 Steven Douglas Cochran.
%% 
%% This file is NOT the source for captcont, because almost all comments
%% have been stripped from it.  It is NOT the preferred form of captcont
%% for making modifications to it.
%% 
%% Therefore you can NOT redistribute and/or modify THIS file.  You can
%% however redistribute the complete source (captcont.dtx and
%% captcont.ins) and/or modify it under the terms 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/09/03 or later.
%% 
%% The captcont package is distributed in the hope that it will be
%% useful, but WITHOUT ANY WARRANTY; without even the implied warranty
%% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%% LaTeX Project Public License for more details.
%% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% @LaTeX-style-file{
%%    author     = "Steven Douglas Cochran",
%%    version    = "2.0",
%%    date       = "2002/02/14",
%%    time       = "11:59:17",
%%    filename   = "captcont.sty",
%%    address    = "Digital Mapping Laboratory, School of Computer Science
%%                  Carnegie-Mellon University, 5000 Forbes Avenue
%%                  Pittsburgh, PA 15213-3890, USA",
%%    telephone  = "+1 412.268.5654",
%%    fax        = "+1 412.268.5576",
%%    email      = "sdc+@CS.CMU.EDU (Internet)",
%%    codetable  = "ISO/ASCII",
%%    keywords   = "LaTeX, caption, float, figure, table, subfigure",
%%    supported  = "yes",
%%    abstract   = "LaTeX package for providing support for retaining
%%                  a figure or table number across several float
%%                  environments---usually over several pages.  It
%%                  also allows control over the contents of the
%%                  List-of-Figures and the List-of-Tables pages."
%% }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesPackage{captcont}[2002/02/14 v2.0 captcont package]
\@ifundefined{figuretopcaptrue}{\newif\iffiguretopcap}{}
\@ifundefined{tabletopcaptrue}{\newif\iftabletopcap}{}
\@ifundefined{@subfloat}{%
  \DeclareOption{figbotcap}{\figuretopcapfalse}
  \DeclareOption{figtopcap}{\figuretopcaptrue}
  \DeclareOption{tabbotcap}{\tabletopcapfalse}
  \DeclareOption{tabtopcap}{\tabletopcaptrue}
  \ExecuteOptions{figbotcap,tabtopcap}
  \ProcessOptions}{}
\let\cc@caption=\caption
\renewcommand{\caption}{%
  \@ifstar\cc@scaption\cc@caption}
\newcommand{\cc@scaption}{%
  \ifx\@captype\@undefined
    \@latex@error{\noexpand\caption* outside float}\@ehd
    \expandafter\@gobble
  \else
    \refstepcounter\@captype
    \expandafter\@firstofone
  \fi
  {\@dblarg{\cc@@scaption\@captype}}}
\long\def\cc@@scaption#1[#2]#3{%
  \par
  \begingroup
    \@parboxrestore
    \if@minipage
      \@setminipage
    \fi
    \normalsize
    \@makecaption{\@nameuse{fnum@#1}}{\ignorespaces #3}\par
  \endgroup}
\newcommand{\ccset@currentlabel}[1]{%
  \@nameuse{if\@captype topcap}\else
    \advance\@nameuse{c@\@captype}\@ne
  \fi
  \global\edef\@currentlabel{%
    \@nameuse{p@#1}\@nameuse{the#1}}}
\newcommand{\captcont}{%
  \@ifstar\cc@scaptcont\cc@captcont}
\newcommand{\cc@captcont}{%
  \ifx\@captype\@undefined
    \@latex@error{\noexpand\captcont outside float}\@ehd
    \expandafter\@gobble
  \else
    \expandafter\@firstofone
  \fi
  {\@dblarg{\cc@@captcont\@captype}}}
\newcommand{\cc@scaptcont}{%
  \ifx\@captype\@undefined
    \@latex@error{\noexpand\captcont* outside float}\@ehd
    \expandafter\@gobble
  \else
    \expandafter\@firstofone
  \fi
  {\@dblarg{\cc@@scaptcont\@captype}}}
\long\def\cc@@captcont#1[#2]#3{%
  \par
  \begingroup
    \ccset@currentlabel{#1}%
    \addcontentsline{\@nameuse{ext@#1}}{#1}%
      {\protect\numberline{\@nameuse{the#1}}{\ignorespaces #2}}%
    \@parboxrestore
    \if@minipage
      \@setminipage
    \fi
    \normalsize
    \@makecaption{\@nameuse{fnum@#1}}{\ignorespaces #3}\par
  \endgroup}
\long\def\cc@@scaptcont#1[#2]#3{%
  \par
  \begingroup
    \ccset@currentlabel{#1}%
    \@parboxrestore
    \if@minipage
      \@setminipage
    \fi
    \normalsize
    \@makecaption{\@nameuse{fnum@#1}}{\ignorespaces #3}\par
  \endgroup}
\endinput
%%
%% End of file `captcont.sty'.