]> www.fi.muni.cz Git - pan12-paper.git/blob - algorithm.sty
paper.bib: smazano neaktualni (to appear)
[pan12-paper.git] / algorithm.sty
1 %%
2 %% This is file `algorithm.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% algorithms.dtx  (with options: `algorithm')
8 %% This is a generated file.
9 %% 
10 %% Copyright (C) 1994-2004   Peter Williams <pwil3058@bigpond.net.au>
11 %% Copyright (C) 2005-2009   Rog^^e9rio Brito <rbrito@ime.usp.br>
12 %% 
13 %% This document file is free software; you can redistribute it and/or
14 %% modify it under the terms of the GNU Lesser General Public License as
15 %% published by the Free Software Foundation; either version 2 of the
16 %% License, or (at your option) any later version.
17 %% 
18 %% This document file is distributed in the hope that it will be useful, but
19 %% WITHOUT ANY WARRANTY; without even the implied warranty of
20 %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
21 %% General Public License for more details.
22 %% 
23 %% You should have received a copy of the GNU Lesser General Public License
24 %% along with this document file; if not, write to the Free Software
25 %% Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
26 %% USA.
27 %% 
28 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
29 \ProvidesPackage{algorithm}
30    [2009/08/24 v0.1 Document Style `algorithm' - floating environment]
31 \RequirePackage{float}
32 \RequirePackage{ifthen}
33 \newcommand{\ALG@within}{nothing}
34 \newboolean{ALG@within}
35 \setboolean{ALG@within}{false}
36 \newcommand{\ALG@floatstyle}{ruled}
37 \newcommand{\ALG@name}{Algorithm}
38 \newcommand{\listalgorithmname}{List of \ALG@name s}
39 % Declare Options:
40 % * first: appearance
41 \DeclareOption{plain}{
42   \renewcommand{\ALG@floatstyle}{plain}
43 }
44 \DeclareOption{ruled}{
45   \renewcommand{\ALG@floatstyle}{ruled}
46 }
47 \DeclareOption{boxed}{
48   \renewcommand{\ALG@floatstyle}{boxed}
49 }
50 % * then: numbering convention
51 \DeclareOption{part}{
52   \renewcommand{\ALG@within}{part}
53   \setboolean{ALG@within}{true}
54 }
55 \DeclareOption{chapter}{
56   \renewcommand{\ALG@within}{chapter}
57   \setboolean{ALG@within}{true}
58 }
59 \DeclareOption{section}{
60   \renewcommand{\ALG@within}{section}
61   \setboolean{ALG@within}{true}
62 }
63 \DeclareOption{subsection}{
64   \renewcommand{\ALG@within}{subsection}
65   \setboolean{ALG@within}{true}
66 }
67 \DeclareOption{subsubsection}{
68   \renewcommand{\ALG@within}{subsubsection}
69   \setboolean{ALG@within}{true}
70 }
71 \DeclareOption{nothing}{
72   \renewcommand{\ALG@within}{nothing}
73   \setboolean{ALG@within}{true}
74 }
75 \DeclareOption*{\edef\ALG@name{\CurrentOption}}
76 % ALGORITHM
77 %
78 \ProcessOptions
79 \floatstyle{\ALG@floatstyle}
80 \ifthenelse{\boolean{ALG@within}}{
81   \ifthenelse{\equal{\ALG@within}{part}}
82      {\newfloat{algorithm}{htbp}{loa}[part]}{}
83   \ifthenelse{\equal{\ALG@within}{chapter}}
84      {\newfloat{algorithm}{htbp}{loa}[chapter]}{}
85   \ifthenelse{\equal{\ALG@within}{section}}
86      {\newfloat{algorithm}{htbp}{loa}[section]}{}
87   \ifthenelse{\equal{\ALG@within}{subsection}}
88      {\newfloat{algorithm}{htbp}{loa}[subsection]}{}
89   \ifthenelse{\equal{\ALG@within}{subsubsection}}
90      {\newfloat{algorithm}{htbp}{loa}[subsubsection]}{}
91   \ifthenelse{\equal{\ALG@within}{nothing}}
92      {\newfloat{algorithm}{htbp}{loa}}{}
93 }{
94   \newfloat{algorithm}{htbp}{loa}
95 }
96 \floatname{algorithm}{\ALG@name}
97 \newcommand{\listofalgorithms}{\listof{algorithm}{\listalgorithmname}}
98 \endinput
99 %%
100 %% End of file `algorithm.sty'.