summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/algxpar/algxpar-doc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/algxpar/algxpar-doc.tex')
-rw-r--r--macros/latex/contrib/algxpar/algxpar-doc.tex299
1 files changed, 244 insertions, 55 deletions
diff --git a/macros/latex/contrib/algxpar/algxpar-doc.tex b/macros/latex/contrib/algxpar/algxpar-doc.tex
index c864162f1e..ca7c9ba0bb 100644
--- a/macros/latex/contrib/algxpar/algxpar-doc.tex
+++ b/macros/latex/contrib/algxpar/algxpar-doc.tex
@@ -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@gmail.com}}
-\date{June 26, 2023}
+\author{Jander Moreira -- \texttt{moreira.jander@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,6 +277,8 @@
% \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,6 +289,24 @@ The consequence of more verbose pseudocode leads, however, to longer sentences t
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 @@ This package depends on the following packages:
\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 @@ This package depends on the following packages:
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 @@ To use the package, simply request its use in the preamble of the document.
\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 @@ An algorithm is composed of instructions and control structures such as conditio
\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 @@ Until \PackageName{algxpar} v0.95, they could be added as an optional parameter
\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 @@ In addition to this change, the use of comments in the new format has been exten
\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 @@ Throughout this documentation, former style comments are denoted as \Argument{co
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 @@ A few macros for well known constants were defined: \MacroDef{True} (\True), \Ma
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 @@ To support teaching-like, basic pseudocode writing, the macros \MacroDef{Read} a
\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,7 +816,7 @@ Modularization uses \Macro{Procedure} or \Macro{Function}.
\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 @@ A series of macros are defined to provide the header documentation for a pseudoc
\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 @@ A series of macros are defined to provide the header documentation for a pseudoc
\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 @@ Sometimes some settings need to be applied exclusively to one command, for examp
%! 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,23 +1114,24 @@ This section presents the options that can be specified for the algorithms, eith
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
\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 @@ This section presents the options that can be specified for the algorithms, eith
\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 @@ The options ins this section allows setting font family, shape, weight and size
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 @@ Notice that color are handled separately (see \cref{sec:colors}) and using \Macr
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 @@ Multi-line support are internally handled by \Macro{parbox}es.
\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 @@ The options in this section should be used to set how these paragraphs will be p
\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 @@ The mechanism behind \MacroRef{AlgLanguageSet} uses the \Macro{SetKeyword} macro
\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 @@ The mechanism behind \MacroRef{AlgLanguageSet} uses the \Macro{SetKeyword} macro
\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 @@ This is a \textit{todo} list:
comment width = nice,
comment style = \raggedleft,
}
-\input{algxpar-lzw}
+\input{algxpar-lzw.tex}
\endgroup
\subsection{LZW revisited again}
@@ -1225,6 +1412,7 @@ This is a \textit{todo} list:
text font = \itshape,
comment font = \footnotesize,
algorithmic indent = 1.5em,
+ indent lines,
noend,
}
\end{latexcode}
@@ -1235,9 +1423,10 @@ This is a \textit{todo} list:
text font = \itshape,
comment font = \footnotesize,
algorithmic indent = 1.5em,
+ indent lines,
noend,
}
-\input{algxpar-lzw}
+\input{algxpar-lzw.tex}
\endgroup