summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ltxmisc/captdef.sty
blob: b4dbcb546aaece160fb4b6c24c81c5dc4fe37ade (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
%
%   captdef.sty: a trivial package to define captions that don't have
%   to be in floats.
%
% Author: Robin Fairbairns <rf10@cam.ac.uk>
%         Conceived ages ago, but written 1998/12/17
%
%   This program can redistributed and/or modified under the terms
%   of the LaTeX Project Public License Distributed from CTAN
%   archives in directory macros/latex/base/lppl.txt; either
%   version 1 of the License, or (at your option) any later version.
%
% Usage: \DeclareCaption{command}{counter}
%
% declare `command' to produce a caption which uses `counter' for its
% numbering.
%
% The package then goes on to use this command to declare the most
% commonly required pair of non-float captions, \figcaption and
% \tabcaption

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{captdef}[1998/12/17 non-floating captions]

\newcommand{\DeclareCaption}[2]{%
  \def#1{\def\@captype{#2}\caption}%
}

\DeclareCaption{\figcaption}{figure}
\DeclareCaption{\tabcaption}{table}

\endinput