blob: 014d2a2e6e781df780e52e6060ee75f94903b342 (
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
|
%%
%% This is file `trivfloat.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% trivfloat.dtx (with options: `package')
%% ----------------------------------------------------------------
%% The trivfloat package - Quick floats in LaTeX
%% Maintained by Joseph Wright
%% E-mail: joseph.wright@morningstar2.co.uk
%% Released under the GNU General Public License
%% See http://www.gnu.org/licenses/gpl.txt
%% ----------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{trivfloat}
[2007/08/13 v1.1 Quick floats in LaTeX]
\RequirePackage{float}
\newcount\tfl@floatcount%
\def\tfl@genext{%
\expandafter\def\csname tfl@ext@\romannumeral\tfl@floatcount%
\expandafter\endcsname{%
\ifcase\tfl@floatcount%
\PackageError{trivfloat}%
{Something's wrong here --- Contact the package author!}%
\@eha%
\or % 1
loa%
\or % 2
lob%
\or % 3
loc%
\or % 4
lod%
\or % 5
loe%
\or % 6
loh%
\or % 7
loi%
\or % 8
loj%
\or % 9
lok%
\or % 10
lol%
\or % 11
lom%
\or % 12
lon%
\or % 13
loo%
\or % 15
loq%
\or % 16
lor%
\or % 17
los%
\or % 18
lou%
\or % 19
lov%
\or % 20
low%
\or % 21
lox%
\or % 22
loy%
\or % 23
loz%
\else % 24 or more
\PackageWarning{trivfloat}%
{I've run out of extensions \MessageBreak%
I'm using \jobname.xxx to list all future floats}%
xxx%
\fi%
}%
}%
\def\tfl@gennamea#1#2\end{%
\expandafter\def\csname tfl@name@\romannumeral\tfl@floatcount%
\expandafter\endcsname{%
\MakeUppercase{#1}%
\MakeLowercase{#2}%
}%
}%
\def\tfl@genname#1{%
\tfl@gennamea#1\end%
}%
\def\tfl@list#1#2#3{%
\newcommand*{#1}{\listof{#2}{#3}}%
}%
\newcommand*{\trivfloat}[1]{%
\advance\tfl@floatcount\@ne%
\tfl@genext%
\tfl@genname{#1}%
\PackageInfo{trivfloat}%
{Listing all floats of type #1 in \jobname.%
\csname tfl@ext@\romannumeral\tfl@floatcount\endcsname}%
\begingroup%
\edef\x{\endgroup%
\noexpand\newfloat{#1}{tbp}{%
\csname tfl@ext@\romannumeral\tfl@floatcount\endcsname%
}%
\noexpand\floatname{#1}{%
\expandafter\noexpand%
\csname tfl@name@\romannumeral\tfl@floatcount\endcsname%
}%
\noexpand\tfl@list{\csname listof#1s\endcsname}{#1}{%
List of \expandafter\noexpand%
\csname tfl@name@\romannumeral\tfl@floatcount\endcsname s%
}%
}%
\x%
}%
\DeclareOption*{\expandafter\trivfloat\expandafter{\CurrentOption}}
\ProcessOptions
\endinput
%%
%% End of file `trivfloat.sty'.
|