From 511b03aa4ca8c27384178598e449388afd251f9c Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 17 Jun 2007 23:25:09 +0000 Subject: new package trivfloat (11jun07) git-svn-id: svn://tug.org/texlive/trunk@4462 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/trivfloat/trivfloat.sty | 117 +++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/trivfloat/trivfloat.sty (limited to 'Master/texmf-dist/tex/latex/trivfloat') diff --git a/Master/texmf-dist/tex/latex/trivfloat/trivfloat.sty b/Master/texmf-dist/tex/latex/trivfloat/trivfloat.sty new file mode 100644 index 00000000000..091b15752ff --- /dev/null +++ b/Master/texmf-dist/tex/latex/trivfloat/trivfloat.sty @@ -0,0 +1,117 @@ +%% +%% 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/06/09 v1.0 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% +}% +\endinput +%% +%% End of file `trivfloat.sty'. -- cgit v1.2.3