diff options
author | Karl Berry <karl@freefriends.org> | 2007-09-21 22:42:27 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-09-21 22:42:27 +0000 |
commit | a6a13c1b2f09c6318e60b65c389ba82418cda2ce (patch) | |
tree | dc25c8b6a8eeec9b23fa8a64ec10978b75814c1c /Master/texmf-dist/tex | |
parent | 3fb80b1d88c2a43b2e41fc3447e5c5d22da48222 (diff) |
trivfloat 1.3b
git-svn-id: svn://tug.org/texlive/trunk@4996 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/trivfloat/trivfloat.sty | 124 |
1 files changed, 63 insertions, 61 deletions
diff --git a/Master/texmf-dist/tex/latex/trivfloat/trivfloat.sty b/Master/texmf-dist/tex/latex/trivfloat/trivfloat.sty index ac665231c35..730ce587fd1 100644 --- a/Master/texmf-dist/tex/latex/trivfloat/trivfloat.sty +++ b/Master/texmf-dist/tex/latex/trivfloat/trivfloat.sty @@ -9,12 +9,12 @@ %% 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 +%% Released under the LaTeX Project Public License v1.3 or later +%% See http://www.latex-project.org/lppl.txt %% ---------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{trivfloat} - [2007/08/22 v1.3a Quick floats in LaTeX] + [2007/09/20 v1.3b Quick floats in LaTeX] \@ifclassloaded{memoir} {} {\RequirePackage{float}} @@ -90,68 +90,70 @@ \let\@chapter\tfl@chapter \fi \newcommand*{\trivfloat}[1]{% - \advance\tfl@floatcount\@ne% - \tfl@genext% - \PackageInfo{trivfloat}% - {Listing all ``#1'' floats in \jobname.\tfl@ext}% - \expandafter\newcommand\expandafter*\expandafter% - {\csname #1name\endcsname} - {\noexpand\tfl@upperfirst#1} - \expandafter\newcommand\expandafter*\expandafter% - {\csname list#1name\endcsname} - {List of \noexpand\tfl@upperfirst#1s} - \begingroup% - \edef\x{\endgroup% - \@ifclassloaded{memoir} - {\noexpand\newfloat[chapter]{#1}{\tfl@ext} - {\csname #1name\endcsname} - \noexpand\newlistof{listof#1s}{\tfl@ext} - {\csname list#1name\endcsname} - \noexpand\addtodef{\noexpand\insertchapterspace}{}% - {\noexpand\addtocontents% - {\tfl@ext} - {\noexpand\protect\noexpand\addvspace{10pt}}} - \noexpand\newlistentry[chapter]{#1} - {\tfl@ext}{0}} - {\ifx\chapter\@undefined - \noexpand\newfloat{#1}{tbp}{\tfl@ext} - \else - \noexpand\newfloat{#1}{tbp}{\tfl@ext}[chapter] - \fi - \noexpand\floatname{#1}{\csname #1name\endcsname}% - \noexpand\newcommand{\csname listof#1s\endcsname}% - {\noexpand\listof{#1}{\csname list#1name\endcsname}}% - \ifx\chapter\@undefined\else - \noexpand\g@addto@macro{\noexpand\tfl@chapter@hook} + \AtBeginDocument{% + \advance\tfl@floatcount\@ne% + \tfl@genext% + \PackageInfo{trivfloat}% + {Listing all ``#1'' floats in \jobname.\tfl@ext}% + \expandafter\newcommand\expandafter*\expandafter% + {\csname #1name\endcsname} + {\noexpand\tfl@upperfirst#1} + \expandafter\newcommand\expandafter*\expandafter% + {\csname list#1name\endcsname} + {List of \noexpand\tfl@upperfirst#1s} + \begingroup% + \edef\x{\endgroup% + \@ifclassloaded{memoir} + {\noexpand\newfloat[chapter]{#1}{\tfl@ext} + {\csname #1name\endcsname} + \noexpand\newlistof{listof#1s}{\tfl@ext} + {\csname list#1name\endcsname} + \noexpand\addtodef{\noexpand\insertchapterspace}{}% {\noexpand\addtocontents% {\tfl@ext} {\noexpand\protect\noexpand\addvspace{10pt}}} - \fi} - }% - \x% - \@ifclassloaded{memoir} - {\expandafter\renewcommand\expandafter{\csname the#1\endcsname}% - {\thechapter.\expandafter\@arabic\csname c@#1\endcsname} - \addtodef{\@smemfront}{}{\counterwithout{#1}{chapter}} - \addtodef{\@smemmain}{}{% - \ifartopt\else - \counterwithin{#1}{chapter} - \fi} - \addtodef{\backmatter}{}{% - \ifartopt\else + \noexpand\newlistentry[chapter]{#1} + {\tfl@ext}{0}} + {\ifx\chapter\@undefined + \noexpand\newfloat{#1}{tbp}{\tfl@ext} + \else + \noexpand\newfloat{#1}{tbp}{\tfl@ext}[chapter] + \fi + \noexpand\floatname{#1}{\csname #1name\endcsname}% + \noexpand\newcommand{\csname listof#1s\endcsname}% + {\noexpand\listof{#1}{\csname list#1name\endcsname}}% + \ifx\chapter\@undefined\else + \noexpand\g@addto@macro{\noexpand\tfl@chapter@hook} + {\noexpand\addtocontents% + {\tfl@ext} + {\noexpand\protect\noexpand\addvspace{10pt}}} + \fi} + }% + \x% + \@ifclassloaded{memoir} + {\expandafter\renewcommand\expandafter{\csname the#1\endcsname}% + {\thechapter.\expandafter\@arabic\csname c@#1\endcsname} + \addtodef{\@smemfront}{}{\counterwithout{#1}{chapter}} + \addtodef{\@smemmain}{}{% + \ifartopt\else + \counterwithin{#1}{chapter} + \fi} + \addtodef{\backmatter}{}{% + \ifartopt\else + \counterwithout{#1}{chapter} + \setcounter{#1}{0} + \fi} + \ifartopt \counterwithout{#1}{chapter} - \setcounter{#1}{0} - \fi} - \ifartopt - \counterwithout{#1}{chapter} - \fi - \cftsetindents{#1}{0em}{2.3em}} - {\ifx\chapter\@undefined\else - \ifx\KOMAScriptVersion\@undefined - \expandafter\renewcommand\expandafter{\csname the#1\endcsname}% - {\ifnum\c@chapter>\z@ \thechapter.\fi - \expandafter\@arabic\csname c@#1\endcsname} - \fi\fi} + \fi + \cftsetindents{#1}{0em}{2.3em}} + {\ifx\chapter\@undefined\else + \ifx\KOMAScriptVersion\@undefined + \expandafter\renewcommand\expandafter{\csname the#1\endcsname}% + {\ifnum\c@chapter>\z@ \thechapter.\fi + \expandafter\@arabic\csname c@#1\endcsname} + \fi\fi} + } }% \@onlypreamble\trivfloat \DeclareOption*{\expandafter\trivfloat\expandafter{\CurrentOption}} |