texlive[72657] Master/texmf-dist: algxpar (25oct24)

commits+karl at tug.org commits+karl at tug.org
Fri Oct 25 23:29:33 CEST 2024


Revision: 72657
          https://tug.org/svn/texlive?view=revision&revision=72657
Author:   karl
Date:     2024-10-25 23:29:33 +0200 (Fri, 25 Oct 2024)
Log Message:
-----------
algxpar (25oct24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/algxpar/README.md
    trunk/Master/texmf-dist/doc/latex/algxpar/algxpar-doc.pdf
    trunk/Master/texmf-dist/doc/latex/algxpar/algxpar-doc.tex
    trunk/Master/texmf-dist/tex/latex/algxpar/algxpar-brazilian.kw.tex
    trunk/Master/texmf-dist/tex/latex/algxpar/algxpar-english.kw.tex
    trunk/Master/texmf-dist/tex/latex/algxpar/algxpar.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/algxpar/license
    trunk/Master/texmf-dist/tex/latex/algxpar/algxpar-versionchanges.sty

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/algxpar/algxpar-lzw.tex

Modified: trunk/Master/texmf-dist/doc/latex/algxpar/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/algxpar/README.md	2024-10-25 21:29:19 UTC (rev 72656)
+++ trunk/Master/texmf-dist/doc/latex/algxpar/README.md	2024-10-25 21:29:33 UTC (rev 72657)
@@ -2,12 +2,12 @@
 This package extends the algorithmicx package (algpseudocode) to support multiline text.
 
 ## How to use
-Copy `algxpar.sty` and `*.kw.tex` from `src` to somewhere in your TeX path.
+Copy `algxpar.sty` and `*.kw.tex` to somewhere in your TeX path.
 
-**Important**: as `algxpar` is included in the CTAN/Tex Live distribution, make sure this versions comes first in the search path when outdated.
+From CTAN: https://ctan.org/pkg/algxpar (check version!)
 
 ## Licence
-Copyright (C) 2019-2023 by Jander Moreira (moreira.jander at gmail.com)
+Copyright (C) 2019-2024 by Jander Moreira (moreira.jander at gmail.com)
 
 This work may be distributed and/or modified under the
 conditions of the LaTeX Project Public License, either version 1.3
@@ -23,12 +23,8 @@
 
 Files to use the package:  
 * algxpar.sty
-* algxpar-english.kw.tex
-* algxpar-brazilian.kw.tex
+* algxpar-*.kw.tex (keywords)
 
-Manual:
-* algxpar-doc.pdf             .
-
-Files to compile the manual (requires `pygmentize`)
+Manual (requires `pygmentize`):
 * algxpar-doc.tex
-* algxpar-lzw.tex
+* algxpar-versionchanges.sty

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

Modified: trunk/Master/texmf-dist/doc/latex/algxpar/algxpar-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/algxpar/algxpar-doc.tex	2024-10-25 21:29:19 UTC (rev 72656)
+++ trunk/Master/texmf-dist/doc/latex/algxpar/algxpar-doc.tex	2024-10-25 21:29:33 UTC (rev 72657)
@@ -8,7 +8,6 @@
 \usepackage{amsmath}
 \usepackage{textcomp}
 \usepackage[all]{nowidow}
-\usepackage{tikz}
 
 % \usepackage{array}
 
@@ -44,11 +43,11 @@
 \makeindex
 
 % minted
-\usepackage[outputdir = ../out]{minted}
+\usepackage[outputdir = ./out]{minted}
 % \usemintedstyle{borland}
 \newminted{latex}{autogobble, breaklines, bgcolor = blue!5, fontsize = \footnotesize}
 \newmintinline{latex}{}
-%
+
 % tcolorbox
 \usepackage{tcolorbox}
 \usepackage{color}
@@ -69,6 +68,33 @@
     listing engine = minted,
 }
 
+% Versions
+\usepackage{algxpar-versionchanges}
+
+
+\begin{filecontents}[overwrite, nosearch, noheader]{algxpar-lzw.tex}
+    \begin{algorithmic}[1]
+        \Description LZW Compression using a table with all known sequences of bytes.
+        \Input A flow of bytes
+        \Output A flow of bits with the compressed representation of the input bytes
+        \Statex
+        \Statep{Initialize a table with all bytes}[each position of the table has a single byte]
+        \Statep{Initilize \Id{sequence} with the first byte in the input flow}
+        \While{there are bytes in the input}[wait until all bytes are processed]
+            \Statep{Get a single byte from input and store it in \Id{byte}}
+            \If{the concatention of \Id{sequence} and \Id{byte} is in the table}
+                \Statep{Set \Id{sequence} to $\Id{sequence} + \Id{byte}$}[concatenate without producing any output]
+            \Else
+                \Statep{Output the code for \Id{sequence}}[i.e., the binary representation of its position in the table]
+                \Statep{Add the concatention of \Id{sequence} and \Id{byte} to the table}[the table learns a longer sequence]
+                \Statep{Set \Id{sequence} to \Id{byte}}[starts a new sequence with the remaining byte]
+            \EndIf
+        \EndWhile
+        \Statep{Output the code for \Id{sequence}}[the remaining sequence of bits]
+    \end{algorithmic}
+\end{filecontents}
+
+
 %% Text support
 
 % macro arguments formats
