46 lines
1.1 KiB
TeX
46 lines
1.1 KiB
TeX
%%%
|
|
%%%
|
|
%%% Extensions : algo.sty
|
|
%%% Version : 1.0
|
|
%%% Date : 01/01/17
|
|
%%%
|
|
%%% Auteur : Jeff LANCE
|
|
%%%
|
|
%%%
|
|
|
|
\NeedsTeXFormat{LaTeX2e}
|
|
\ProvidesPackage{algo}[2017/01/01 Ajout d'environnement au package
|
|
algorithmicx, v1.0]
|
|
|
|
|
|
|
|
%-- extensions
|
|
% PERSONNELLES
|
|
% commun: contient des définitions et extensions de base pour tout.
|
|
% \RequirePackage{commun}
|
|
|
|
% ALGORITHMIE
|
|
\RequirePackage{algpseudocode,algorithm,algorithmicx}
|
|
%-- %
|
|
|
|
\newfontfamily\UbuntuMono[Ligatures=TeX]{ubuntumono}
|
|
|
|
|
|
|
|
% AlgoBox
|
|
\algnewcommand{\set[2]{\State #1 \textbf{PREND\_LA\_VALEUR} #2}
|
|
\algnewcommand{\vars}[2]{\State \textbf{VARIABLES}}
|
|
|
|
\NewDocumentEnvironment{algobox}{ }{%begin
|
|
\UbuntuMono
|
|
% \algsetblockx[variables]{bVARS}{eVARS}{}{1cm}{\textbf{VARIABLES}}{}
|
|
% \algblockx[traitement]{debut}{fin}{\textbf{\UbuntuMono DEBUT\_ALGORITHME}}{\textbf{\UbuntuMono FIN\_ALGORITHME}}
|
|
\algsetblockx[traitement]{debut}{fin}{}{1cm}{\textbf{DEBUT\_ALGORITHME}}{\textbf{FIN\_ALGORITHME}}
|
|
|
|
% \algnewcommand{\PREND}[2]{\State #1 \textbf{PREND\_LA\_VALEUR} #2}
|
|
|
|
\begin{algorithmic}
|
|
}{%end
|
|
\end{algorithmic}
|
|
}
|