summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-09-05 21:56:47 +0000
committerKarl Berry <karl@freefriends.org>2017-09-05 21:56:47 +0000
commita62f77790bf4d66905f22ad01203d3b08301f6e5 (patch)
tree553ed7ec1840ccfe6cab7e2425874def4ea43215 /Master
parent4bc5b2eef4dde44c1ae2a1f191b7bb5ddee7c121 (diff)
algobox (5sep17)
git-svn-id: svn://tug.org/texlive/trunk@45223 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/algobox/LICENSE4
-rw-r--r--Master/texmf-dist/doc/latex/algobox/README.md22
-rw-r--r--Master/texmf-dist/doc/latex/algobox/algobox.pdfbin130422 -> 131991 bytes
-rw-r--r--Master/texmf-dist/source/latex/algobox/algobox.dtx142
-rw-r--r--Master/texmf-dist/source/latex/algobox/algobox.ins2
-rw-r--r--Master/texmf-dist/tex/latex/algobox/algobox.sty135
6 files changed, 203 insertions, 102 deletions
diff --git a/Master/texmf-dist/doc/latex/algobox/LICENSE b/Master/texmf-dist/doc/latex/algobox/LICENSE
index b89b5dd20de..5abcef6643a 100644
--- a/Master/texmf-dist/doc/latex/algobox/LICENSE
+++ b/Master/texmf-dist/doc/latex/algobox/LICENSE
@@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least
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 @@ Also add information on how to contact you by electronic and paper mail.
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.
diff --git a/Master/texmf-dist/doc/latex/algobox/README.md b/Master/texmf-dist/doc/latex/algobox/README.md
index f31a1c268a4..6222f40da28 100644
--- a/Master/texmf-dist/doc/latex/algobox/README.md
+++ b/Master/texmf-dist/doc/latex/algobox/README.md
@@ -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
diff --git a/Master/texmf-dist/doc/latex/algobox/algobox.pdf b/Master/texmf-dist/doc/latex/algobox/algobox.pdf
index 927b4e9966e..f8ee23f553c 100644
--- a/Master/texmf-dist/doc/latex/algobox/algobox.pdf
+++ b/Master/texmf-dist/doc/latex/algobox/algobox.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/algobox/algobox.dtx b/Master/texmf-dist/source/latex/algobox/algobox.dtx
index b20a17a29c9..2e26eb79f4d 100644
--- a/Master/texmf-dist/source/latex/algobox/algobox.dtx
+++ b/Master/texmf-dist/source/latex/algobox/algobox.dtx
@@ -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,31 +260,35 @@
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,
},
}
@@ -404,38 +415,26 @@
% \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 } {
\@@_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,6 +514,51 @@
% \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
@@ -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 } {
diff --git a/Master/texmf-dist/source/latex/algobox/algobox.ins b/Master/texmf-dist/source/latex/algobox/algobox.ins
index 60f63628e77..5cd013ccbe8 100644
--- a/Master/texmf-dist/source/latex/algobox/algobox.ins
+++ b/Master/texmf-dist/source/latex/algobox/algobox.ins
@@ -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
diff --git a/Master/texmf-dist/tex/latex/algobox/algobox.sty b/Master/texmf-dist/tex/latex/algobox/algobox.sty
index 86be6ae0a29..b8d65ad15fb 100644
--- a/Master/texmf-dist/tex/latex/algobox/algobox.sty
+++ b/Master/texmf-dist/tex/latex/algobox/algobox.sty
@@ -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,31 +54,35 @@
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,38 +198,26 @@
}
}
-\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 } {
\__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}