texlive[45223] Master/texmf-dist: algobox (5sep17)

commits+karl at tug.org commits+karl at tug.org
Tue Sep 5 23:56:48 CEST 2017


Revision: 45223
          http://tug.org/svn/texlive?view=revision&revision=45223
Author:   karl
Date:     2017-09-05 23:56:47 +0200 (Tue, 05 Sep 2017)
Log Message:
-----------
algobox (5sep17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/algobox/LICENSE
    trunk/Master/texmf-dist/doc/latex/algobox/README.md
    trunk/Master/texmf-dist/doc/latex/algobox/algobox.pdf
    trunk/Master/texmf-dist/source/latex/algobox/algobox.dtx
    trunk/Master/texmf-dist/source/latex/algobox/algobox.ins
    trunk/Master/texmf-dist/tex/latex/algobox/algobox.sty

Modified: trunk/Master/texmf-dist/doc/latex/algobox/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/algobox/LICENSE	2017-09-05 21:56:28 UTC (rev 45222)
+++ trunk/Master/texmf-dist/doc/latex/algobox/LICENSE	2017-09-05 21:56:47 UTC (rev 45223)
@@ -632,7 +632,7 @@
 the "copyright" line and a pointer to where the full notice is found.
 
     algobox
-    Copyright (C) 2017  frnchfrgg-latex
+    Copyright (C) 2016-2017  Julien RIVAUD
 
     This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -652,7 +652,7 @@
   If the program does terminal interaction, make it output a short
 notice like this when it starts in an interactive mode:
 
-    algobox  Copyright (C) 2017  frnchfrgg-latex
+    algobox  Copyright (C) 2016-2017  Julien RIVAUD
     This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
     This is free software, and you are welcome to redistribute it
     under certain conditions; type `show c' for details.

Modified: trunk/Master/texmf-dist/doc/latex/algobox/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/algobox/README.md	2017-09-05 21:56:28 UTC (rev 45222)
+++ trunk/Master/texmf-dist/doc/latex/algobox/README.md	2017-09-05 21:56:47 UTC (rev 45223)
@@ -1,15 +1,21 @@
-# The algobox package
+# The [algobox](https://ctan.org/pkg/algobox) package
 
-This small package can typeset Algobox programs almost exactly as displayed
-when editing with Algobox itself (http://www.xm1math.net/algobox/), using an
-input syntax very similar to the actual Algobox program text.
+This [small LaTeX package](https://ctan.org/pkg/algobox) can typeset Algobox
+programs almost exactly as displayed when editing with
+[Algobox itself](http://www.xm1math.net/algobox/), using an input syntax very
+similar to the actual Algobox program text.
 
 It is far better than the LaTeX export of Algobox which does not look like the
-editor rendition, has arbitrary and inconsistent differences with the program
-text, is not very easy to customize and produces standalone documents.
+editor rendition, produces standalone documents cumbersome to customize, and
+has arbitrary and inconsistent differences between the input syntax and the
+program text.
 
-The dependencies of the algobox package are TikZ and kernel3. You can change a
-lot of things by changing TikZ styles.
+This package depends upon the following other LaTeX packages:
+[expl3](https://ctan.org/pkg/expl3),
+[TikZ](https://ctan.org/pkg/pgf),
+[environ](https://ctan.org/pkg/environ),
+[xparse](https://ctan.org/pkg/xparse),
+[xcolor](https://ctan.org/pkg/xcolor).
 
 This package may be distributed and/or modified under the conditions of the
 General Public License (GPL), either version 3 of this license or (at your

Modified: trunk/Master/texmf-dist/doc/latex/algobox/algobox.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/algobox/algobox.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/algobox/algobox.dtx	2017-09-05 21:56:28 UTC (rev 45222)
+++ trunk/Master/texmf-dist/source/latex/algobox/algobox.dtx	2017-09-05 21:56:47 UTC (rev 45223)
@@ -1,7 +1,7 @@
 % \iffalse meta-comment
 % vim: tw=80
 %
-%% File: algobox.dtx (C) Copyright 2016 RIVAUD Julien
+%% File: algobox.dtx (C) Copyright 2016-2017 RIVAUD Julien
 %%
 %% It may be distributed and/or modified under the conditions of the
 %% General Public License (GPL), either version 3 of this
@@ -14,16 +14,16 @@
 \RequirePackage{expl3}[2016/01/19]
 \def\ExplFileName{algobox}
 \def\ExplFileDescription{Typeset Algobox programs}
-\def\ExplFileDate{2017/09/03}
-\def\ExplFileVersion{1.1}
+\def\ExplFileDate{2017/09/04}
+\def\ExplFileVersion{1.2a}
 %</driver|package>
 %<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,a4paper]{l3doc}
 \usepackage{fontspec}
 \usepackage{algobox}
 \usepackage{url}
 \begin{document}
-  \def\Algobox{\textsc{Algobox}}
+  \def\Algobox{\textsc{AlgoBox}}
   \DocInput{\jobname.dtx}
 \end{document}
 %</driver>
@@ -232,14 +232,21 @@
 
 \int_new:N \l_@@_level_int
 
+%    \end{macrocode}
+% The colors are defined in "algohighlighter.cpp" in the \Algobox\ source,
+% except for the tree lines color. The names here are the same, with "algobox"
+% prepended.
+%    \begin{macrocode}
+
 \definecolor{algoboxarbre}{RGB}{146,146,146}
-\colorlet   {algoboxcommentaire}{algoboxarbre!70!black}
-\definecolor{algoboxstructure}{RGB}{134,0,0}
-\definecolor{algoboxmotclef}{RGB}{25,3,180}
-\definecolor{algoboxsialors}{RGB}{147,0,128}
-\definecolor{algoboxpour}{RGB}{187,136,0}
-\definecolor{algoboxtantque}{RGB}{222,111,6}
-\definecolor{algoboxnormal}{RGB}{0,0,0}
+\definecolor{algoboxColorStandard}{HTML}{000000}
+\definecolor{algoboxColorComment}{HTML}{606060}
+\definecolor{algoboxColorBloc}{HTML}{800000}
+\definecolor{algoboxColorCommande}{HTML}{0000CC}
+\definecolor{algoboxColorSi}{HTML}{800080}
+\definecolor{algoboxColorTantQue}{HTML}{DD6F06}
+\definecolor{algoboxColorPour}{HTML}{BB8800}
+\definecolor{algoboxColorFonction}{HTML}{9A4D00}
 
 \tikzset{
     every~algobox/.style=,
@@ -253,32 +260,36 @@
     algobox~indent/.style={xshift=2em},
     algobox~normal/.style={
         font=\sffamily,
-        color=algoboxnormal,
+        color=algoboxColorStandard,
     },
     algobox~commentaire/.style={
         algobox~normal/.try,
-        color=algoboxcommentaire,
+        color=algoboxColorComment,
     },
-    algobox~motclef/.style={
+    algobox~commande/.style={
         algobox~normal/.try,
-        color=algoboxmotclef,
+        color=algoboxColorCommande,
     },
     algobox~structure/.style={
         font=\sffamily\bfseries,
-        color=algoboxstructure
+        color=algoboxColorBloc
     },
     algobox~sialors/.style={
         algobox~structure/.try,
-        color=algoboxsialors,
+        color=algoboxColorSi,
     },
     algobox~pour/.style={
         algobox~structure/.try,
-        color=algoboxpour,
+        color=algoboxColorPour,
     },
     algobox~tantque/.style={
         algobox~structure/.try,
-        color=algoboxtantque,
+        color=algoboxColorTantQue,
     },
+    algobox~fonctions/.style={
+        algobox~structure/.try,
+        color=algoboxColorFonction,
+    },
 }
 
 %    \end{macrocode}
@@ -404,31 +415,19 @@
 % \subsection{Parsing/typesetting commands}
 %    \begin{macrocode}
 
-\NewDocumentCommand \@@_VARIABLES:w {} {
-    \@@_indent:nn {structure} {VARIABLES}
-}
-
 \NewDocumentCommand \@@_ESTDUTYPE:w { +u{\ESTDUTYPE} +u{\;} } {
     \@@_block:nn {normal} {
         \ignorespaces #1 \unskip\c_space_token\null
     }
-    \@@_node:nn {motclef}{EST_DU_TYPE}
+    \@@_node:nn {commande}{EST_DU_TYPE}
     \@@_node:nn {normal}{\null\c_space_token#2}
 }
 
-\NewDocumentCommand \@@_DEBUTALGORITHME:w {} {
-    \int_compare:nNnT \l_@@_level_int = \c_one {
-        % if there was a VARIABLES before
-        \@@_unindent:
-    }
-    \@@_indent:nn {structure} {DEBUT_ALGORITHME}
-}
-
 \NewDocumentCommand \@@_FINALGORITHME:w {} {
-    \int_compare:nNnT \l_@@_level_int = \c_one {
+    \int_while_do:nNnn \l_@@_level_int > \c_zero {
         \@@_unindent:
-        \@@_block:nn {structure} {FIN_ALGORITHME}
     }
+    \@@_block:nn {structure} {FIN_ALGORITHME}
 }
 
 \NewDocumentCommand \@@_PRENDLAVALEUR:w { u{\PRENDLAVALEUR} m } {
@@ -435,7 +434,7 @@
     \@@_block:nn {normal} {
         \ignorespaces#1\unskip\c_space_token\null
     }
-    \@@_node:nn {motclef}{PREND_LA_VALEUR}
+    \@@_node:nn {commande}{PREND_LA_VALEUR}
     \@@_node:nn {normal}{\null\c_space_token#2}
 }
 
@@ -490,6 +489,14 @@
     \@@_unindent:
 }
 
+\NewDocumentCommand \@@_FONCTION:w { +u{\;} } {
+    \int_while_do:nNnn \l_@@_level_int > \c_one {
+        \@@_unindent:
+    }
+    \@@_indent:nn {fonctions} {FONCTION}
+    \@@_node:nn {normal}{\null\c_space_token#1}
+}
+
 \NewDocumentCommand \@@_LINE:w { s O{normal} m } {
     \IfBooleanTF {#1} {
         \@@_indent:nn {#2} {#3}
@@ -507,7 +514,52 @@
 % \subsection{User commands and environment}
 %    \begin{macrocode}
 
+\cs_new_protected_nopar:Nn \@@_make_keyword:n {
+    \tl_set:Nn \l_tmpa_tl {#1}
+    \tl_replace_all:Nnn \l_tmpa_tl {_} {}
+    \cs_set:cpn {\l_tmpa_tl} {\@@_keyword:nw {#1}}
+}
 
+\NewDocumentCommand \@@_keyword:nw {m +u{\;}} {
+    \@@_block:nn {commande} {#1}
+    \@@_node:nn {normal}{\null\c_space_token#2}
+}
+
+\cs_new_protected_nopar:Nn \@@_make_structure:nn {
+    \tl_set:Nn \l_tmpa_tl {#2}
+    \tl_replace_all:Nnn \l_tmpa_tl {_} {}
+    \cs_set:cpn {\l_tmpa_tl} {\@@_topstructure:nn {#1}{#2}}
+}
+
+\cs_new_protected_nopar:Nn \@@_topstructure:nn {
+    \int_while_do:nNnn \l_@@_level_int > \c_zero {
+        \@@_unindent:
+    }
+    \@@_indent:nn {#1} {#2}
+}
+
+\cs_new_protected_nopar:Nn \@@_make_func_structure:nn {
+    \tl_set:Nn \l_tmpa_tl {#1}
+    \tl_replace_all:Nnn \l_tmpa_tl {_} {}
+    \cs_set:cpn {\l_tmpa_tl} {\@@_funcstructure:nn {#1}{#2}}
+}
+
+\cs_new_protected_nopar:Nn \@@_funcstructure:nn {
+    \int_while_do:nNnn \l_@@_level_int > \c_two {
+        \@@_unindent:
+    }
+    \bool_if:nTF {#2}{\@@_indent:nn}{\@@_block:nn} {fonctions} {#1}
+}
+
+\clist_const:Nn \c_@@_keywords_clist {
+    PAUSE, LIRE, AFFICHERCALCUL, AFFICHER,
+    TRACER_POINT, TRACER_POINT_Rouge, TRACER_POINT_Vert,
+    TRACER_POINT_Bleu, TRACER_POINT_Blanc,
+    TRACER_SEGMENT, TRACER_SEGMENT_Rouge, TRACER_SEGMENT_Vert,
+    TRACER_SEGMENT_Bleu, TRACER_SEGMENT_Blanc,
+    RENVOYER, APPELER_FONCTION
+}
+
 \cs_new_protected_nopar:Nn \@@_begincode:n {
     \int_zero:N \l_@@_level_int
     \begin{tikzpicture}[#1]
@@ -517,26 +569,24 @@
         \cs_set_eq:NN \; \prg_do_nothing:
         \cs_set_eq:NN \LINE             \@@_LINE:w
         \cs_set_eq:NN \NODE             \@@_NODE:w
-        \cs_set_eq:NN \VARIABLES        \@@_VARIABLES:w
-        \cs_set_eq:NN \DEBUTALGORITHME  \@@_DEBUTALGORITHME:w
         \cs_set_eq:NN \FINALGORITHME    \@@_FINALGORITHME:w
         \cs_set_eq:NN \SI               \@@_SI:w
         \cs_set_eq:NN \POUR             \@@_POUR:w
         \cs_set_eq:NN \TANTQUE          \@@_TANTQUE:w
-        \cs_set:Npn \AFFICHER           {\@@_keyword:nw {AFFICHER}}
-        \cs_set:Npn \AFFICHERCALCUL     {\@@_keyword:nw {AFFICHERCALCUL}}
-        \cs_set:Npn \LIRE               {\@@_keyword:nw {LIRE}}
-        \cs_set:Npn \PAUSE              {\@@_block:nn{motclef}{PAUSE}}
+        \cs_set_eq:NN \FONCTION         \@@_FONCTION:w
         \cs_set:Npn \//##1\;            {\@@_block:nn{commentaire}{//##1}}
+        \clist_map_function:NN \c_@@_keywords_clist \@@_make_keyword:n
+        \@@_make_structure:nn {structure} {VARIABLES}
+        \@@_make_structure:nn {structure} {DEBUT_ALGORITHME}
+        \@@_make_structure:nn {fonctions} {FONCTIONS_UTILISEES}
+        \@@_make_func_structure:nn {VARIABLES_FONCTION} \c_true_bool
+        \@@_make_func_structure:nn {DEBUT_FONCTION} \c_false_bool
+        \@@_make_func_structure:nn {FIN_FONCTION} \c_false_bool
 }
 \cs_new_protected_nopar:Nn \@@_closecode: {
     \end{tikzpicture}
 }
 
-\NewDocumentCommand \@@_keyword:nw {m +u{\;}} {
-    \@@_block:nn {motclef} {#1}
-    \@@_node:nn {normal}{\null\c_space_token#2}
-}
 
 
 \NewDocumentCommand \smalgobox { O{} m } {

Modified: trunk/Master/texmf-dist/source/latex/algobox/algobox.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/algobox/algobox.ins	2017-09-05 21:56:28 UTC (rev 45222)
+++ trunk/Master/texmf-dist/source/latex/algobox/algobox.ins	2017-09-05 21:56:47 UTC (rev 45223)
@@ -1,6 +1,6 @@
 \iffalse meta-comment
 
-File algobox.ins (C) Copyright 2016 RIVAUD Julien
+File algobox.ins (C) Copyright 2016-2017 RIVAUD Julien
 
 It may be distributed and/or modified under the conditions of the
 General Public License (GPL), either version 3 of this

Modified: trunk/Master/texmf-dist/tex/latex/algobox/algobox.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/algobox/algobox.sty	2017-09-05 21:56:28 UTC (rev 45222)
+++ trunk/Master/texmf-dist/tex/latex/algobox/algobox.sty	2017-09-05 21:56:47 UTC (rev 45223)
@@ -6,7 +6,7 @@
 %%
 %% algobox.dtx  (with options: `package')
 %% 
-%% File: algobox.dtx (C) Copyright 2016 RIVAUD Julien
+%% File: algobox.dtx (C) Copyright 2016-2017 RIVAUD Julien
 %%
 %% It may be distributed and/or modified under the conditions of the
 %% General Public License (GPL), either version 3 of this
@@ -15,8 +15,8 @@
 \RequirePackage{expl3}[2016/01/19]
 \def\ExplFileName{algobox}
 \def\ExplFileDescription{Typeset Algobox programs}
-\def\ExplFileDate{2017/09/03}
-\def\ExplFileVersion{1.1}
+\def\ExplFileDate{2017/09/04}
+\def\ExplFileVersion{1.2a}
 \ProvidesExplPackage
   {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
 \RequirePackage{xparse}
@@ -31,14 +31,16 @@
 
 \int_new:N \l__algobox_level_int
 
+
 \definecolor{algoboxarbre}{RGB}{146,146,146}
-\colorlet   {algoboxcommentaire}{algoboxarbre!70!black}
-\definecolor{algoboxstructure}{RGB}{134,0,0}
-\definecolor{algoboxmotclef}{RGB}{25,3,180}
-\definecolor{algoboxsialors}{RGB}{147,0,128}
-\definecolor{algoboxpour}{RGB}{187,136,0}
-\definecolor{algoboxtantque}{RGB}{222,111,6}
-\definecolor{algoboxnormal}{RGB}{0,0,0}
+\definecolor{algoboxColorStandard}{HTML}{000000}
+\definecolor{algoboxColorComment}{HTML}{606060}
+\definecolor{algoboxColorBloc}{HTML}{800000}
+\definecolor{algoboxColorCommande}{HTML}{0000CC}
+\definecolor{algoboxColorSi}{HTML}{800080}
+\definecolor{algoboxColorTantQue}{HTML}{DD6F06}
+\definecolor{algoboxColorPour}{HTML}{BB8800}
+\definecolor{algoboxColorFonction}{HTML}{9A4D00}
 
 \tikzset{
     every~algobox/.style=,
@@ -52,32 +54,36 @@
     algobox~indent/.style={xshift=2em},
     algobox~normal/.style={
         font=\sffamily,
-        color=algoboxnormal,
+        color=algoboxColorStandard,
     },
     algobox~commentaire/.style={
         algobox~normal/.try,
-        color=algoboxcommentaire,
+        color=algoboxColorComment,
     },
-    algobox~motclef/.style={
+    algobox~commande/.style={
         algobox~normal/.try,
-        color=algoboxmotclef,
+        color=algoboxColorCommande,
     },
     algobox~structure/.style={
         font=\sffamily\bfseries,
-        color=algoboxstructure
+        color=algoboxColorBloc
     },
     algobox~sialors/.style={
         algobox~structure/.try,
-        color=algoboxsialors,
+        color=algoboxColorSi,
     },
     algobox~pour/.style={
         algobox~structure/.try,
-        color=algoboxpour,
+        color=algoboxColorPour,
     },
     algobox~tantque/.style={
         algobox~structure/.try,
-        color=algoboxtantque,
+        color=algoboxColorTantQue,
     },
+    algobox~fonctions/.style={
+        algobox~structure/.try,
+        color=algoboxColorFonction,
+    },
 }
 
 
@@ -192,31 +198,19 @@
     }
 }
 
-\NewDocumentCommand \__algobox_VARIABLES:w {} {
-    \__algobox_indent:nn {structure} {VARIABLES}
-}
-
 \NewDocumentCommand \__algobox_ESTDUTYPE:w { +u{\ESTDUTYPE} +u{\;} } {
     \__algobox_block:nn {normal} {
         \ignorespaces #1 \unskip\c_space_token\null
     }
-    \__algobox_node:nn {motclef}{EST_DU_TYPE}
+    \__algobox_node:nn {commande}{EST_DU_TYPE}
     \__algobox_node:nn {normal}{\null\c_space_token#2}
 }
 
-\NewDocumentCommand \__algobox_DEBUTALGORITHME:w {} {
-    \int_compare:nNnT \l__algobox_level_int = \c_one {
-        % if there was a VARIABLES before
-        \__algobox_unindent:
-    }
-    \__algobox_indent:nn {structure} {DEBUT_ALGORITHME}
-}
-
 \NewDocumentCommand \__algobox_FINALGORITHME:w {} {
-    \int_compare:nNnT \l__algobox_level_int = \c_one {
+    \int_while_do:nNnn \l__algobox_level_int > \c_zero {
         \__algobox_unindent:
-        \__algobox_block:nn {structure} {FIN_ALGORITHME}
     }
+    \__algobox_block:nn {structure} {FIN_ALGORITHME}
 }
 
 \NewDocumentCommand \__algobox_PRENDLAVALEUR:w { u{\PRENDLAVALEUR} m } {
@@ -223,7 +217,7 @@
     \__algobox_block:nn {normal} {
         \ignorespaces#1\unskip\c_space_token\null
     }
-    \__algobox_node:nn {motclef}{PREND_LA_VALEUR}
+    \__algobox_node:nn {commande}{PREND_LA_VALEUR}
     \__algobox_node:nn {normal}{\null\c_space_token#2}
 }
 
@@ -278,6 +272,14 @@
     \__algobox_unindent:
 }
 
+\NewDocumentCommand \__algobox_FONCTION:w { +u{\;} } {
+    \int_while_do:nNnn \l__algobox_level_int > \c_one {
+        \__algobox_unindent:
+    }
+    \__algobox_indent:nn {fonctions} {FONCTION}
+    \__algobox_node:nn {normal}{\null\c_space_token#1}
+}
+
 \NewDocumentCommand \__algobox_LINE:w { s O{normal} m } {
     \IfBooleanTF {#1} {
         \__algobox_indent:nn {#2} {#3}
@@ -292,6 +294,52 @@
 }
 
 
+\cs_new_protected_nopar:Nn \__algobox_make_keyword:n {
+    \tl_set:Nn \l_tmpa_tl {#1}
+    \tl_replace_all:Nnn \l_tmpa_tl {_} {}
+    \cs_set:cpn {\l_tmpa_tl} {\__algobox_keyword:nw {#1}}
+}
+
+\NewDocumentCommand \__algobox_keyword:nw {m +u{\;}} {
+    \__algobox_block:nn {commande} {#1}
+    \__algobox_node:nn {normal}{\null\c_space_token#2}
+}
+
+\cs_new_protected_nopar:Nn \__algobox_make_structure:nn {
+    \tl_set:Nn \l_tmpa_tl {#2}
+    \tl_replace_all:Nnn \l_tmpa_tl {_} {}
+    \cs_set:cpn {\l_tmpa_tl} {\__algobox_topstructure:nn {#1}{#2}}
+}
+
+\cs_new_protected_nopar:Nn \__algobox_topstructure:nn {
+    \int_while_do:nNnn \l__algobox_level_int > \c_zero {
+        \__algobox_unindent:
+    }
+    \__algobox_indent:nn {#1} {#2}
+}
+
+\cs_new_protected_nopar:Nn \__algobox_make_func_structure:nn {
+    \tl_set:Nn \l_tmpa_tl {#1}
+    \tl_replace_all:Nnn \l_tmpa_tl {_} {}
+    \cs_set:cpn {\l_tmpa_tl} {\__algobox_funcstructure:nn {#1}{#2}}
+}
+
+\cs_new_protected_nopar:Nn \__algobox_funcstructure:nn {
+    \int_while_do:nNnn \l__algobox_level_int > \c_two {
+        \__algobox_unindent:
+    }
+    \bool_if:nTF {#2}{\__algobox_indent:nn}{\__algobox_block:nn} {fonctions} {#1}
+}
+
+\clist_const:Nn \c__algobox_keywords_clist {
+    PAUSE, LIRE, AFFICHERCALCUL, AFFICHER,
+    TRACER_POINT, TRACER_POINT_Rouge, TRACER_POINT_Vert,
+    TRACER_POINT_Bleu, TRACER_POINT_Blanc,
+    TRACER_SEGMENT, TRACER_SEGMENT_Rouge, TRACER_SEGMENT_Vert,
+    TRACER_SEGMENT_Bleu, TRACER_SEGMENT_Blanc,
+    RENVOYER, APPELER_FONCTION
+}
+
 \cs_new_protected_nopar:Nn \__algobox_begincode:n {
     \int_zero:N \l__algobox_level_int
     \begin{tikzpicture}[#1]
@@ -301,27 +349,24 @@
         \cs_set_eq:NN \; \prg_do_nothing:
         \cs_set_eq:NN \LINE             \__algobox_LINE:w
         \cs_set_eq:NN \NODE             \__algobox_NODE:w
-        \cs_set_eq:NN \VARIABLES        \__algobox_VARIABLES:w
-        \cs_set_eq:NN \DEBUTALGORITHME  \__algobox_DEBUTALGORITHME:w
         \cs_set_eq:NN \FINALGORITHME    \__algobox_FINALGORITHME:w
         \cs_set_eq:NN \SI               \__algobox_SI:w
         \cs_set_eq:NN \POUR             \__algobox_POUR:w
         \cs_set_eq:NN \TANTQUE          \__algobox_TANTQUE:w
-        \cs_set:Npn \AFFICHER           {\__algobox_keyword:nw {AFFICHER}}
-        \cs_set:Npn \AFFICHERCALCUL     {\__algobox_keyword:nw {AFFICHERCALCUL}}
-        \cs_set:Npn \LIRE               {\__algobox_keyword:nw {LIRE}}
-        \cs_set:Npn \PAUSE              {\__algobox_block:nn{motclef}{PAUSE}}
+        \cs_set_eq:NN \FONCTION         \__algobox_FONCTION:w
         \cs_set:Npn \//##1\;            {\__algobox_block:nn{commentaire}{//##1}}
+        \clist_map_function:NN \c__algobox_keywords_clist \__algobox_make_keyword:n
+        \__algobox_make_structure:nn {structure} {VARIABLES}
+        \__algobox_make_structure:nn {structure} {DEBUT_ALGORITHME}
+        \__algobox_make_structure:nn {fonctions} {FONCTIONS_UTILISEES}
+        \__algobox_make_func_structure:nn {VARIABLES_FONCTION} \c_true_bool
+        \__algobox_make_func_structure:nn {DEBUT_FONCTION} \c_false_bool
+        \__algobox_make_func_structure:nn {FIN_FONCTION} \c_false_bool
 }
 \cs_new_protected_nopar:Nn \__algobox_closecode: {
     \end{tikzpicture}
 }
 
-\NewDocumentCommand \__algobox_keyword:nw {m +u{\;}} {
-    \__algobox_block:nn {motclef} {#1}
-    \__algobox_node:nn {normal}{\null\c_space_token#2}
-}
-
 \NewDocumentCommand \smalgobox { O{} m } {
     \group_begin:
     \__algobox_begincode:n {every~smalgobox/.try,#1}



More information about the tex-live-commits mailing list