From 9677ca1d39adeaddf111e115ac33eab370a56678 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 10 Aug 2020 21:03:54 +0000 Subject: frpseudocode (10aug20) git-svn-id: svn://tug.org/texlive/trunk@56088 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/frpseudocode/frpseudocode.sty | 60 +++++++++++++++++++--- 1 file changed, 54 insertions(+), 6 deletions(-) (limited to 'Master/texmf-dist/tex/latex/frpseudocode') diff --git a/Master/texmf-dist/tex/latex/frpseudocode/frpseudocode.sty b/Master/texmf-dist/tex/latex/frpseudocode/frpseudocode.sty index 4ad5dd260d2..72b656c25ae 100644 --- a/Master/texmf-dist/tex/latex/frpseudocode/frpseudocode.sty +++ b/Master/texmf-dist/tex/latex/frpseudocode/frpseudocode.sty @@ -1,26 +1,74 @@ %% @author Oliver Irwin -%% 2020-08-03 -\ProvidesPackage{frpseudocode}[2020/08/03 French Pseudocode 0.1.1] +%% 2020-08-10 +\ProvidesPackage{frpseudocode}[2020-08-10 French Pseudocode 0.3.0] +\RequirePackage{algpseudocode} + +%% Global mod +\floatname{algorithm}{Algorithme} %% Functions %% \algrenewcommand\algorithmicprocedure{\textbf{procédure}} \algrenewcommand\algorithmicfunction{\textbf{fonction}} \algrenewcommand\algorithmicreturn{\textbf{renvoyer}} +\algrenewtext{Procedure}[2]% +{\algorithmicprocedure\ \textproc{#1}\ifthenelse{\equal{#2}{}}{}{(#2)}\ :} + +\algrenewtext{Function}[2]% +{\algorithmicfunction\ \textproc{#1}\ifthenelse{\equal{#2}{}}{}{(#2)}\ :} + +%% Inputs +\algrenewcommand\algorithmicrequire{\textbf{Requiert : }} +\algrenewcommand\algorithmicensure{\textbf{Vérifier : }} + %% Control Instructions %% \algrenewcommand\algorithmicwhile{\textbf{Tant que}} +\algnewcommand\algorithmicwhilem{\textbf{tant que}} \algrenewcommand\algorithmicdo{\textbf{Faire}} +\algnewcommand\algorithmicdom{\textbf{faire}} \algrenewcommand\algorithmicend{\textbf{Fin}} \algrenewcommand\algorithmicfor{\textbf{Pour}} \algrenewcommand\algorithmicforall{\textbf{Pour tout}} -\algnewcommand\algorithmicfrom{\textbf{de}} +\algnewcommand\algorithmicfrom{\textbf{de }} \algnewcommand\algorithmicto{\textbf{à}} +\algnewcommand\algorithmicform{\textbf{pour}} + +\algrenewcommand\algorithmicrepeat{\textbf{Répéter}} +\algrenewcommand\algorithmicuntil{\textbf{Jusqu'à}} + +\algdef{SE}[FORFT]{ForFT}{EndFor}[3]{}% + +%% Change commands +\algrenewtext{ForFT}[3]% +{\algorithmicfor\ #1 \algorithmicfrom #2 \algorithmicto\ #3,\ \algorithmicdom\ :} -\algrenewtext{For}[3]% -{\algorithmicfor\ #1 \algorithmicfrom #2 \algorithmicto\ #3 \algorithmicdo} +\algrenewtext{For}[1]% +{\algorithmicfor\ #1,\ \algorithmicdom\ :} + +\algrenewtext{EndFor}[0]% +{\algorithmicend\ \algorithmicform} + +\algrenewtext{While}[1]% +{\algorithmicwhile\ #1,\ \algorithmicdom\ :} + +\algrenewtext{EndWhile}[0]% +{\algorithmicend\ \algorithmicwhilem} %% Conditionnals %% \algrenewcommand\algorithmicif{\textbf{Si}} +\algnewcommand\algorithmicifm{\textbf{si}} \algrenewcommand\algorithmicelse{\textbf{Sinon}} -\algrenewcommand\algorithmicthen{\textbf{Alors}} +\algrenewcommand\algorithmicthen{\textbf{alors}} +\newcommand{\algorithmicelsif}{\algorithmicelse\ \algorithmicif} + +\algrenewtext{ElsIf}[1]% +{\algorithmicelse ,\ \algorithmicifm\ #1} + +\algrenewtext{EndIf}[0]% +{\algorithmicend\ \algorithmicifm} + +%% Logical +%\algrenewcommand{\algorithmicnot}{\textbf{non}} +%\algrenewcommand{\algorithmicand}{\textbf{et}} +%\algrenewcommand{\algorithmicor}{\textbf{ou}} \ No newline at end of file -- cgit v1.2.3