@@ -173,7 +199,9 @@
         [
         title = {%
             \hspace{-2em}\OptionInd{#1}%
-            \ifdim\docassignment>0pt\Option{ = #2}\fi%
+            \ifdim
+                \docassignment>0pt\Option{ = #2}
+            \fi%
             \IfValueT{#3}{\hfill\textit{Default:} \Option{#3}}
         },
         description,
@@ -198,6 +226,7 @@
     \medskip%
 }
 
+
 %% Repetitive text
 \NewDocumentCommand{\MacroOptionsText}{}{%
     Any \Argument{options} specified uniquely affect this macro.%
@@ -210,10 +239,10 @@
 
 \title{%
     The \PackageName{algxpar} package\thanks{This document corresponds to \PackageName{algxpar}~v\AlgVersion, dated \AlgDate.
-    This text was last revised \today.}%
+    This text was last compiled \today.}%
 }
-\author{Jander Moreira \texttt{moreira.jander at gmail.com}}
-\date{June 26, 2023}
+\author{Jander Moreira -- \texttt{moreira.jander at gmail.com}}
+\date{October 23, 2024}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -228,6 +257,12 @@
 
 \tableofcontents
 
+\VCRegisterVersion{0.9}{2019-11-12}
+\VCRegisterVersion{0.91}{2020-08-01}
+\VCRegisterVersion{0.99}{2023-06-28}
+\VCRegisterVersion{0.99.1}{2024/05/05}
+\VCRegisterVersion{0.99.2}{2024/10/23}
+
 \begin{figure}
     \tcbinputlisting{listing file = algxpar-lzw.tex, listing only}
     \vspace{3em}
@@ -242,7 +277,9 @@
 % \changes{v0.91}{2020/06/14}{New macro for assignments, using $\gets$}
 % \changes{v0.91}{2020/06/14}{New macro for assignments (verbose)}
 
+\VCPrintChanges
 
+
 \section{Introduction}
 I teach algorithms and programming and have adopted the \PackageName{algorithmicx} package (\PackageName{algpseudocode}) for writing my algorithms as it provides clear and easy to read pseudocodes with minimal effort to get a visually pleasing code.
 
@@ -252,7 +289,25 @@
 
 The \PackageName{algorithmx} and \PackageName{algpseudocode} packages do not natively support multi-line statements. This package therefore extends several macros to handle multiple lines correctly. Some new commands and a number of features have also been added.
 
+This package was first released as V0.9%
+\VCChange[disable]{
+    type = released,
+    version = 0.9,
+    description = Initial version,
+}%
+and almost totally rewritten in v0.99%
+\VCChange[disable]{
+    type = new,
+    version = 0.99,
+    description = The code was reviewd and almost entirely rewritten,
+}.
+\VCChange[disable]{
+    type = new,
+    version = 0.99.2,
+    description = Part of the code was rewritten using \PackageName{etoolbox}.,
+}.
 
+
 \section{Package usage and options}\label{sec:package-usage-and-options}
 This package depends on the following packages:
 
@@ -261,11 +316,12 @@
         \PackageName{algorithmicx}  & (\url{https://ctan.org/pkg/algorithmicx})  \\
         \PackageName{algpseudocode} & (\url{https://ctan.org/pkg/algorithmicx})  \\
         \PackageName{amssymb}       & (\url{https://ctan.org/pkg/amsfonts})      \\
-        \PackageName{fancyvrb}      & (\url{https://ctan.org/pkg/fancyvrb})      \\
+        \PackageName{etoolbox}      & (\url{https://ctan.org/pkg/etoolbox})      \\
+        % \PackageName{fancyvrb}      & (\url{https://ctan.org/pkg/fancyvrb})      \\
         \PackageName{pgfmath}       & (\url{https://ctan.org/pkg/pgf})           \\
         \PackageName{pgfopts}       & (\url{https://ctan.org/pkg/pgf})           \\
         \PackageName{ragged2e}      & (\url{https://ctan.org/pkg/ragged2e})      \\
-        \PackageName{tcolorbox}     & (\url{https://www.ctan.org/pkg/tcolorbox}) \\
+        % \PackageName{tcolorbox}     & (\url{https://www.ctan.org/pkg/tcolorbox}) \\
         \PackageName{varwidth}      & (\url{https://www.ctan.org/pkg/varwidth})  \\
         \PackageName{xcolor}        & (\url{https://www.ctan.org/pkg/xcolor})    \\
     \end{tabular}
@@ -275,7 +331,6 @@
 To use the package, simply request its use in the preamble of the document.
 
 \begin{macro*}{usepackage}{\OArg{package options list}}[algxpar]
-
     Currently, the list of package options includes the following.
 
     \begin{option*}{\Argument{language name}}
@@ -307,11 +362,11 @@
     \begin{option*}{\Option{noend}}
         The \OptionInd{noend} suppresses the line that indicates the end of a block, keeping the indentation.
 
-        See more information in \OptionRef{end} and \OptionInd{noend} options.
+        See more information in \OptionRef{end} and \OptionRef{noend} options.
     \end{option*}
 
     \begin{latexcode}
-        % Supresses all end-lines that close a block
+        % Suppresses all end-lines that close a block
         \usepackage[noend]{algxpar}
     \end{latexcode}
 \end{macro*}
@@ -338,7 +393,7 @@
 \end{tcblisting}
 
 \subsection{A preamble on comments}\label{sec:a-preamble-on-comments}
-This is the Euclid's algorithm as provided in the \PackageName{algorithmicx} package documentation\footnote{A label was supressed here.}.
+This is the Euclid's algorithm as provided in the \PackageName{algorithmicx} package documentation\footnote{A label was suppressed here.}.
 
 \begingroup
 %! formatter = off
@@ -383,8 +438,19 @@
 \endgroup
 %! formatter = on
 
-Using the comment before the text always bothered me somewhat, as it seemed more natural to put it after. Thus, as of v0.99, the comment can be placed after the text (as the second parameter of the macro), certainly making writing algorithms more user-friendly. To maintain backward compatibility, the use of comments before text is still supported, although it is discouraged.
+Using the comment before the text always bothered me somewhat, as it seemed more natural to put it after.
+\VCChange{
+    type = new,
+    version = 0.99,
+    description = Optional comments may be specified after the command
+}%
+Thus, as of v0.99, the comment can be placed after the text (as the second parameter of the macro), certainly making writing algorithms more user-friendly. To maintain backward compatibility, the use of comments before text is still supported, although it is discouraged.
 
+\VCChange{
+    type = new,
+    version = 0.99,
+    description = Lines that closes blocks can have comments
+}%
 In addition to this change, the use of comments in the new format has been extended to most pseudocode macros, such as \MacroRef{EndWhile} for example.
 
 %! formatter = off
@@ -398,7 +464,7 @@
                 \State $a\gets b$
                 \State $b\gets r$
                 \State $r\gets a\bmod b$
-            \EndWhile[end loop]  % <-- Comment
+            \EndWhile[end of the loop]  % <-- Comment
             \Statep{\Keyword{return} $b$}[The gcd is b]  % <-- Comment
         \EndProcedure
     \end{algorithmic}
@@ -413,6 +479,11 @@
 See more about comments in \cref{sec:comments}.
 
 \subsection{A preamble on options}\label{sec:a-preamble-on-options}
+\VCChange{
+    type = new,
+    version = 0.99,
+    description = {The ``look and feel'' of the pseudocode can be set in the \Macro{begin}\latexinline{{algorithmic}}}
+}[Preamble options]%
 As of version 0.99, a list of options can be added to each command, changing some algorithm presentation settings. These settings are optional and must be entered using angle brackets at the end of the command.
 
 %! formatter = off
@@ -666,7 +737,12 @@
 The macro \Macro{Id} was created to handle ``program-like'' named identifiers, such as \Id{sum}, \Id{word\_counter} and so on.
 
 \begin{macro}{Id}[\MArg{identifier}]
-    Identifiers are in italics: \latexinline!\Id{value}! is \Id{value}. Its designed to work in both text and math modes: \latexinline!$\Id{offer}_k$! is $\Id{offer}_k$.
+    \VCChange{
+        type = updated,
+        version = 0.91,
+        description = {\Macro{Id} has been recoded to work in both text and math modes, preventing hyphenation},
+    }[\Macro{Id}]
+    Identifiers are emphasised: \latexinline!\Id{value}! is \Id{value}. Its designed to work in both text and math modes: \latexinline!$\Id{offer}_k$! is $\Id{offer}_k$.
 \end{macro}
 
 \subsection{Assignments and I/O}\label{sec:assignments-and-i/o}
@@ -681,23 +757,43 @@
     \end{algorithmic}
 \end{tcblisting}
 
-The macro \Macro{Set} can be used for assignments.
+The \Macro{Set} macro, although obsolete, can be used for assignments.
 
 \begin{macro}{Set}[\MArg{lvalue}\MArg{expression} \Deprecated]
+    \VCChange{
+        type = new,
+        version = 0.91,
+    %! parser = off
+        description = {\Macro{Set} can be used for assignments (deprecated in v0.99)},
+        %! parser = on
+    }[\Macro{Set}]%
     This macro expands to \MacroRef{Id}\latexinline!{#1} \gets #2!.
 
-    As the handling of text and math modes should be done and its usage brings no evident advantage, this macro will no longer be supported. It will be kept as is for backward compatibility however.
+    this macro will no longer be supported. It will be kept as is for backward compatibility however.
+    \VCChange{
+        type = deprecated,
+        version = 0.99,
+        description = {\Macro{Set} is deprecated and will no longer be supported},
+    }[\Macro{Set}]%
+    As the handling of text and math modes should be done and its usage brings no evident advantage,
+
+    \VCChange{
+        type = removed,
+        version = 0.99,
+        description = {\Macro{Setl} has been removed from the package},
+    }[\Macro{Setl}]%
+    The macro \MacroRefInd{Setl} has been removed.
 \end{macro}
 
 \subsection{Procedures and Functions}\label{sec:procedures-and-functions}
 Modularization uses \Macro{Procedure} or \Macro{Function}.
 
+%! formatter = off
 \begin{tcblisting}{}
     \begin{algorithmic}
-        \Procedure{SaveNode}{\Id{node}}
-            [saves a B\textsuperscript{+}-tree node to disk]
+        \Procedure{SaveNode}{\Id{node}}[saves a B\textsuperscript{+}-tree node to disk]
             \If{\Id{node}.\Id{is\_modified}}
-                \If{$\Id{node}.\Id{address} == -1$}
+                \If{$\Id{node}.\Id{address} = -1$}
                     \Statep{Set file writting position after file's last byte}[creates a new node on disk]
                 \Else
                     \Statep{Set file writting position to \Id{node}.\Id{address}}[updates the node]
@@ -720,8 +816,8 @@
         \EndFunction
     \end{algorithmic}
 \end{tcblisting}
+%! formatter = on
 
-
 \begin{macro}{Procedure}[\MArg{name}\MArg{argument list}\OArg{comment}\LArg{options}]
     This macro creates a \Keyword{procedure} block that must be ended with \MacroRef{EndProcedure}.
 
@@ -822,17 +918,17 @@
 \end{tcblisting}
 
 \begin{macro}{Description}
-    [~\Argument{description text}]
+[~\Argument{description text}]
     The \Macro{Description} is intended to hold the general description of the pseudocode.
 \end{macro}
 
 \begin{macro}{Require}
-    [~\Argument{pre-conditions}]
+[~\Argument{pre-conditions}]
     The required initial state that the code relies on. These are \textit{pre-conditions}.
 \end{macro}
 
 \begin{macro}{Ensure}
-    [~\Argument{post-conditions}]
+[~\Argument{post-conditions}]
     The final state produced by the code. These are \textit{post-conditions}.
 \end{macro}
 
@@ -845,11 +941,11 @@
 \end{tcblisting}
 
 \begin{macro}{Input}
-    [~\Argument{inputs}]
+[~\Argument{inputs}]
     This works as an alternative to \MacroRef{Require}, presenting \Keyword{input}.
 \end{macro}
 \begin{macro}{Output}
-    [~\Argument{outputs}]
+[~\Argument{outputs}]
     This works as an alternative to \MacroRef{Ensure}, presenting \Keyword{output}.
 \end{macro}
 
@@ -937,9 +1033,77 @@
 %! formatter = on
 
 \subsection{Options}\label{sec:options}
+\VCChange{
+    type = new,
+    version = 0.99,
+    description = {Added support to style the main components of the pseudocode, such as keywords, comments and text and widths}
+}[Options]%
 This section presents the options that can be specified for the algorithms, either using \MacroRef{AlgSet} or the \Argument{options} parameter of the various macros.
 
-\begin{option}{language}{\Argument{language}}[english]
+\begin{option}{indent lines}{\Option{true} | \Option{false}}[true]
+    \VCChange{
+        type = new,
+        version = 0.99.1,
+        description = Added experimental support to show vertical indentantion lines,
+    }[\Option{indent lines}]%
+    With \Option{indent lines} vertical indentation lines are displayed in the pseudocode. This feature only works correctly if the start and end of the block are on the same page and at least two compilation steps are required for the lines to be positioned correctly.
+
+    To change the style for the lines, use \OptionRef{line style}
+
+    \textit{This feature is still experimental and incomplete.}
+\end{option}
+
+%! formatter = off
+\begin{tcblisting}{}
+    \begin{algorithmic}<indent lines>
+        \For{$i \gets 0$ \To $N - 1$}
+            \For{$j \gets$ \To $N - 1$}
+                \If{$m_{ij} < 0$}
+                    \Statep{$m_{ij} \gets 0$}
+                \EndIf
+            \EndFor
+        \EndFor
+    \end{algorithmic}
+
+    \begin{algorithmic}<indent lines, noend>
+        \For{$i \gets 0$ \To $N - 1$}
+            \For{$j \gets$ \To $N - 1$}
+                \If{$m_{ij} < 0$}
+                    \Statep{$m_{ij} \gets 0$}
+                \EndIf
+            \EndFor
+        \EndFor
+    \end{algorithmic}
+\end{tcblisting}
+%! formatter = on
+
+\begin{option}{line style}{\Argument{style}}
+    \VCChange{
+        suppress,
+        version = 0.99.1,
+        description = SUPRESSED???,
+    }[\Option{line style}]%
+    Almost anything Ti\emph{k}Z can apply to a line can be used to set the indentation lines.
+
+    To show indentation lines in algorithms, \OptionRef{indent lines} must be set to true.
+\end{option}
+
+%! formatter = off
+\begin{tcblisting}{}
+    \begin{algorithmic}<indent lines, line style = {orange, dotted, -latex, ultra thick}>
+        \For{$i \gets 0$ \To $N - 1$}
+            \For{$j \gets$ \To $N - 1$}
+                \If{$m_{ij} < 0$}
+                    \Statep{$m_{ij} \gets 0$}
+                \EndIf
+            \EndFor
+        \EndFor
+    \end{algorithmic}
+\end{tcblisting}
+%! formatter = on
+
+
+\begin{option}{language}{\Argument{language}}
     This key is used to choose the keyword language set for the current scope. The language keyword set should already have been loaded through the package options (see \cref{sec:package-usage-and-options}).
 \end{option}
 
@@ -950,17 +1114,17 @@
     The result is similar to a program written in Python.
 \end{option}
 
+
 \begin{option}{end}{}
-    This option reverses the behaviour of \OptionRef{end}, and the closing line of a block presented.
+    This option reverses the behaviour of \OptionRef{noend}, and the closing line of a block presented.
 \end{option}
 
+%! formatter = off
 \begin{tcblisting}{}
-    \begin{algorithmic}
-        <noend>
+    \begin{algorithmic}<noend>
         \For{$i \gets 0$ \To $N - 1$}
             \For{$j \gets$ \To $N - 1$}
-                \If{$m_{ij} < 0$}
-                    <end>
+                \If{$m_{ij} < 0$}<end>
                     \Statep{$m_{ij} \gets 0$}
                 \EndIf
             \EndFor
@@ -967,6 +1131,7 @@
         \EndFor
     \end{algorithmic}
 \end{tcblisting}
+%! formatter = on
 
 \begin{option}{keywords}{\Argument{list of keywords assignments}}
     This option allows to change a keyword (or define a new one). See \cref{sec:languages-and-translations} for more information on keywords and translations.
@@ -991,19 +1156,19 @@
 \end{tcblisting}
 %! formatter = on
 
-\begin{option}{algorithmic indent}{\Argument{width}}[1em]
+\begin{option}{algorithmic indent}{\Argument{width}}
     The algorithmic indent is the amount of horizontal space used for indentation inner commands.
 
     This option actually sets the \PackageName{algorithmicx}'s \Macro{algorithmicindent}.
 \end{option}
 
-\begin{option}{comment symbol}{\Argument{symbol}}[\Macro{triangleright}]
+\begin{option}{comment symbol}{\Argument{symbol}}
     The default symbol that preceeds the text in comments is \Macro{triangleright} (\CommentSymbol), as used by \PackageName{algorithmicx}, and can be changed with this key.
 
     The current comment symbol is available with \MacroDef{CommentSymbol}. Do not change this symbol by redefining \Macro{CommentSymbol}, as font, shape and color settings will no longer be respected. Always use \Option{comment symbol}.
 \end{option}
 
-\begin{option}{comment symbol right}{\Argument{symbol}}[\Macro{triangleleft}]
+\begin{option}{comment symbol right}{\Argument{symbol}}
     This is the symbol that closes a \MacroRef{CommentIn}. This symbol is set to \CommentSymbolRight\ and can be retrieved with the \MacroDef{CommentSymbolRight} macro. Do not attempt to change the symbol by redefining \Macro{CommentSymbolRight}, as font, shape and color settings will no longer be respected. Always use \Option{comment symbol right}.
 \end{option}
 
@@ -1012,25 +1177,25 @@
 
 Notice that color are handled separately (see \cref{sec:colors}) and using \Macro{color} with font options will tend to break the document.
 
-\begin{option}{text font}{\Argument{font, shape and size}}[\Empty]
+\begin{option}{text font}{\Argument{font, shape and size}}
     This setting corresponds to the font family, its shape and size and applies to the \Argument{text} field in each of the commands.
 \end{option}
 
-\begin{option}{comment font}{\Argument{font, shape and size}}[\Macro{slshape}]
+\begin{option}{comment font}{\Argument{font, shape and size}}
     This setting corresponds to the font family, its shape and size and applies to all comments.
 \end{option}
 
-\begin{option}{keyword font}{\Argument{font, shape and size}}[\Macro{bfseries}]
+\begin{option}{keyword font}{\Argument{font, shape and size}}
     This setting sets the font family, shape, and size, and applies to all keywords, such as \Keyword{function} or \Keyword{end}.
 \end{option}
 
-\begin{option}{constant font}{\Argument{font, shape and size}}[\Macro{scshape}]
+\begin{option}{constant font}{\Argument{font, shape and size}}
     This setting sets the font family, shape, and size, and applies to all constants, such as \Nil, \True\ and \False.
 
     This setting also applies when \MacroRef{Constant} is used.
 \end{option}
 
-\begin{option}{module font}{\Argument{font, shape and size}}[\Macro{scshape}]
+\begin{option}{module font}{\Argument{font, shape and size}}
     This setting sets the font family, shape, and size, and applies to both procedure and function identifiers, as well as their callings with \MacroRef{Call}.
 \end{option}
 
@@ -1038,31 +1203,32 @@
 Colors are defined using the \PackageName{xcolors} package.
 
 \begin{option}{text color}{\Argument{color}}
-    [.\mbox{\normalfont\normalcolor\normalsize~(dot)}]
     This setting corresponds to the color that applies to the \Argument{text} field in each of the commands.
 \end{option}
 
-\begin{option}{comment color}{\Argument{color}}[.!70]
+\begin{option}{comment color}{\Argument{color}}
     This setting corresponds to the color that applies to all comments.
 \end{option}
 
 \begin{option}{keyword color}{\Argument{color}}
-    [.\mbox{\normalfont\normalcolor\normalsize~(dot)}]
     This key is used to set the color for all keywords.
 \end{option}
 
 \begin{option}{constant color}{\Argument{color}}
-    [.\mbox{\normalfont\normalcolor\normalsize~(dot)}]
     This setting corresponds to the color that applies to the defined constant (see \cref{sec:constants-and-identifiers}) and also when macro \MacroRef{Constant} is used.
 \end{option}
 
 \begin{option}{module color}{\Argument{color}}
-    [.\mbox{\normalfont\normalcolor\normalsize~(dot)}]
     This color is applied to the identifier used in both \MacroRef{Procedure} and \MacroRef{Function} definitions, as well as module calls with \MacroRef{Call}. Notice that the arguments use \Option{text color}.
 \end{option}
 
 \subsubsection{Paragraphs}
 Multi-line support are internally handled by \Macro{parbox}es.
+\VCChange{
+    type = updated,
+    version = 0.99.2,
+    description = {Wrong spacing between parboxes were fixed.}
+}
 
 \medskip
 %! formatter = off
@@ -1084,23 +1250,23 @@
 \medskip
 The options in this section should be used to set how these paragraphs will be presented.
 
-\begin{option}{text style}{\Argument{style}}[\Macro{RaggedRight}]
+\begin{option}{text style}{\Argument{style}}
     This \Argument{style} is applied to the paragraph box that holds the \Argument{text} field in all commands.
 \end{option}
 
-\begin{option}{comment style}{\Argument{style}}[\Macro{RaggedRight}]
+\begin{option}{comment style}{\Argument{style}}
     This \Argument{style} is applied to the paragraph box that holds the \Argument{comment} field in all algorithmic commands. This setting will not be used with \MacroRef{Comment}, \MacroRef{Commentl} or \MacroRef{CommentIn}.
 \end{option}
 
-\begin{option}{comment separator width}{\Argument{width}}[1em]
+\begin{option}{comment separator width}{\Argument{width}}
     The minimum space between the text box and the \Macro{CommentSymbol}. This affects the available space in a line for keywords, text and comment.
 \end{option}
 
-\begin{option}{statement indent}{\Argument{width}}[1em]
+\begin{option}{statement indent}{\Argument{width}}
     This is the \Macro{hangindent} set inside \MacroRef{Statep} statements.
 \end{option}
 
-\begin{option}{comment width}{\Option{auto}|\Option{nice}|\Argument{width}}[auto]
+\begin{option}{comment width}{\Option{auto}|\Option{nice}|\Argument{width}}
     There are two ways to balance the lengths of \Argument{text} and \Argument{comments} on a line, each providing different visual experiences.
 
     In automatic mode (\Option{auto}), the balance is chosen considering the widths that the actual text and comment have, trying to reduce the total number of lines, given there is not enough space in a single line for the keywords, text , comment and comment symbol. The consequence is that each line with a comment will have its own balance.
@@ -1116,6 +1282,11 @@
 \end{comment}
 
 \subsection{Languages and translations}\label{sec:languages-and-translations}
+\VCChange{
+    type = new,
+    version = 0.99,
+    description = {New mechanism to translation with separate files for each language},
+}[Languages]%
 A simple mechanism is employed to allow keywords to be translated into other languages.
 
 %! formatter = off
@@ -1173,11 +1344,17 @@
 
 \begin{tcblisting}{}
     \SetKeyword[german]{if}{wenn} % new
-    Depending on the language, a keyword can take different forms: \Keyword{if} (English), \Keyword[german]{if} (german) or \Keyword[brazilian]{if} (Brazilian Portuguese).
+    Depending on the language, a keyword can take different forms: \Keyword{if} (English), \Keyword[german]{if} (German) or \Keyword[brazilian]{if} (Brazilian Portuguese).
 \end{tcblisting}
 
 \subsection{Other features}
 
+\VCChange{
+    version = 0.99,
+    description = Added support to style named constants and function/procedures identifiers,
+}[Features]%
+These macros were added to support the styles defined for named constants and function and procedure identifiers.
+
 \begin{macro}{Constant}[\OArg{name}]
     This macro presents \Argument{name} using font, shape, size and color defined for constants.
 \end{macro}
@@ -1187,6 +1364,16 @@
 \end{macro}
 
 
+\section{``Forgotten'' features}
+
+\VCChange{
+    type = removed,
+    version = 0.99,
+    description = {Macros \Macro{TextString} and \Macro{VisibleSpace} accidentally removed},
+}
+Some features were forgotten from v0.91 to v.99, although it was not intentional. The macros \Macro{TextString} and \Macro{VisibleSpace} simply vanished into thin air.
+
+
 \section{To do}
 This is a \textit{todo} list:
 \begin{itemize}
@@ -1213,7 +1400,7 @@
     comment width = nice,
     comment style = \raggedleft,
 }
-\input{algxpar-lzw}
+\input{algxpar-lzw.tex}
 \endgroup
 
 \subsection{LZW revisited again}
@@ -1225,6 +1412,7 @@
         text font = \itshape,
         comment font = \footnotesize,
         algorithmic indent = 1.5em,
+        indent lines,
         noend,
     }
 \end{latexcode}
@@ -1235,9 +1423,10 @@
     text font = \itshape,
     comment font = \footnotesize,
     algorithmic indent = 1.5em,
+    indent lines,
     noend,
 }
-\input{algxpar-lzw}
+\input{algxpar-lzw.tex}
 \endgroup
 
 

Deleted: trunk/Master/texmf-dist/doc/latex/algxpar/algxpar-lzw.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/algxpar/algxpar-lzw.tex	2024-10-25 21:29:19 UTC (rev 72656)
+++ trunk/Master/texmf-dist/doc/latex/algxpar/algxpar-lzw.tex	2024-10-25 21:29:33 UTC (rev 72657)
@@ -1,19 +0,0 @@
-\begin{algorithmic}[1]
-    \Description LZW Compression using a table with all known sequences of bytes.
-    \Input A flow of bytes
-    \Output A flow of bits with the compressed representation of the input bytes
-    \Statex
-    \Statep{Initialize a table with all bytes}[each position of the table has a single byte]
-    \Statep{Initilize \Id{sequence} with the first byte in the input flow}
-    \While{there are bytes in the input}[wait until all bytes are processed]
-        \Statep{Get a single byte from input and store it in \Id{byte}}
-        \If{the concatention of \Id{sequence} and \Id{byte} is in the table}
-            \Statep{Set \Id{sequence} to $\Id{sequence} + \Id{byte}$}[concatenate without producing any output]
-        \Else
-            \Statep{Output the code for \Id{sequence}}[i.e., the binary representation of its position in the table]\label{alg:lzw:output}
-            \Statep{Add the concatention of \Id{sequence} and \Id{byte} to the table}[the table learns a longer sequence]\label{alg:lzw:add-to-table}
-            \Statep{Set \Id{sequence} to \Id{byte}}[starts a new sequence with the remaining byte]
-        \EndIf
-    \EndWhile
-    \Statep{Output the code for \Id{sequence}}[the remaining sequence of bits]
-\end{algorithmic}
\ No newline at end of file

Added: trunk/Master/texmf-dist/doc/latex/algxpar/license
===================================================================
--- trunk/Master/texmf-dist/doc/latex/algxpar/license	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/algxpar/license	2024-10-25 21:29:33 UTC (rev 72657)
@@ -0,0 +1,416 @@
+The LaTeX Project Public License
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+LPPL Version 1.3c  2008-05-04
+
+Copyright 1999 2002-2008 LaTeX3 Project
+    Everyone is allowed to distribute verbatim copies of this
+    license document, but modification of it is not allowed.
+
+
+PREAMBLE
+========
+
+The LaTeX Project Public License (LPPL) is the primary license under
+which the LaTeX kernel and the base LaTeX packages are distributed.
+
+You may use this license for any work of which you hold the copyright
+and which you wish to distribute.  This license may be particularly
+suitable if your work is TeX-related (such as a LaTeX package), but 
+it is written in such a way that you can use it even if your work is 
+unrelated to TeX.
+
+The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE',
+below, gives instructions, examples, and recommendations for authors
+who are considering distributing their works under this license.
+
+This license gives conditions under which a work may be distributed
+and modified, as well as conditions under which modified versions of
+that work may be distributed.
+
+We, the LaTeX3 Project, believe that the conditions below give you
+the freedom to make and distribute modified versions of your work
+that conform with whatever technical specifications you wish while
+maintaining the availability, integrity, and reliability of
+that work.  If you do not see how to achieve your goal while
+meeting these conditions, then read the document `cfgguide.tex'
+and `modguide.tex' in the base LaTeX distribution for suggestions.
+
+
+DEFINITIONS
+===========
+
+In this license document the following terms are used:
+
+   `Work'
+    Any work being distributed under this License.
+    
+   `Derived Work'
+    Any work that under any applicable law is derived from the Work.
+
+   `Modification' 
+    Any procedure that produces a Derived Work under any applicable
+    law -- for example, the production of a file containing an
+    original file associated with the Work or a significant portion of
+    such a file, either verbatim or with modifications and/or
+    translated into another language.
+
+   `Modify'
+    To apply any procedure that produces a Derived Work under any
+    applicable law.
+    
+   `Distribution'
+    Making copies of the Work available from one person to another, in
+    whole or in part.  Distribution includes (but is not limited to)
+    making any electronic components of the Work accessible by
+    file transfer protocols such as FTP or HTTP or by shared file
+    systems such as Sun's Network File System (NFS).
+
+   `Compiled Work'
+    A version of the Work that has been processed into a form where it
+    is directly usable on a computer system.  This processing may
+    include using installation facilities provided by the Work,
+    transformations of the Work, copying of components of the Work, or
+    other activities.  Note that modification of any installation
+    facilities provided by the Work constitutes modification of the Work.
+
+   `Current Maintainer'
+    A person or persons nominated as such within the Work.  If there is
+    no such explicit nomination then it is the `Copyright Holder' under
+    any applicable law.
+
+   `Base Interpreter' 
+    A program or process that is normally needed for running or
+    interpreting a part or the whole of the Work.    
+
+    A Base Interpreter may depend on external components but these
+    are not considered part of the Base Interpreter provided that each
+    external component clearly identifies itself whenever it is used
+    interactively.  Unless explicitly specified when applying the
+    license to the Work, the only applicable Base Interpreter is a
+    `LaTeX-Format' or in the case of files belonging to the 
+    `LaTeX-format' a program implementing the `TeX language'.
+
+
+
+CONDITIONS ON DISTRIBUTION AND MODIFICATION
+===========================================
+
+1.  Activities other than distribution and/or modification of the Work
+are not covered by this license; they are outside its scope.  In
+particular, the act of running the Work is not restricted and no
+requirements are made concerning any offers of support for the Work.
+
+2.  You may distribute a complete, unmodified copy of the Work as you
+received it.  Distribution of only part of the Work is considered
+modification of the Work, and no right to distribute such a Derived
+Work may be assumed under the terms of this clause.
+
+3.  You may distribute a Compiled Work that has been generated from a
+complete, unmodified copy of the Work as distributed under Clause 2
+above, as long as that Compiled Work is distributed in such a way that
+the recipients may install the Compiled Work on their system exactly
+as it would have been installed if they generated a Compiled Work
+directly from the Work.
+
+4.  If you are the Current Maintainer of the Work, you may, without
+restriction, modify the Work, thus creating a Derived Work.  You may
+also distribute the Derived Work without restriction, including
+Compiled Works generated from the Derived Work.  Derived Works
+distributed in this manner by the Current Maintainer are considered to
+be updated versions of the Work.
+
+5.  If you are not the Current Maintainer of the Work, you may modify
+your copy of the Work, thus creating a Derived Work based on the Work,
+and compile this Derived Work, thus creating a Compiled Work based on
+the Derived Work.
+
+6.  If you are not the Current Maintainer of the Work, you may
+distribute a Derived Work provided the following conditions are met
+for every component of the Work unless that component clearly states
+in the copyright notice that it is exempt from that condition.  Only
+the Current Maintainer is allowed to add such statements of exemption 
+to a component of the Work. 
+
+  a. If a component of this Derived Work can be a direct replacement
+     for a component of the Work when that component is used with the
+     Base Interpreter, then, wherever this component of the Work
+     identifies itself to the user when used interactively with that
+     Base Interpreter, the replacement component of this Derived Work
+     clearly and unambiguously identifies itself as a modified version
+     of this component to the user when used interactively with that
+     Base Interpreter.
+     
+  b. Every component of the Derived Work contains prominent notices
+     detailing the nature of the changes to that component, or a
+     prominent reference to another file that is distributed as part
+     of the Derived Work and that contains a complete and accurate log
+     of the changes.
+  
+  c. No information in the Derived Work implies that any persons,
+     including (but not limited to) the authors of the original version
+     of the Work, provide any support, including (but not limited to)
+     the reporting and handling of errors, to recipients of the
+     Derived Work unless those persons have stated explicitly that
+     they do provide such support for the Derived Work.
+
+  d. You distribute at least one of the following with the Derived Work:
+
+       1. A complete, unmodified copy of the Work; 
+          if your distribution of a modified component is made by
+          offering access to copy the modified component from a
+          designated place, then offering equivalent access to copy
+          the Work from the same or some similar place meets this
+          condition, even though third parties are not compelled to
+          copy the Work along with the modified component;
+
+       2. Information that is sufficient to obtain a complete,
+          unmodified copy of the Work.
+
+7.  If you are not the Current Maintainer of the Work, you may
+distribute a Compiled Work generated from a Derived Work, as long as
+the Derived Work is distributed to all recipients of the Compiled
+Work, and as long as the conditions of Clause 6, above, are met with
+regard to the Derived Work.
+
+8.  The conditions above are not intended to prohibit, and hence do not
+apply to, the modification, by any method, of any component so that it
+becomes identical to an updated version of that component of the Work as
+it is distributed by the Current Maintainer under Clause 4, above.
+
+9.  Distribution of the Work or any Derived Work in an alternative
+format, where the Work or that Derived Work (in whole or in part) is
+then produced by applying some process to that format, does not relax or
+nullify any sections of this license as they pertain to the results of
+applying that process.
+     
+10. a. A Derived Work may be distributed under a different license
+       provided that license itself honors the conditions listed in
+       Clause 6 above, in regard to the Work, though it does not have
+       to honor the rest of the conditions in this license.
+      
+    b. If a Derived Work is distributed under a different license, that
+       Derived Work must provide sufficient documentation as part of
+       itself to allow each recipient of that Derived Work to honor the 
+       restrictions in Clause 6 above, concerning changes from the Work.
+
+11. This license places no restrictions on works that are unrelated to
+the Work, nor does this license place any restrictions on aggregating
+such works with the Work by any means.
+
+12.  Nothing in this license is intended to, or may be used to, prevent
+complete compliance by all parties with all applicable laws.
+
+
+NO WARRANTY
+===========
+
+There is no warranty for the Work.  Except when otherwise stated in
+writing, the Copyright Holder provides the Work `as is', without
+warranty of any kind, either expressed or implied, including, but not
+limited to, the implied warranties of merchantability and fitness for a
+particular purpose.  The entire risk as to the quality and performance
+of the Work is with you.  Should the Work prove defective, you assume
+the cost of all necessary servicing, repair, or correction.
+
+In no event unless required by applicable law or agreed to in writing
+will The Copyright Holder, or any author named in the components of the
+Work, or any other party who may distribute and/or modify the Work as
+permitted above, be liable to you for damages, including any general,
+special, incidental or consequential damages arising out of any use of
+the Work or out of inability to use the Work (including, but not limited
+to, loss of data, data being rendered inaccurate, or losses sustained by
+anyone as a result of any failure of the Work to operate with any other
+programs), even if the Copyright Holder or said author or said other
+party has been advised of the possibility of such damages.
+
+
+MAINTENANCE OF THE WORK
+=======================
+
+The Work has the status `author-maintained' if the Copyright Holder
+explicitly and prominently states near the primary copyright notice in
+the Work that the Work can only be maintained by the Copyright Holder
+or simply that it is `author-maintained'.
+
+The Work has the status `maintained' if there is a Current Maintainer
+who has indicated in the Work that they are willing to receive error
+reports for the Work (for example, by supplying a valid e-mail
+address). It is not required for the Current Maintainer to acknowledge
+or act upon these error reports.
+
+The Work changes from status `maintained' to `unmaintained' if there
+is no Current Maintainer, or the person stated to be Current
+Maintainer of the work cannot be reached through the indicated means
+of communication for a period of six months, and there are no other
+significant signs of active maintenance.
+
+You can become the Current Maintainer of the Work by agreement with
+any existing Current Maintainer to take over this role.
+
+If the Work is unmaintained, you can become the Current Maintainer of
+the Work through the following steps:
+
+ 1.  Make a reasonable attempt to trace the Current Maintainer (and
+     the Copyright Holder, if the two differ) through the means of
+     an Internet or similar search.
+
+ 2.  If this search is successful, then enquire whether the Work
+     is still maintained.
+
+  a. If it is being maintained, then ask the Current Maintainer
+     to update their communication data within one month.
+     
+  b. If the search is unsuccessful or no action to resume active
+     maintenance is taken by the Current Maintainer, then announce
+     within the pertinent community your intention to take over
+     maintenance.  (If the Work is a LaTeX work, this could be
+     done, for example, by posting to comp.text.tex.)
+
+ 3a. If the Current Maintainer is reachable and agrees to pass
+     maintenance of the Work to you, then this takes effect
+     immediately upon announcement.
+     
+  b. If the Current Maintainer is not reachable and the Copyright
+     Holder agrees that maintenance of the Work be passed to you,
+     then this takes effect immediately upon announcement.  
+    
+ 4.  If you make an `intention announcement' as described in 2b. above
+     and after three months your intention is challenged neither by
+     the Current Maintainer nor by the Copyright Holder nor by other
+     people, then you may arrange for the Work to be changed so as
+     to name you as the (new) Current Maintainer.
+     
+ 5.  If the previously unreachable Current Maintainer becomes
+     reachable once more within three months of a change completed
+     under the terms of 3b) or 4), then that Current Maintainer must
+     become or remain the Current Maintainer upon request provided
+     they then update their communication data within one month.
+
+A change in the Current Maintainer does not, of itself, alter the fact
+that the Work is distributed under the LPPL license.
+
+If you become the Current Maintainer of the Work, you should
+immediately provide, within the Work, a prominent and unambiguous
+statement of your status as Current Maintainer.  You should also
+announce your new status to the same pertinent community as
+in 2b) above.
+
+
+WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE
+======================================================
+
+This section contains important instructions, examples, and
+recommendations for authors who are considering distributing their
+works under this license.  These authors are addressed as `you' in
+this section.
+
+Choosing This License or Another License
+----------------------------------------
+
+If for any part of your work you want or need to use *distribution*
+conditions that differ significantly from those in this license, then
+do not refer to this license anywhere in your work but, instead,
+distribute your work under a different license.  You may use the text
+of this license as a model for your own license, but your license
+should not refer to the LPPL or otherwise give the impression that
+your work is distributed under the LPPL.
+
+The document `modguide.tex' in the base LaTeX distribution explains
+the motivation behind the conditions of this license.  It explains,
+for example, why distributing LaTeX under the GNU General Public
+License (GPL) was considered inappropriate.  Even if your work is
+unrelated to LaTeX, the discussion in `modguide.tex' may still be
+relevant, and authors intending to distribute their works under any
+license are encouraged to read it.
+
+A Recommendation on Modification Without Distribution
+-----------------------------------------------------
+
+It is wise never to modify a component of the Work, even for your own
+personal use, without also meeting the above conditions for
+distributing the modified component.  While you might intend that such
+modifications will never be distributed, often this will happen by
+accident -- you may forget that you have modified that component; or
+it may not occur to you when allowing others to access the modified
+version that you are thus distributing it and violating the conditions
+of this license in ways that could have legal implications and, worse,
+cause problems for the community.  It is therefore usually in your
+best interest to keep your copy of the Work identical with the public
+one.  Many works provide ways to control the behavior of that work
+without altering any of its licensed components.
+
+How to Use This License
+-----------------------
+
+To use this license, place in each of the components of your work both
+an explicit copyright notice including your name and the year the work
+was authored and/or last substantially modified.  Include also a
+statement that the distribution and/or modification of that
+component is constrained by the conditions in this license.
+
+Here is an example of such a notice and statement:
+
+  %% pig.dtx
+  %% Copyright 2005 M. Y. Name
+  %
+  % This work may be distributed and/or modified under the
+  % conditions of the LaTeX Project Public License, either version 1.3
+  % of this license or (at your option) any later version.
+  % The latest version of this license is in
+  %   http://www.latex-project.org/lppl.txt
+  % and version 1.3 or later is part of all distributions of LaTeX
+  % version 2005/12/01 or later.
+  %
+  % This work has the LPPL maintenance status `maintained'.
+  % 
+  % The Current Maintainer of this work is M. Y. Name.
+  %
+  % This work consists of the files pig.dtx and pig.ins
+  % and the derived file pig.sty.
+
+Given such a notice and statement in a file, the conditions
+given in this license document would apply, with the `Work' referring
+to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being
+generated from `pig.dtx' using `pig.ins'), the `Base Interpreter'
+referring to any `LaTeX-Format', and both `Copyright Holder' and
+`Current Maintainer' referring to the person `M. Y. Name'.
+
+If you do not want the Maintenance section of LPPL to apply to your
+Work, change `maintained' above into `author-maintained'.  
+However, we recommend that you use `maintained', as the Maintenance
+section was added in order to ensure that your Work remains useful to
+the community even when you can no longer maintain and support it
+yourself.
+
+Derived Works That Are Not Replacements
+---------------------------------------
+
+Several clauses of the LPPL specify means to provide reliability and
+stability for the user community. They therefore concern themselves
+with the case that a Derived Work is intended to be used as a
+(compatible or incompatible) replacement of the original Work. If
+this is not the case (e.g., if a few lines of code are reused for a
+completely different task), then clauses 6b and 6d shall not apply.
+
+
+Important Recommendations
+-------------------------
+
+ Defining What Constitutes the Work
+
+   The LPPL requires that distributions of the Work contain all the
+   files of the Work.  It is therefore important that you provide a
+   way for the licensee to determine which files constitute the Work.
+   This could, for example, be achieved by explicitly listing all the
+   files of the Work near the copyright notice of each file or by
+   using a line such as:
+
+    % This work consists of all files listed in manifest.txt.
+   
+   in that place.  In the absence of an unequivocal list it might be
+   impossible for the licensee to determine what is considered by you
+   to comprise the Work and, in such a case, the licensee would be
+   entitled to make reasonable conjectures as to which files comprise
+   the Work.
+

Modified: trunk/Master/texmf-dist/tex/latex/algxpar/algxpar-brazilian.kw.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/algxpar/algxpar-brazilian.kw.tex	2024-10-25 21:29:19 UTC (rev 72656)
+++ trunk/Master/texmf-dist/tex/latex/algxpar/algxpar-brazilian.kw.tex	2024-10-25 21:29:33 UTC (rev 72657)
@@ -4,8 +4,8 @@
     description = Descrição,
     input = Entrada,
     output = Saída,
-    require = {Pré-condição},
-    ensure = {Pós-condição},
+    require = {Requer},
+    ensure = {Assegura},
     end = fim,
     if = se,
     then = então,
@@ -30,6 +30,8 @@
     function = função,
     procedure = procedimento,
     return = retorne,
+    byref = ref,
+    byvalue = val,
     true = Verdadeiro,
     false = Falso,
     nil = Nil,

Modified: trunk/Master/texmf-dist/tex/latex/algxpar/algxpar-english.kw.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/algxpar/algxpar-english.kw.tex	2024-10-25 21:29:19 UTC (rev 72656)
+++ trunk/Master/texmf-dist/tex/latex/algxpar/algxpar-english.kw.tex	2024-10-25 21:29:33 UTC (rev 72657)
@@ -30,6 +30,8 @@
     function = function,
     procedure = procedure,
     return = return,
+    byref = byref,
+    byvalue = byvalue,
     true = True,
     false = False,
     nil = Nil,

Added: trunk/Master/texmf-dist/tex/latex/algxpar/algxpar-versionchanges.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/algxpar/algxpar-versionchanges.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/algxpar/algxpar-versionchanges.sty	2024-10-25 21:29:33 UTC (rev 72657)
@@ -0,0 +1,404 @@
+%! Package = versionchanges
+%! Author = Jander Moreira
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{versionchanges}[2024/05/03 v0.1 This package provides means to track changes to a document]
+\NewDocumentCommand{\VCVersion}{}{0.1}
+\NewDocumentCommand{\VCDate}{}{2024/05/03}
+
+\RequirePackage{pgfkeys}
+\RequirePackage{multicol}
+\RequirePackage{ragged2e}
+\RequirePackage{todonotes}
+
+\setlength{\marginparwidth}{2cm}
+\RequirePackage{marginnote}
+\let\marginpar\marginnote
+
+%% Options
+\pgfkeys{
+    /version changes/.cd,
+    version prefix/.store in = \vc at VersionPrefix,
+    version style/.store in = \vc at VersionStyle,
+    change style/.store in = \vc at ChangeStyle,
+}
+
+\NewDocumentCommand{\VCSet}{ > { \TrimSpaces } m }{%
+    \pgfkeys{
+        /version changes/.cd,
+        #1,
+    }%
+}
+
+\VCSet{
+    version prefix = {v},
+    version style = \bfseries\footnotesize,
+    change style = \footnotesize\RaggedRight,
+}
+
+% defaults
+
+
+%% Internal commands
+\ExplSyntaxOn
+
+% StepChangeCounter: proceeds to a new change
+\int_zero_new:N \g_vc_change_counter_int
+\NewDocumentCommand{\vc at StepChangeCounter}{}{
+    \int_gadd:Nn \g_vc_change_counter_int { 1 }
+}
+\NewDocumentCommand{\vc at CurrentChangeCounter}{}{
+    \int_use:N \g_vc_change_counter_int
+}
+
+% SetChangeAttribute: sets the an attribute of the current change record
+% #1: attribute
+% #2: value
+\cs_new:Npn \set_change_attribute:nn #1#2 {
+    \tl_clear_new:c { g_vc_change_ \int_use:N \g_vc_change_counter_int _#1_tl }
+    \tl_gset:cn { g_vc_change_ \int_use:N \g_vc_change_counter_int _#1_tl } { #2 }
+}
+\NewDocumentCommand{\vc at SetChangeAttribute}{ m m }{
+    \set_change_attribute:nn { #1 } { #2 }
+}
+
+% SetChangeAttributeExpanded: sets the an attribute of the current change record
+% #1: attribute
+% #2: value
+\NewDocumentCommand{\vc at SetChangeAttributeExpanded}{ m m }{
+    \exp_args:Nnf \set_change_attribute:nn { #1 } { #2 }
+}
+
+% GetChangeInfo: returns the field of a change
+% #1: number of the change
+% #2: field
+% #3: (optional) sets macro instead of returning value
+\NewDocumentCommand{\vc at GetChangeInfo}{ m m o }{
+    \IfValueTF{#3}{
+        \tl_set:Nx #3 { \tl_use:c { g_vc_change_#1_#2_tl } }
+    }{
+        \tl_use:c { g_vc_change_#1_#2_tl }
+    }
+}
+
+% SetMacroChangeInfo: sets a macro with the field of a change
+% #1: macro
+% #2: number of the change
+% #3: field
+\NewDocumentCommand{\vc at SetMacroChangeInfo}{ m m m }{
+    \tl_clear_new:N #1
+    \exp_args:NNc \tl_set:NV #1 { g_vc_change_#2_#3_tl }
+}
+
+% RunChangesList: apply a macro to each change of a version
+% #1: version
+% #2: macro with a single mandatory argument
+\NewDocumentCommand{\vc at RunChangesList}{ m m }{
+    \seq_map_inline:cn { g_version_#1_seq } { #2 { ##1 } }
+}
+
+
+% RegisterVersion: add a version to the list os versions if it doesn't exist
+% #1: version
+\seq_new:N \g_vc_versions_list_seq
+\cs_new:Npn \register_version:nn #1#2 {
+    \seq_if_in:NnTF \g_vc_versions_list_seq { #1 } { } {% else
+        \seq_put_right:Nn \g_vc_versions_list_seq { #1 }
+        \tl_clear_new:c { g_vc_version_#1_date_tl }
+        \tl_gset:cn { g_vc_version_#1_date_tl } { #2 }
+        \seq_new:c { g_version_#1_seq }
+    }
+}
+\NewDocumentCommand{\VCRegisterVersion}{ m m }{
+    \register_version:nn { #1 } { #2 }
+}
+
+% VersionDate: returns the date of a version OR sets a macro
+%   with its (expanded) value
+% #1: version
+% #2: (optional) macro to store the value
+\NewDocumentCommand{\vc at VersionDate}{ m o }{
+    \IfValueTF{#2}{
+        \tl_set:Nx #2 { \tl_use:c { g_vc_version_#1_date_tl } }
+    }{
+        \tl_use:c { g_vc_version_#1_date_tl }
+    }
+}
+
+
+% AddChangeToVersion: add a change reference to the list of the version
+% (a new list will be created if necessary)
+% #1: version
+\cs_new:Npn \add_change_to_version:n #1  {
+    % Add a reference (change number) to the list
+    % \tl_clear_new:N \l_change_number_tl
+    % \exp_args:NNe \tl_set:Nn \l_change_number_tl { \int_use:N \g_vc_change_counter_int }
+    \exp_args:Nco \seq_gput_right:Nn { g_version_#1_seq } { \int_use:N \g_vc_change_counter_int }
+}
+\NewDocumentCommand{\vc at AddChangeToVersion}{ }{
+    \add_change_to_version:n {
+        \tl_use:c { g_vc_change_ \int_use:N \g_vc_change_counter_int _version_tl }
+    }
+}
+
+
+% RunVersionList: apply a macro to each version of the list
+% #1: macro with a single mandatory argument
+\NewDocumentCommand{\vc at RunVersionList}{ m }{
+    \seq_map_inline:Nn \g_vc_versions_list_seq { #1 { ##1 } }
+}
+
+\ExplSyntaxOff
+
+%%
+
+\newif\ifvc at SuppressInListing\vc at SuppressInListingfalse
+\pgfkeys{
+    /version changes/changes/.cd,
+    version/.code = {\vc at SetChangeAttribute{version}{#1}},
+% date/.code = {\vc at SetChangeAttribute{date}{#1}},
+    description/.code = {\vc at SetChangeAttribute{description}{#1}},
+    page/.code = {\vc at SetChangeAttributeExpanded{page}{#1}},
+    suppress/.is if = vc at SuppressInListing,
+    type/.is choice,
+    type/released/.code = {\vc at SetChangeAttribute{type}{Released}},
+    type/new/.code = {\vc at SetChangeAttribute{type}{New in}},
+    type/updated/.code = {\vc at SetChangeAttribute{type}{Updated in}},
+    type/removed/.code = {\vc at SetChangeAttribute{type}{Removed in}},
+    type/deprecated/.code = {\vc at SetChangeAttribute{type}{Deprecated in}},
+    .unknown/.code = {\pgfkeysalso{type = \pgfkeyscurrentname}},
+}
+
+% #1: (optional) todonotes options
+% #2: text
+\NewDocumentCommand{\vc at MarginNote}{ O{} > { \TrimSpaces } m }{%
+    \todo[bordercolor = blue!20, backgroundcolor = blue!10,
+        linecolor = blue!20, tickmarkheight = 0.2ex, size = \tiny,
+        noline, #1]{%
+        #2
+    }%
+}
+
+% Change: records a change
+% #1: (optional) todonotes options
+% #2: comma-separated list with change description
+\NewDocumentCommand{\VCChange}{ O{} > { \TrimSpaces } m o }{%
+    \vc at StepChangeCounter%
+    \pgfkeys{
+        /version changes/changes/.cd,
+        suppress = false,
+        type = new,
+        page = \thepage,
+        #2,
+    }%
+    \hspace{0pt}%
+    \vc at AddChangeToVersion%
+    %! formatter = off
+    \ifvc at SuppressInListing%  starred VCPrintChange?
+        \vc at SetChangeAttribute{star}{*}%
+    \else
+        \vc at SetChangeAttribute{star}{}%
+    \fi%
+    %! formatter = on
+    \vc at SetChangeAttributeExpanded{label}{\vc at CurrentChangeCounter}%
+    \vc at GetChangeInfo{\vc at CurrentChangeCounter}{label}[\vc at InfoResult]%
+    \expandafter\label\expandafter{\vc at InfoResult:change}%
+    \vc at MarginNote[#1]{%
+        \IfValueT{#3}{\textbf{#3}:\\}%
+        \vc at GetChangeInfo{\vc at CurrentChangeCounter}{type}
+        \vc at VersionPrefix\vc at GetChangeInfo{\vc at CurrentChangeCounter}{version}%
+    }%
+}
+
+%%
+
+% Internal commands
+\ExplSyntaxOn
+
+% Reading from file
+\ior_new:N \g_vc_input_io
+
+% LoadFile: reads a previous compiled version changes
+\cs_new:Nn \load_file: {
+    \tl_clear_new:N \g_vc_file_contents_tl
+    \ior_open:NnTF \g_vc_input_io { \jobname.vcind } {
+        \ior_map_inline:Nn \g_vc_input_io {
+            \tl_gput_right:Nn \g_vc_file_contents_tl { ##1 }
+        }
+    }{}
+}
+\NewDocumentCommand{\vc at LoadChanges}{}{
+    \load_file:
+}
+\NewDocumentCommand{\vc at FileContentsNotEmpty}{ +m }{
+    \tl_if_empty:NTF \g_vc_file_contents_tl {} {
+        #1
+    }
+}
+
+% File contents
+\NewDocumentCommand{\vc at FileContents}{}{
+    \tl_use:N \g_vc_file_contents_tl
+}
+
+% Writing to file
+\iow_new:N \g_vc_output_io
+\tl_new:N \g_vc_output_buffer_tl
+
+% OpenFile: open file for writing
+\NewDocumentCommand{\vc at OpenFile}{ }{
+    \iow_open:Nn \g_vc_output_io { \jobname.vcind }
+}
+
+% CloseFile: close file
+\NewDocumentCommand{\vc at CloseFile}{ }{
+    \iow_close:N \g_vc_output_io
+}
+
+% WriteBuffer: write to file
+\cs_generate_variant:Nn \iow_now:Nn { NV }
+\NewDocumentCommand{\vc at WriteBuffer}{ }{
+    \iow_now:NV \g_vc_output_io \g_vc_output_buffer_tl
+    \tl_clear:N \g_vc_output_buffer_tl
+}
+
+\NewDocumentCommand{\vc at AddToBuffer}{ +m }{
+    \tl_gput_right:Nn \g_vc_output_buffer_tl { #1 }
+}
+
+\cs_generate_variant:Nn \tl_gput_right:Nn { Nx }
+\NewDocumentCommand{\vc at AddCharToBuffer}{ m }{
+    \tl_gput_right:Nx \g_vc_output_buffer_tl { \iow_char:N #1 }
+}
+\ExplSyntaxOff
+
+% WriteVersionChange: write to file a single change
+% #1: change number
+\NewDocumentCommand{\vc at WriteVersionChange}{ m }{%
+    \vc at AddToBuffer{ \VCPrintChange}%
+    \vc at SetMacroChangeInfo{\vc at InfoResult}{#1}{star}%
+    \expandafter\vc at AddToBuffer\expandafter{\vc at InfoResult}%
+    % version number
+    \vc at AddCharToBuffer{\{}%
+    \vc at SetMacroChangeInfo{\vc at InfoResult}{#1}{description}%
+    \expandafter\vc at AddToBuffer\expandafter{\vc at InfoResult}%
+    \vc at AddCharToBuffer{\}}%
+    % date
+    \vc at AddCharToBuffer{\{}%
+    \vc at SetMacroChangeInfo{\vc at InfoResult}{#1}{page}%
+    \expandafter\vc at AddToBuffer\expandafter{\vc at InfoResult}%
+    \vc at AddCharToBuffer{\}}%
+    % label
+    \vc at AddCharToBuffer{\{}%
+    \vc at SetMacroChangeInfo{\vc at InfoResult}{#1}{label}%
+    \expandafter\vc at AddToBuffer\expandafter{\vc at InfoResult}%
+    \vc at AddCharToBuffer{\}}%
+    \vc at WriteBuffer
+}
+
+\NewDocumentCommand{\vc at WriteVersion}{ m }{%
+%! parser = off
+    \vc at AddToBuffer{\begin{vcversionitem}}%
+    %! parser = on
+    \vc at AddCharToBuffer{\{}%
+    \vc at AddToBuffer{#1}%
+    \vc at AddCharToBuffer{\}}%
+    \vc at AddCharToBuffer{\{}%
+    \vc at VersionDate{#1}[\vc at InfoResult]%
+    \expandafter\vc at AddToBuffer\expandafter{\vc at InfoResult}%
+    \vc at AddCharToBuffer{\}}%
+    \vc at WriteBuffer
+    \vc at RunChangesList{#1}{\vc at WriteVersionChange}%
+%! parser = off
+    \vc at AddToBuffer{\end{vcversionitem}}%
+    %! parser = on
+    \vc at WriteBuffer
+}
+
+\NewDocumentCommand{\vc at SaveChanges}{}{%
+    \vc at OpenFile%
+    \vc at RunVersionList{\vc at WriteVersion}%
+    \vc at WriteBuffer
+    \vc at CloseFile%
+}
+
+\NewDocumentCommand{\VCPrintChanges}{ O{} }{%
+    \vc at FileContentsNotEmpty{
+        \VCSet{#1}
+        \section*{Change History}
+        \begin{multicols}{2}
+            \vc at FileContents%
+        \end{multicols}
+    }
+}
+
+%% Printing the list of changes
+\NewDocumentEnvironment{vcversionitem}{ m m }{%
+    \par\noindent%
+    {\vc at VersionStyle\vc at VersionPrefix#1 (#2)}
+    \vspace*{0.2em}\par%
+    \begingroup%
+    \setlength{\tabcolsep}{0pt}%
+    \vc at ChangeStyle%
+    }{%
+    \endgroup%
+    \vspace{0.5em}%
+}
+
+\newlength{\vc at PageNumberWidth}
+\setlength{\vc at PageNumberWidth}{1cm}
+\NewDocumentCommand{\VCPrintChange}{ s m m m }{%
+    \IfBooleanF{#1}{%
+        \hspace{0.25cm}%
+        \parbox[b]{\dimexpr \linewidth - \vc at PageNumberWidth - 0.25cm}{%
+            \setlength{\hangindent}{0.7cm}#2\dotfill%
+        }\hspace{-0.05cm}\dotfill~\hspace{0.05cm}\hyperref[#4:change]{#3}%
+        \par\vspace{0.5em}
+    }
+}
+
+%% Version numbering
+\ExplSyntaxOn
+
+\tl_new:N \g_vc_prefix_text_tl
+\tl_new:N \g_vc_number_tl % todo: turn to int?
+\tl_new:N \g_vc_suffix_text_tl
+\regex_new:N \g_versioning_regex
+\regex_set:Nn \g_versioning_regex { [^\.]+ }
+\regex_new:N \g_subversioning_regex
+\regex_set:Nn \g_subversioning_regex { ([^\d]*)(\d+)(.*) }
+
+\cs_new:Npn \subversioning_check:n #1 {
+    \seq_clear_new:N \l_subparts_seq
+    \regex_extract_all:NnNTF \g_subversioning_regex { #1 } \l_subparts_seq {
+        \tl_gset:Nx \g_vc_prefix_text_tl { \seq_item:Nn \l_subparts_seq {2} }
+        \tl_gset:Nx \g_vc_number_tl { \seq_item:Nn \l_subparts_seq {3} }
+        \tl_gset:Nx \g_vc_suffix_text_tl { \seq_item:Nn \l_subparts_seq {4} }
+    }{
+        \tl_gset:Nx \g_vc_prefix_text_tl { #1 }
+        \tl_gclear:N \g_vc_number_tl
+        \tl_gclear:N \g_vc_suffix_text_tl
+    }
+}
+\cs_new:Npn \versioning_check:n #1 {
+    \seq_clear_new:N \l_parts_seq
+    \regex_extract_all:NnN \g_versioning_regex { #1 } \l_parts_seq
+    \seq_map_inline:Nn \l_parts_seq {
+        \subversioning_check:n { ##1 }
+        <<(\tl_use:N \g_vc_prefix_text_tl)
+        (\tl_use:N \g_vc_number_tl)
+        (\tl_use:N \g_vc_suffix_text_tl)>>
+    }
+}
+\NewDocumentCommand{\VCVersioningCheck}{ m }{
+    \par\noindent[\texttt{#1}:~\versioning_check:n { #1 }]\bigskip\par
+}
+
+\ExplSyntaxOff
+
+% Hooks
+\AtBeginDocument{%
+    \reversemarginpar%
+    \vc at LoadChanges%
+}
+\AtEndDocument{\vc at SaveChanges}
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/tex/latex/algxpar/algxpar-versionchanges.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/algxpar/algxpar.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/algxpar/algxpar.sty	2024-10-25 21:29:19 UTC (rev 72656)
+++ trunk/Master/texmf-dist/tex/latex/algxpar/algxpar.sty	2024-10-25 21:29:33 UTC (rev 72657)
@@ -2,12 +2,14 @@
 %! Author: Jander Moreira
 %! Email =  moreira.jander at gmail.com
 
+%! suppress = FileNotFound
+
 \NeedsTeXFormat{LaTeX2e}[2005/12/01]
-\ProvidesPackage{algxpar}[2023/06/26 v0.99 Algorithms with multi-line/paragraph support and some enhancements]
+\ProvidesPackage{algxpar}[2024/10/23 v0.99.2 Algorithms with multi-line/paragraph support and some enhancements]
 
 %% Documentation
-\NewDocumentCommand{\AlgVersion}{}{0.99}
-\NewDocumentCommand{\AlgDate}{}{2023/06/26}
+\NewDocumentCommand{\AlgVersion}{}{0.99.2}
+\NewDocumentCommand{\AlgDate}{}{2024/10/23}
 
 
 %% Required packages
@@ -20,7 +22,10 @@
 \RequirePackage{amssymb}
 \RequirePackage{pgfmath}
 \RequirePackage{varwidth}
-\RequirePackage{ifthen}
+% \RequirePackage{ifthen}
+\RequirePackage{tikz}
+\usetikzlibrary{calc, arrows}
+\RequirePackage{etoolbox}
 % \RequirePackage{listings} % to load verbatim with tabs
 % \RequirePackage{tcolorbox} % to save verbatim
 
@@ -90,17 +95,26 @@
 }
 
 
-% RenewFullyExpandedDocumentCommand: fully expands argument before
+% axp at RenewFullyExpandedDocumentCommand: fully expands argument before
 %   renewing document command
 % #1: macro
 % #2: value
-\NewDocumentCommand{\RenewFullyExpandedDocumentCommand} { m m }{
+\NewDocumentCommand{\axp at RenewFullyExpandedDocumentCommand} { m m }{
     \exp_args:NNnV \RenewDocumentCommand #1 { } { #2 }
 }
 
 \ExplSyntaxOff
 
+%% Settings
+\newif\ifaxp at NoEnd\axp at NoEndfalse  % whether line with 'end' is used or not
+\newif\ifaxp at IsStatement\axp at IsStatementfalse  % set in \Statep
+\newif\ifaxp at ShowBoxes\axp at ShowBoxesfalse  % show parboxes for debugging
+\newif\ifaxp at LineBalanceAuto  % true for 'auto'; false for 'fixed'
+\newif\ifaxp at IndentLines\axp at IndentLinesfalse % draw lines in blocks
+
+
 \NewDocumentCommand{\axp at DisableEnds}{}{%
+    \axp at NoEndtrue%
     \RenewDocumentCommand{\ALG at noend}{}{t}%
     \algtext*{EndWhile}%
     \algtext*{EndFor}%
@@ -114,6 +128,7 @@
 }
 
 \NewDocumentCommand{\axp at EnableEnds}{}{%
+    \axp at NoEndfalse%
     \RenewDocumentCommand{\ALG at noend}{}{f}%
     \algrenewtext{EndWhile}{\Keyword{endwhile}}%
     \algrenewtext{EndFor}{\Keyword{endfor}}%
@@ -127,19 +142,12 @@
 }
 \axp at EnableEnds  % update end-line texts
 
-%% Settings
-\newif\ifaxp at NoEnd\axp at NoEndfalse  % whether line with 'end' is used or not
-\newif\ifaxp at IsStatement\axp at IsStatementfalse  % set in \Statep
-\newif\ifaxp at ShowBoxes\axp at ShowBoxesfalse  % show parboxes for debugging
-\newif\ifaxp at LineBalanceAuto  % true for 'auto'; false for 'fixed'
-
 %% General options
-%! formatter = off
 \pgfkeys{
     /algxpar/options/.cd,
-    % language
+% language
     language/.store in = \axp at Language,
-    % styles
+% styles
     text font/.store in = \axp at TextFont,
     text color/.store in = \axp at TextColor,
     text style/.store in = \axp at TextStyle,
@@ -152,24 +160,27 @@
     constant color/.store in = \axp at ConstantColor,
     module font/.store in = \axp at ModuleFont,
     module color/.store in = \axp at ModuleColor,
-    %
+%
     comment symbol/.store in = \axp at CommentSymbol,
     comment symbol right/.store in = \axp at CommentSymbolRight,
     comment separator width/.store in = \axp at CommentSeparatorWidth,
-    %
+%
     noend/.code = {\axp at DisableEnds},
     no end/.code = {\axp at DisableEnds},
     end/.code = {\axp at EnableEnds},
-    %
-    % keywords/.code = {\pgfkeysalso{/algxpar/languages/.cd, \trim at spaces{#1}}},
+%
+% keywords/.code = {\pgfkeysalso{/algxpar/languages/.cd, \trim at spaces{#1}}},
     keywords/.code = {\axp at LanguageSet{#1}},
-    %
+%
     algorithmic indent/.store in = \algorithmicindent,
     statement indent/.store in = \axp at StatementIndent,
     parameter indent/.store in = \axp at ParameterIndent,
-    %
+%
+    indent lines/.is if = axp at IndentLines,
+    line style/.code = {\tikzset{line style/.style = {#1}}},
+%
     show boxes/.is if = axp at ShowBoxes,
-    %
+%
     comment width/.code = {%
         \axp at LineBalanceAutotrue%
         \ifthenelse{\equal{auto}{#1}}{%
@@ -183,8 +194,9 @@
             }%
         }%
     },
+%
+% style/.style = {\pgfkeysalso{/algxpar/styles/#}},
 }
-%! formatter = on
 
 \NewDocumentCommand{\AlgSet}{ > { \TrimSpaces } m }{%
     \pgfkeys{%
@@ -194,6 +206,14 @@
 }
 
 
+% %% Styles
+% \NewDocumentCommand{\AlgStyle}{ > { \TrimSpaces } m > { \TrimSpaces m }{%
+%     \pgfkeys{
+%         /algxpar/style/.cd,
+%         #1/.style = {#2}
+%     }
+% }
+
 %% Languages and translations
 \pgfkeys{
     /algxpar/languages/.cd,
@@ -201,11 +221,11 @@
 }
 
 \NewDocumentCommand{\AlgLanguageSet}{ > { \TrimSpaces } m > { \TrimSpaces } m }{%
-    \AlgSet{language = #1}
+    \AlgSet{language = #1}%
     \pgfkeys{
         /algxpar/languages/.cd,
         #2
-    }
+    }%
 }
 \NewDocumentCommand{\axp at LanguageSet}{ > { \TrimSpaces } m }{%
     \pgfkeys{
@@ -238,6 +258,8 @@
     algorithmic indent = 1.5em,
     statement indent = 1em,
     parameter indent = 0pt,
+    indent lines = false,
+    line style = {lightgray, thick},
     show boxes = false,
     comment width = auto,
 }
@@ -249,9 +271,8 @@
     language/.store in = \axp at Language,
     noend/.is if = axp at NoEnd,
     .unknown/.code = {
-        %! suppress = FileNotFound
+        \axp at RenewFullyExpandedDocumentCommand{\axp at Language}{\pgfkeyscurrentname}
         \input{algxpar-\pgfkeyscurrentname.kw}
-        \RenewFullyExpandedDocumentCommand{\axp at Language}{\pgfkeyscurrentname}
     }
 }
 \pgfkeys{
@@ -295,10 +316,10 @@
 % #3: text after token
 \newlength{\axp at TokenWidth}
 \NewDocumentCommand{\axp at MakeSingleToken}{ m m m }{%
-    \settowidth{\axp at TokenWidth}{#2}%
-    \ifdim\axp at TokenWidth>0pt\relax#1\fi%
+    \axp at SetToWidth{\axp at TokenWidth}{#2}%
+    \ifdimcomp{\axp at TokenWidth}{>}{0pt}{#1}{}%
     #2%
-    \ifdim\axp at TokenWidth>0pt\relax#3\fi%
+    \ifdimcomp{\axp at TokenWidth}{>}{0pt}{#3}{}%
 }
 
 \newif\ifaxp at NoCommentPresent
@@ -305,7 +326,65 @@
 \newlength{\axp at TextWidth}
 \newlength{\axp at CommentWidth}
 
+%%%%%%%% LINES
 
+\NewDocumentCommand{\axp at MarkLineBegin}{}{%
+    \ifbool{axp at IndentLines}{%
+        \stepcounter{axp at BlockLevelCounter}%
+        \tikz[remember picture] \coordinate (axp-block-start-\theaxp at BlockLevelCounter) (0, 0);%
+    % \tikz[remember picture, overlay] \draw[<-] (axp-block-start-\theaxp at BlockLevelCounter) -- ++ (-4em, 0.5ex) node[anchor = east] {B:\theaxp at BlockLevelCounter};%
+    }{}%
+}%
+
+\NewDocumentCommand{\axp at MarkLineEndShort}{}{%
+    \ifbool{axp at IndentLines}{%
+        \tikz[remember picture] \coordinate (axp-block-end-\theaxp at BlockLevelCounter) (0, 0);%
+        \begin{tikzpicture}[remember picture, overlay]
+            \draw[line style]
+            ($ (axp-block-start-\theaxp at BlockLevelCounter) + (0.3ex, -1ex) $)
+            --
+            ($ (axp-block-end-\theaxp at BlockLevelCounter) +  (0.3ex, 1em) $);
+        \end{tikzpicture}%
+        \addtocounter{axp at BlockLevelCounter}{-1}%
+    }%
+}
+
+\NewDocumentCommand{\axp at MarkLineEndCont}{}{%
+    \ifbool{axp at IndentLines}{%
+        \tikz[remember picture] \coordinate (axp-block-end-\theaxp at BlockLevelCounter) (0, 0);%
+        \begin{tikzpicture}[remember picture, overlay]
+            \draw[line style]
+            ($ (axp-block-start-\theaxp at BlockLevelCounter) + (0.3ex, -1ex) $)
+            --
+            ($ (axp-block-end-\theaxp at BlockLevelCounter) +  (0.3ex, 1em) $);
+        \end{tikzpicture}%
+        \addtocounter{axp at BlockLevelCounter}{-1}%
+    }%
+}
+
+\NewDocumentCommand{\axp at MarkLineEndFinal}{}{%
+    \ifbool{axp at IndentLines}{%
+        \tikz[remember picture] \coordinate (axp-block-end-\theaxp at BlockLevelCounter) (0, 0);%
+        \begin{tikzpicture}[remember picture, overlay]
+            \draw[line style]
+            ($ (axp-block-start-\theaxp at BlockLevelCounter) + (0.3ex, -1ex) $)
+            --
+            ($ (axp-block-end-\theaxp at BlockLevelCounter)  + (0.3ex, 0) $)
+            |- ++ (1ex, 0);
+        \end{tikzpicture}%
+        \addtocounter{axp at BlockLevelCounter}{-1}%
+    }%
+}
+
+% % ***********************************************
+% % For debugging!
+\NewDocumentCommand{\msg}{ m O{-1} }{%
+    \begin{tikzpicture}[overlay]
+        \draw[black!30] (0, 0.1) -- (#2, 0.3) node[fill=black!5, anchor=east] {\scriptsize\color{darkgray}#1};
+    \end{tikzpicture}%
+}
+
+
 % axp at CalculateDimensions: evaluate space needed for text and comments
 % #1: nesting ajustment (1 when openning a block; 0 when closing)
 % #2: text
@@ -319,50 +398,62 @@
 \newlength{\axp at CurrentLineWidth}
 \newlength{\axp at RemainingWidth}
 \NewDocumentCommand{\axp at CalculateDimensions}{ m m m }{%
+    \booltrue{axp at NoCommentPresent}%
     \axp at SetToWidth{\axp at FullTextWidth}{\axp at TextFont#2}% text
     \axp at SetToWidth{\axp at FullCommentWidth}{\axp at CommentFont#3}% comment
-    %! formatter = off
-    \ifdim\axp at FullCommentWidth=0pt\relax%
-        % No comments present
-        \axp at NoCommentPresenttrue%
+    \ifdimcomp{\axp at FullCommentWidth}{=}{0pt}{%
+    % No comments present
+    % \msg{no comment!}%
+        \global\booltrue{axp at NoCommentPresent}%
+        % \ifbool{axp at LineBalanceAuto}{%
         \setlength{\axp at TextWidth}{
             \dimexpr \linewidth - \axp at CurrentTokenWidth - (\algorithmicindent)*(\theALG at nested - #1)
         }%
-    \else
-        % Yep, we have a comment
-        \axp at NoCommentPresentfalse%
-        \settowidth{\axp at CommentSymbolWidth}{\hspace{\axp at CommentSeparatorWidth}\CommentSymbol~}%
-        \setlength{\axp at CurrentLineWidth}{
-            \dimexpr \linewidth - \axp at CurrentTokenWidth - (\algorithmicindent)*(\theALG at nested - #1)
+        \ifdimcomp{\axp at FullTextWidth}{<}{\axp at TextWidth}{%
+            \axp at TextWidth\axp at FullTextWidth%  makes the parbox fit the actual text width
+        }{}%
+    % }{}
+    }{%
+    % Yep, we have a comment in this line
+    % \msg{got a comment!}%
+        \global\boolfalse{axp at NoCommentPresent}%
+        \axp at SetToWidth{\axp at CommentSymbolWidth}{\hspace{\axp at CommentSeparatorWidth}\CommentSymbol~}%
+        \deflength{\axp at CurrentLineWidth}{
+            \linewidth - \axp at CurrentTokenWidth - (\algorithmicindent)*(\theALG at nested - #1)
         }%
-        \ifaxp at LineBalanceAuto%
-            % 'auto': decide here how to balance text and comment widths
+        \ifbool{axp at LineBalanceAuto}{%
+        % 'auto': decide here how to balance text and comment widths
             \setlength{\axp at RemainingWidth}{
                 \dimexpr \axp at CurrentLineWidth - \axp at FullTextWidth - \axp at FullCommentWidth - \axp at CommentSymbolWidth
             }%
-            \ifdim\axp at RemainingWidth>0pt\relax%
-                % Both text and comment fit the line
+            \null%  I don't understand the difference this null makes here!
+            % \msg{\the\axp at RemainingWidth}%
+            \ifdimcomp{\axp at RemainingWidth}{>}{0pt}{%
+            % Both text and comment fit the line
                 \axp at TextWidth\axp at FullTextWidth%
                 \axp at CommentWidth\axp at FullCommentWidth%
-            \else%
-                % Text/comment will go multi-line
+            % \msg{fits \the\axp at RemainingWidth}%
+            }{%
+            % Text/comment will go multi-line
+            % \msg{not fit \the\axp at RemainingWidth}%
                 \pgfmathsetmacro{\axp at CurrentRatio}{
                     int(round(\axp at FullTextWidth/(\axp at FullTextWidth + \axp at FullCommentWidth) * 100))
                 }%
-                \ifnum\axp at CurrentRatio<25\relax%  never less than 0.25
+                \ifnumcomp{\axp at CurrentRatio}{<}{25}{%  never less than 0.25
                     \edef\axp at CurrentRatio{25}%
-                \fi%
-                \ifnum\axp at CurrentRatio>75\relax%  never more than 0.75
-                    \edef\axp at CurrentRatio{75}%
-                \fi%
+                }{%
+                    \ifnumcomp{\axp at CurrentRatio}{>}{75}{%  never more than 0.75
+                        \edef\axp at CurrentRatio{75}%
+                    }{}%
+                }%
                 \pgfmathparse{
-                    \axp at CurrentRatio/100 * \axp at CurrentLineWidth - \axp at CommentSymbolWidth/2
+                    (100 - \axp at CurrentRatio)/100 * \axp at CurrentLineWidth - \axp at CommentSymbolWidth
                 }%
+                \setlength{\axp at CommentWidth}{\pgfmathresult pt}%
+                \pgfmathparse{\axp at CurrentLineWidth - \axp at CommentWidth - \axp at CommentSymbolWidth}%
                 \setlength{\axp at TextWidth}{\pgfmathresult pt}%
-                \pgfmathparse{\axp at CurrentLineWidth - \axp at TextWidth - \axp at CommentSymbolWidth}%
-                \setlength{\axp at CommentWidth}{\pgfmathresult pt}%
                 % fine tunning the widths
-                \settowidth{\axp at CommentWidth}{%
+                \axp at SetToWidth{\axp at CommentWidth}{%
                     \begin{varwidth}[t]{\axp at CommentWidth}%
                         \axp at CommentStyle%
                         \textcolor{\axp at CommentColor}{\axp at CommentFont#3}\strut%
@@ -370,44 +461,51 @@
                 }%
                 \pgfmathparse{\axp at CurrentLineWidth - \axp at CommentWidth - \axp at CommentSymbolWidth}%
                 \setlength{\axp at TextWidth}{\pgfmathresult pt}%
-            \fi%
-        \else%
-            % 'fixed': limit comment width
-            % todo: think about using \axp at CurrentLineWidth instead of \linewidth
+                % \msg{\the\axp at TextWidth}%
+            }%
+        }{%
+        % 'fixed': limit comment width
+        % todo: think about using \axp at CurrentLineWidth instead of \linewidth
             \setlength{\axp at CommentWidth}{\axp at CommentFixedWidth}%
             \setlength{\axp at TextWidth}{
                 \dimexpr \axp at CurrentLineWidth - \axp at CommentWidth - \axp at CommentSymbolWidth
             }%
-        \fi%
+        }%
         \setlength{\axp at RemainingWidth}{
             \dimexpr \linewidth - \axp at CurrentTokenWidth -
             (\algorithmicindent)*(\theALG at nested - #1) -
             \axp at CommentWidth - \axp at CommentSymbolWidth
         }%
-    \fi%
-    %
-    \ifdim\axp at FullTextWidth<\axp at TextWidth\relax%
-        \axp at TextWidth\axp at FullTextWidth%  makes the parbox fit the actual text width
-    \fi%
-    %! formatter = on
+    }%
 }
 
+\newcounter{cont}
+\newif\ifaxp at CloseBlock
 % axp at MakeCommand: builds the command (see axp at DefineCommand)
 % #1 (star): star = end block; no star = begin block
 \NewDocumentCommand{\axp at MakeCommand}{ s }{%
-    \axp at DoCommand{%  ajustment for opening/closing blocks
-        \IfBooleanTF{#1}{0}{1}%
-    }{%  command or module+name
-        \axp at MakeSingleToken{}{\axp at CommandKeyword}{\ifaxp at IsModule(\else\ \fi}%
-    }{%  text or module arguments
-        \axp at CommandText\ifaxp at IsModule)\fi%
-    }{%  command complement
-        \axp at MakeSingleToken{ }{\axp at CommandComplementKeyword}{}%
-    }{%  comment
-        \axp at CommentText%
-    }{%  options
-        \axp at CommandOptions%
-    }%
+\IfBooleanTF{#1}{%
+    \axp at MarkLineEndShort%
+}{%
+    \ifaxp at CloseBlock%
+    \axp at MarkLineEndCont%
+    \axp at CloseBlockfalse%
+    \fi%
+    \axp at MarkLineBegin%
+}%
+\axp at DoCommand{%  ajustment for opening/closing blocks
+    \IfBooleanTF{#1}{0}{1}%
+}{%  command or module+name
+\axp at MakeSingleToken{}{\axp at CommandKeyword}{\ifaxp at IsModule(\else\ \fi}%
+}{%  text or module arguments
+\axp at CommandText\ifaxp at IsModule)\fi%
+}{%  command complement
+\axp at MakeSingleToken{ }{\axp at CommandComplementKeyword}{}%
+}{%  comment
+\axp at CommentText%
+}{%  options
+\axp at CommandOptions%
+}%
 }
 
 %! formatter = off
@@ -426,7 +524,6 @@
         \usebox{\axp at SaveBox}%
     \fi%
 }
-%! formatter = on
 
 
 % axp at DoCommand: builds the command (see axp at DefineCommand)
@@ -438,16 +535,15 @@
 % #6: options
 \newlength{\axp at CurrentTokenWidth}
 \NewDocumentCommand{\axp at DoCommand}{ m m m m m m }{%
-    \AlgSet{#6}%
-    % Dimensions
-    \settowidth{\axp at CurrentTokenWidth}{#2}%
-    \axp at CalculateDimensions{#1}{{\axp at TextStyle\axp at TextFont#3}#4}{#5}%
-    %
-    % Making the line: body
-    #2%
-    %! formatter = off
+\AlgSet{#6}%
+% Dimensions
+\axp at SetToWidth{\axp at CurrentTokenWidth}{#2}%
+\axp at CalculateDimensions{#1}{{\axp at TextStyle\axp at TextFont#3}#4}{#5}%
+%
+% Making the line: body
+#2%
     \begin{axp at FBox}%
-    \ifaxp at IsModule\hspace{\axp at ParameterIndent}\fi%
+        \ifbool{axp at IsModule}{\hspace{\axp at ParameterIndent}}{}%
         \parbox[t]{\axp at TextWidth}{%
             \ifaxp at IsStatement%
                 \setlength{\hangindent}{\axp at StatementIndent}%
@@ -457,23 +553,22 @@
         }%
     \end{axp at FBox}%
     % Making the line: comment
-    \ifaxp at NoCommentPresent\else%
+    \ifbool{axp at NoCommentPresent}{}{%
         \hspace{\axp at CommentSeparatorWidth}\hfill\CommentSymbol~%
         \begin{axp at FBox}%
-            \ifaxp at LineBalanceAuto
+            \ifbool{axp at LineBalanceAuto}{%
                 \begin{varwidth}[t]{\axp at CommentWidth}%
                     \axp at CommentStyle%
                     \textcolor{\axp at CommentColor}{\axp at CommentFont#5}\strut%
                 \end{varwidth}%
-            \else
+            }{%
                 \parbox[t]{\axp at CommentWidth}{%
                     \axp at CommentStyle%
-                    \textcolor{\axp at CommentColor}{\axp at CommentFont{#5}}\strut%
+                    \textcolor{\axp at CommentColor}{\axp at CommentFont#5}\strut%
                 }%
-            \fi%
+            }%
         \end{axp at FBox}%
-    \fi%
-    %! formatter = on
+    }%
 }
 
 
@@ -485,12 +580,14 @@
 \NewDocumentCommand{\Break}{}{\Keyword{break}}
 \RenewDocumentCommand{\Return}{}{\axp at MakeSingleToken{}{\Keyword{return}}{ }}
 
+\NewDocumentCommand{\ByRef}{}{\Constant{byref}}
+\NewDocumentCommand{\ByValue}{}{\Constant{byvalue}}
 
 \NewDocumentCommand{\True}{}{\Constant{true}}
 \NewDocumentCommand{\False}{}{\Constant{false}}
 \NewDocumentCommand{\Nil}{}{\Constant{nil}}
 
-\newcommand{\Id}[1]{\ensuremath{\textit{\rmfamily#1}}}
+\newcommand{\Id}[1]{\ensuremath{\emph{\rmfamily#1}}}
 % \newcommand{\TextString}[1]{\textrm{\normalfont``{\ttfamily\mbox{#1}}''}}
 % \algnewcommand{\VisibleSpace}{\textrm{\color{black!70}\textvisiblespace}}
 
@@ -503,8 +600,8 @@
 
 % Read, write
 \NewDocumentCommand{\Set}{ m m }{%
-    \PackageWarning{alxpar}{The macro \string\Set\ is no longer supported.}%
-    \Id{#1} \gets #2%
+\PackageWarning{alxpar}{The macro \string\Set\ is no longer supported.}%
+\Id{#1} \gets #2%
 }
 \NewDocumentCommand{\Read}{}{\Keyword{read} }
 \NewDocumentCommand{\Write}{}{\Keyword{write} }
@@ -511,27 +608,31 @@
 
 % %% Comments
 \algnewcommand{\CommentIn}[1]{%
-    \begin{axp at FBox}
-        \textcolor{\axp at CommentColor}{\CommentSymbol~\axp at CommentFont#1~\CommentSymbolRight}%
-    \end{axp at FBox}%
+\begin{axp at FBox}
+\textcolor{\axp at CommentColor}{\CommentSymbol~\axp at CommentFont#1~\CommentSymbolRight}%
+\end{axp at FBox}%
 }
 \NewDocumentCommand{\Commentl}{ m D<>{} }{%
-    \begingroup%
-    \AlgSet{#2}%
-    \textcolor{\axp at CommentColor}{\CommentSymbol~\axp at CommentFont#1\strut}%
-    \endgroup%
+\begingroup%
+\AlgSet{#2}%
+\textcolor{\axp at CommentColor}{\CommentSymbol~\axp at CommentFont#1\strut}%
+\endgroup%
 }
 \RenewDocumentCommand{\Comment}{ m D<>{} }{%
-    \hfill\Commentl{#1}<#2>%
+\hfill\Commentl{#1}<#2>%
 }
 
 \newlength{\axp at CurrentIndent}
 
-\NewDocumentCommand{\axp at BeginGroup}{}{\begingroup}
+\newcounter{axp at BlockCounter}
+\newcounter{axp at BlockLevelCounter}
+\NewDocumentCommand{\axp at BeginGroup}{}{%
+\begingroup%
+}
 \NewDocumentCommand{\axp at EndGroup}{}{%
-    \global\edef\axp at SaveIndent{\the\ALG at tlm}%
-    \endgroup%
-    \setlength{\ALG at tlm}{\axp at SaveIndent}%
+\global\edef\axp at SaveIndent{\the\ALG at tlm}%
+\endgroup%
+\setlength{\ALG at tlm}{\axp at SaveIndent}%
 }
 
 
@@ -541,12 +642,12 @@
 % #3: comments
 % #4: options
 \NewDocumentCommand{\Statep}{ O{} +m O{} D<>{} }{%
-    \axp at IsStatementtrue%
-    \State\axp at DoCommand{1}{}{#2}{}{#1#3}{#4}%
-    \axp at IsStatementfalse%
+\axp at IsStatementtrue%
+\State\axp at DoCommand{1}{}{#2}{}{#1#3}{#4}%
+\axp at IsStatementfalse%
 }
 \RenewDocumentCommand{\Statex}{}{%
-    \item[]\strut%
+\item[]\strut%
 }
 
 
@@ -557,16 +658,17 @@
 % #3: comment
 % #4: options
 \RenewDocumentCommand{\While}{ O{} m O{} D<>{} }{%
-    \axp at BeginGroup
-    \axp at DefineCommand{\Keyword{while}}{#2}{\Keyword{do}}{#1#3}{#4}%
-    \ALG at makeentity{While}%
+\axp at BeginGroup%
+\axp at DefineCommand{\Keyword{while}}{#2}{\Keyword{do}}{#1#3}{#4}%
+\ALG at makeentity{While}%
 }
 % #1: comment
 % #2: options
 \RenewDocumentCommand{\EndWhile}{ O{} D<>{} }{%
-    \axp at DefineCommand{\Keyword{endwhile}}{}{}{#1}{#2}%
-    \ALG at makeentity{EndWhile}%
-    \axp at EndGroup
+\axp at DefineCommand{\Keyword{endwhile}}{}{}{#1}{#2}%
+\ALG at makeentity{EndWhile}%
+\ifaxp at NoEnd\axp at MarkLineEndFinal\fi%
+\axp at EndGroup%
 }
 
 
@@ -575,9 +677,9 @@
 % #1: comments
 % #2: options
 \RenewDocumentCommand{\Repeat}{ O{} D<>{} }{%
-    \axp at BeginGroup
-    \axp at DefineCommand{\Keyword{repeat}}{}{}{#1}{#2}%
-    \ALG at makeentity{Repeat}%
+\axp at BeginGroup%
+\axp at DefineCommand{\Keyword{repeat}}{}{}{#1}{#2}%
+\ALG at makeentity{Repeat}%
 }
 % #1: old style comment
 % #2: text
@@ -584,9 +686,10 @@
 % #3: comment
 % #4: options
 \RenewDocumentCommand{\Until}{ O{} m O{} D<>{} }{%
-    \axp at DefineCommand{\Keyword{until}}{#2}{}{#1#3}{#4}%
-    \ALG at makeentity{Until}%
-    \axp at EndGroup
+\axp at DefineCommand{\Keyword{until}}{#2}{}{#1#3}{#4}%
+\ALG at makeentity{Until}%
+\ifaxp at NoEnd\axp at MarkLineEndFinal\fi%
+\axp at EndGroup%
 }
 
 %% Loop
@@ -594,16 +697,17 @@
 % #1: comment
 % #2: options
 \RenewDocumentCommand{\Loop}{ O{} D<>{} }{%
-    \axp at BeginGroup
-    \axp at DefineCommand{\Keyword{loop}}{}{}{#1}{#2}%
-    \ALG at makeentity{Loop}%
+\axp at BeginGroup%
+\axp at DefineCommand{\Keyword{loop}}{}{}{#1}{#2}%
+\ALG at makeentity{Loop}%
 }
 % #1: comment
 % #2: options
 \RenewDocumentCommand{\EndLoop}{ O{} D<>{} }{%
-    \axp at DefineCommand{\Keyword{endloop}}{}{}{#1}{#2}%
-    \ALG at makeentity{EndLoop}%
-    \axp at EndGroup
+\axp at DefineCommand{\Keyword{endloop}}{}{}{#1}{#2}%
+\ALG at makeentity{EndLoop}%
+\ifaxp at NoEnd\axp at MarkLineEndFinal\fi%
+\axp at EndGroup%
 }
 
 
@@ -618,9 +722,9 @@
 % #3: comment
 % #4: options
 \RenewDocumentCommand{\If}{ O{} m O{} D<>{} }{%
-    \axp at BeginGroup
-    \axp at DefineCommand{\Keyword{if}}{#2}{\Keyword{then}}{#1#3}{#4}%
-    \ALG at makeentity{If}%
+\axp at BeginGroup%
+\axp at DefineCommand{\Keyword{if}}{#2}{\Keyword{then}}{#1#3}{#4}%
+\ALG at makeentity{If}%
 }
 % #1: old style comment
 % #2: text
@@ -627,21 +731,24 @@
 % #3: comment
 % #4: options
 \RenewDocumentCommand{\ElsIf}{ O{} m O{} D<>{} }{%
-    \axp at DefineCommand{\Keyword{else}~\Keyword{if}}{#2}{\Keyword{then}}{#1#3}{#4}%
-    \ALG at makeentity{ElsIf}%
+\axp at DefineCommand{\Keyword{else}~\Keyword{if}}{#2}{\Keyword{then}}{#1#3}{#4}%
+\axp at CloseBlocktrue%
+\ALG at makeentity{ElsIf}%
 }
 % #1: comment
 % #2: options
 \RenewDocumentCommand{\Else}{ O{} D<>{} }{%
-    \axp at DefineCommand{\Keyword{else}}{}{}{#1}{#2}%
-    \ALG at makeentity{Else}%
+\axp at DefineCommand{\Keyword{else}}{}{}{#1}{#2}%
+\axp at CloseBlocktrue%
+\ALG at makeentity{Else}%
 }
 % #1: comment
 % #2: options
 \RenewDocumentCommand{\EndIf}{ O{} D<>{} }{%
-    \axp at DefineCommand{\Keyword{endif}}{}{}{#1}{#2}%
-    \ALG at makeentity{EndIf}%
-    \axp at EndGroup
+\axp at DefineCommand{\Keyword{endif}}{}{}{#1}{#2}%
+\ALG at makeentity{EndIf}%
+\ifaxp at NoEnd\axp at MarkLineEndFinal\fi%
+\axp at EndGroup%
 }
 
 
@@ -656,16 +763,17 @@
 % #3: comment
 % #4: options
 \RenewDocumentCommand{\Switch}{ O{} m O{} D<>{} }{%
-    \axp at BeginGroup
-    \axp at DefineCommand{\Keyword{switch}}{#2}{}{#1#3}{#4}%
-    \ALG at makeentity{Switch}%
+\axp at BeginGroup
+\axp at DefineCommand{\Keyword{switch}}{#2}{}{#1#3}{#4}%
+\ALG at makeentity{Switch}%
 }
 % #1: comment
 % #2: options
 \RenewDocumentCommand{\EndSwitch}{ O{} D<>{} }{%
-    \axp at DefineCommand{\Keyword{endswitch}}{}{}{#1}{#2}%
-    \ALG at makeentity{EndSwitch}%
-    \axp at EndGroup
+\axp at DefineCommand{\Keyword{endswitch}}{}{}{#1}{#2}%
+\ALG at makeentity{EndSwitch}%
+\ifaxp at NoEnd\axp at MarkLineEndFinal\fi%
+\axp at EndGroup
 }
 % #1: old style comment
 % #2: text
@@ -672,30 +780,32 @@
 % #3: comment
 % #4: options
 \RenewDocumentCommand{\Case}{ O{} m O{} D<>{} }{%
-    \axp at BeginGroup
-    \axp at DefineCommand{\Keyword{case}}{#2}{\Keyword{do}}{#1#3}{#4}%
-    \ALG at makeentity{Case}%
+\axp at BeginGroup
+\axp at DefineCommand{\Keyword{case}}{#2}{\Keyword{do}}{#1#3}{#4}%
+\ALG at makeentity{Case}%
 }
 % #1: comment
 % #2: options
 \RenewDocumentCommand{\EndCase}{ O{} D<>{} }{%
-    \axp at DefineCommand{\Keyword{endcase}}{}{}{#1}{#2}%
-    \ALG at makeentity{EndCase}%
-    \axp at EndGroup
+\axp at DefineCommand{\Keyword{endcase}}{}{}{#1}{#2}%
+\ALG at makeentity{EndCase}%
+\ifaxp at NoEnd\axp at MarkLineEndFinal\fi%
+\axp at EndGroup
 }
 % #1: comment
 % #2: options
 \RenewDocumentCommand{\Otherwise}{ O{} D<>{} }{%
-    \axp at BeginGroup
-    \axp at DefineCommand{\Keyword{otherwise}}{}{}{#1}{#2}%
-    \ALG at makeentity{Otherwise}%
+\axp at BeginGroup
+\axp at DefineCommand{\Keyword{otherwise}}{}{}{#1}{#2}%
+\ALG at makeentity{Otherwise}%
 }
 % #1: comment
 % #2: options
 \RenewDocumentCommand{\EndOtherwise}{ O{} D<>{} }{%
-    \axp at DefineCommand{\Keyword{endotherwise}}{}{}{#1}{#2}%
-    \ALG at makeentity{EndOtherwise}%
-    \axp at EndGroup
+\axp at DefineCommand{\Keyword{endotherwise}}{}{}{#1}{#2}%
+\ALG at makeentity{EndOtherwise}%
+\ifaxp at NoEnd\axp at MarkLineEndFinal\fi%
+\axp at EndGroup
 }
 
 
@@ -718,9 +828,9 @@
 % #3: comment
 % #4: options
 \RenewDocumentCommand{\For}{ O{} m O{} D<>{} }{%
-    \axp at BeginGroup
-    \axp at DefineCommand{\Keyword{for}}{#2}{\Keyword{do}}{#1#3}{#4}%
-    \ALG at makeentity{For}%
+\axp at BeginGroup
+\axp at DefineCommand{\Keyword{for}}{#2}{\Keyword{do}}{#1#3}{#4}%
+\ALG at makeentity{For}%
 }
 % #1: old style comment
 % #2: text
@@ -727,9 +837,9 @@
 % #3: comment
 % #4: options
 \RenewDocumentCommand{\ForEach}{ O{} m O{} D<>{} }{%
-    \axp at BeginGroup
-    \axp at DefineCommand{\Keyword{foreach}}{#2}{\Keyword{do}}{#1#3}{#4}%
-    \ALG at makeentity{ForEach}%
+\axp at BeginGroup
+\axp at DefineCommand{\Keyword{foreach}}{#2}{\Keyword{do}}{#1#3}{#4}%
+\ALG at makeentity{ForEach}%
 }
 % #1: old style comment
 % #2: text
@@ -736,16 +846,17 @@
 % #3: comment
 % #4: options
 \RenewDocumentCommand{\ForAll}{ O{} m O{} D<>{} }{%
-    \axp at BeginGroup
-    \axp at DefineCommand{\Keyword{forall}}{#2}{\Keyword{do}}{#1#3}{#4}%
-    \ALG at makeentity{For}%
+\axp at BeginGroup
+\axp at DefineCommand{\Keyword{forall}}{#2}{\Keyword{do}}{#1#3}{#4}%
+\ALG at makeentity{For}%
 }
 % #1: comment
 % #2: options
 \RenewDocumentCommand{\EndFor}{ O{} D<>{} }{%
-    \axp at DefineCommand{\Keyword{endfor}}{}{}{#1}{#2}%
-    \ALG at makeentity{EndFor}%
-    \axp at EndGroup
+\axp at DefineCommand{\Keyword{endfor}}{}{}{#1}{#2}%
+\ALG at makeentity{EndFor}%
+\ifaxp at NoEnd\axp at MarkLineEndFinal\fi%
+\axp at EndGroup
 }
 
 
@@ -758,18 +869,19 @@
 % #4: comment
 % #5: options
 \RenewDocumentCommand{\Procedure}{ O{} m m O{} D<>{} }{%
-    \axp at BeginGroup
-    \axp at IsModuletrue%
-    \axp at DefineCommand{\Keyword{procedure}~\Module{#2}}{#3}{}{#4}{#5}%
-    \ALG at makeentity{Procedure}%
-    \axp at IsModulefalse%
+\axp at BeginGroup
+\axp at IsModuletrue%
+\axp at DefineCommand{\Keyword{procedure}~\Module{#2}}{#3}{}{#1#4}{#5}%
+\ALG at makeentity{Procedure}%
+\axp at IsModulefalse%
 }
 % #1: comment
 % #2: options
 \RenewDocumentCommand{\EndProcedure}{ O{} D<>{} }{%
-    \axp at DefineCommand{\Keyword{endprocedure}}{}{}{#1}{#2}%
-    \ALG at makeentity{EndProcedure}%
-    \axp at EndGroup
+\axp at DefineCommand{\Keyword{endprocedure}}{}{}{#1}{#2}%
+\axp at MarkLineEndFinal%
+\ALG at makeentity{EndProcedure}%
+\axp at EndGroup
 }
 
 \algblockdefx[Function]{Function}{EndFunction}{\axp at MakeCommand}{\axp at MakeCommand*}
@@ -779,25 +891,26 @@
 % #4: comment
 % #5: options
 \RenewDocumentCommand{\Function}{ O{} m m O{} D<>{} }{%
-    \axp at BeginGroup
-    \axp at IsModuletrue%
-    \axp at DefineCommand{\Keyword{function}~\Module{#2}}{#3}{}{#4}{#5}%
-    \ALG at makeentity{Function}%
-    \axp at IsModulefalse%
+\axp at BeginGroup
+\axp at IsModuletrue%
+\axp at DefineCommand{\Keyword{function}~\Module{#2}}{#3}{}{#1#4}{#5}%
+\ALG at makeentity{Function}%
+\axp at IsModulefalse%
 }
 % #1: comment
 % #2: options
 \RenewDocumentCommand{\EndFunction}{ O{} D<>{} }{%
-    \axp at DefineCommand{\Keyword{endfunction}}{}{}{#1}{#2}%
-    \ALG at makeentity{EndFunction}%
-    \axp at EndGroup
+\axp at DefineCommand{\Keyword{endfunction}}{}{}{#1}{#2}%
+\axp at MarkLineEndFinal%
+\ALG at makeentity{EndFunction}%
+\axp at EndGroup
 }
 
 \RenewDocumentCommand{\Call}{ m m D<>{} }{%
-    \begingroup%
-    \AlgSet{#3}%
-    \Module{#1}\textcolor{\axp at TextColor}{\axp at TextFont(#2)}%
-    \endgroup%
+\begingroup%
+\AlgSet{#3}%
+\Module{#1}\textcolor{\axp at TextColor}{\axp at TextFont(#2)}%
+\endgroup%
 }
 
 
@@ -822,13 +935,13 @@
 \NewCommandCopy{\axp at AlgorithmicxAlgorithmic}{\algorithmic}
 \NewCommandCopy{\axp at AlgorithmicxEndAlgorithmic}{\endalgorithmic}
 \RenewDocumentCommand{\algorithmic}{ O{} D<>{} }{%
-    \begingroup%
-    \AlgSet{#2}%
-    \axp at AlgorithmicxAlgorithmic[#1]%
+\begingroup%
+\AlgSet{#2}%
+\axp at AlgorithmicxAlgorithmic[#1]%
 }
 \RenewDocumentCommand{\endalgorithmic}{}{%
-    \axp at AlgorithmicxEndAlgorithmic%
-    \endgroup%
+\axp at AlgorithmicxEndAlgorithmic%
+\endgroup%
 }
 
-\endinput
\ No newline at end of file
+\endinput



More information about the tex-live-commits mailing list.