forked from jesustorresdev/plantilla-tesis
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalgorithm.sty
More file actions
49 lines (49 loc) · 2.22 KB
/
algorithm.sty
File metadata and controls
49 lines (49 loc) · 2.22 KB
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
%%
%% algorithm.sty - Entorno flotante para envolver descripciones de algoritmos,
%% hechos con algorithmic (en algorithmics), algpseudocode
%% (en algorithmicx) o usando cualquier otro método.
%%
%% Copyright 2013 Jesús Torres <jmtorres@ull.es>
%%
%% Esta obra está bajo licencia Creative Commons Reconocimiento 3.0 Unported
%%
\usepackage{float}
%%
% Estilo del nuevo float.
% Derivado de komaabove de KOMA-script
\newcommand*{\fs@algorithm}{%
\let\@fs@capt\floatc@komascript
\let\@fs@pre\@empty
\def\@fs@mid{\vskip\abovecaptionskip\hrule\vskip\abovecaptionskip}%
\def\@fs@post{\vskip\abovecaptionskip\hrule}
\let\@fs@iftopcapt\iftrue}
\floatstyle{algorithm}
\newfloat{algorithm}{tbp}{loa}[chapter]
\floatname{algorithm}{Algoritmo}
\newcommand{\listalgorithmname}{\'Indice de algoritmos}
\newcommand\listofalgorithms{\listof{algorithm}{\listalgorithmname}}
%%
% Traducir las cadenas del paquete algorithmic al español
% http://www.rosapolis.net/2008/04/21/escribir-algoritmos-en-latex/
\renewcommand{\algorithmicrequire}{\textbf{Entrada:}}
\renewcommand{\algorithmicensure}{\textbf{Salida:}}
% \renewcommand{\algorithmicend}{\textbf{fin}}
% \renewcommand{\algorithmicif}{\textbf{si}}
% \renewcommand{\algorithmicthen}{\textbf{entonces}}
% \renewcommand{\algorithmicelse}{\textbf{si no}}
% \renewcommand{\algorithmicelsif}{\algorithmicelse,\ \algorithmicif}
% \renewcommand{\algorithmicendif}{\algorithmicend\ \algorithmicif}
% \renewcommand{\algorithmicfor}{\textbf{para}}
% \renewcommand{\algorithmicforall}{\textbf{para todo}}
% \renewcommand{\algorithmicdo}{\textbf{hacer}}
% \renewcommand{\algorithmicendfor}{\algorithmicend\ \algorithmicfor}
% \renewcommand{\algorithmicwhile}{\textbf{mientras}}
% \renewcommand{\algorithmicendwhile}{\algorithmicend\ \algorithmicwhile}
% \renewcommand{\algorithmicloop}{\textbf{repetir}}
% \renewcommand{\algorithmicendloop}{\algorithmicend\ \algorithmicloop}
% \renewcommand{\algorithmicrepeat}{\textbf{repetir}}
% \renewcommand{\algorithmicuntil}{\textbf{hasta que}}
% \renewcommand{\algorithmicprint}{\textbf{imprimir}}
% \renewcommand{\algorithmicreturn}{\textbf{devolver}}
% \renewcommand{\algorithmictrue}{\textbf{cierto }}
% \renewcommand{\algorithmicfalse}{\textbf{falso }}