Back to home page

Quest Cross Reference

 
 

    


0001 %%
0002 %% This is file `algorithm.sty',
0003 %% generated with the docstrip utility.
0004 %%
0005 %% The original source files were:
0006 %%
0007 %% algorithms.dtx  (with options: `algorithm')
0008 %% This is a generated file.
0009 %% 
0010 %% Copyright (C) 1994-2004   Peter Williams <pwil3058@bigpond.net.au>
0011 %% Copyright (C) 2005-2009   Rogério Brito <rbrito@ime.usp.br>
0012 %% 
0013 %% This document file is free software; you can redistribute it and/or
0014 %% modify it under the terms of the GNU Lesser General Public License as
0015 %% published by the Free Software Foundation; either version 2 of the
0016 %% License, or (at your option) any later version.
0017 %% 
0018 %% This document file is distributed in the hope that it will be useful, but
0019 %% WITHOUT ANY WARRANTY; without even the implied warranty of
0020 %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
0021 %% General Public License for more details.
0022 %% 
0023 %% You should have received a copy of the GNU Lesser General Public License
0024 %% along with this document file; if not, write to the Free Software
0025 %% Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
0026 %% USA.
0027 %% 
0028 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
0029 \ProvidesPackage{algorithm}
0030    [2009/08/24 v0.1 Document Style `algorithm' - floating environment]
0031 \RequirePackage{float}
0032 \RequirePackage{ifthen}
0033 \newcommand{\ALG@within}{nothing}
0034 \newboolean{ALG@within}
0035 \setboolean{ALG@within}{false}
0036 \newcommand{\ALG@floatstyle}{ruled}
0037 \newcommand{\ALG@name}{Algorithm}
0038 \newcommand{\listalgorithmname}{List of \ALG@name s}
0039 % Declare Options:
0040 % * first: appearance
0041 \DeclareOption{plain}{
0042   \renewcommand{\ALG@floatstyle}{plain}
0043 }
0044 \DeclareOption{ruled}{
0045   \renewcommand{\ALG@floatstyle}{ruled}
0046 }
0047 \DeclareOption{boxed}{
0048   \renewcommand{\ALG@floatstyle}{boxed}
0049 }
0050 % * then: numbering convention
0051 \DeclareOption{part}{
0052   \renewcommand{\ALG@within}{part}
0053   \setboolean{ALG@within}{true}
0054 }
0055 \DeclareOption{chapter}{
0056   \renewcommand{\ALG@within}{chapter}
0057   \setboolean{ALG@within}{true}
0058 }
0059 \DeclareOption{section}{
0060   \renewcommand{\ALG@within}{section}
0061   \setboolean{ALG@within}{true}
0062 }
0063 \DeclareOption{subsection}{
0064   \renewcommand{\ALG@within}{subsection}
0065   \setboolean{ALG@within}{true}
0066 }
0067 \DeclareOption{subsubsection}{
0068   \renewcommand{\ALG@within}{subsubsection}
0069   \setboolean{ALG@within}{true}
0070 }
0071 \DeclareOption{nothing}{
0072   \renewcommand{\ALG@within}{nothing}
0073   \setboolean{ALG@within}{true}
0074 }
0075 \DeclareOption*{\edef\ALG@name{\CurrentOption}}
0076 % ALGORITHM
0077 %
0078 \ProcessOptions
0079 \floatstyle{\ALG@floatstyle}
0080 \ifthenelse{\boolean{ALG@within}}{
0081   \ifthenelse{\equal{\ALG@within}{part}}
0082      {\newfloat{algorithm}{htbp}{loa}[part]}{}
0083   \ifthenelse{\equal{\ALG@within}{chapter}}
0084      {\newfloat{algorithm}{htbp}{loa}[chapter]}{}
0085   \ifthenelse{\equal{\ALG@within}{section}}
0086      {\newfloat{algorithm}{htbp}{loa}[section]}{}
0087   \ifthenelse{\equal{\ALG@within}{subsection}}
0088      {\newfloat{algorithm}{htbp}{loa}[subsection]}{}
0089   \ifthenelse{\equal{\ALG@within}{subsubsection}}
0090      {\newfloat{algorithm}{htbp}{loa}[subsubsection]}{}
0091   \ifthenelse{\equal{\ALG@within}{nothing}}
0092      {\newfloat{algorithm}{htbp}{loa}}{}
0093 }{
0094   \newfloat{algorithm}{htbp}{loa}
0095 }
0096 \floatname{algorithm}{\ALG@name}
0097 \newcommand{\listofalgorithms}{\listof{algorithm}{\listalgorithmname}}
0098 \endinput
0099 %%
0100 %% End of file `algorithm.sty'.