summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-11-09 22:43:36 +0000
committerKarl Berry <karl@freefriends.org>2015-11-09 22:43:36 +0000
commit1f81eb3f2ce28dfe62579f3755abf24c2bafc1d3 (patch)
tree7c810c1641b208b40b3b1b4e93d9cba8e64791d0 /Master/texmf-dist/doc
parent19e28cda517bc572de708cc887988cfd55efff96 (diff)
algorithm2e (9nov15)
git-svn-id: svn://tug.org/texlive/trunk@38805 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r--Master/texmf-dist/doc/latex/algorithm2e/algorithm2e.pdfbin487487 -> 532799 bytes
-rw-r--r--Master/texmf-dist/doc/latex/algorithm2e/algorithm2e.tex513
-rw-r--r--Master/texmf-dist/doc/latex/algorithm2e/algorithm2e_exAlgoDisjdecomp.tex8
-rw-r--r--Master/texmf-dist/doc/latex/algorithm2e/algorithm2e_exgeneric2.tex20
-rw-r--r--Master/texmf-dist/doc/latex/algorithm2e/algorithm2e_exnlsty.tex12
5 files changed, 452 insertions, 101 deletions
diff --git a/Master/texmf-dist/doc/latex/algorithm2e/algorithm2e.pdf b/Master/texmf-dist/doc/latex/algorithm2e/algorithm2e.pdf
index 2b19fceb269..a078f59bda6 100644
--- a/Master/texmf-dist/doc/latex/algorithm2e/algorithm2e.pdf
+++ b/Master/texmf-dist/doc/latex/algorithm2e/algorithm2e.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/algorithm2e/algorithm2e.tex b/Master/texmf-dist/doc/latex/algorithm2e/algorithm2e.tex
index 496cc8f6e36..4d2fc6fe614 100644
--- a/Master/texmf-dist/doc/latex/algorithm2e/algorithm2e.tex
+++ b/Master/texmf-dist/doc/latex/algorithm2e/algorithm2e.tex
@@ -1,12 +1,12 @@
% algorithm2e.tex --- doc of the package file for algorithms
%
% (c) 1995-1997 Christophe Fiorio, Tu-Berlin, Germany
-% (c) 1998-2013 Christophe Fiorio, Montpellier 2 University, France
+% (c) 1998-2015 Christophe Fiorio, Montpellier University, France
%
% Report bugs and comments to:
-% christophe.fiorio@univ-montp2.fr
+% christophe.fiorio@umontpellier.fr
%
-% $Id: algorithm2e.tex,v 5.0 2013/01/06 14:44:54 cfiorio Exp $
+% $Id: algorithm2e.tex,v 5.1 2015/10/18 21:35:18 cfiorio Exp $
%
\documentclass[a4paper]{article}
@@ -59,15 +59,27 @@
\newcommand{\optslide}{\textsf{slide}\index{french@\textsf{slide}|textit}\xspace}
\newcommand{\optalgoe}{\textsf{algo2e}\index{french@\textsf{algo2e}|textit}\xspace}
\newcommand{\optenglish}{\textsf{english}\index{english@\textsf{english}|textit}\xspace}
+\newcommand{\optenglishkw}{\textsf{englishkw}\index{englishkw@\textsf{englishkw}|textit}\xspace}
\newcommand{\optfrench}{\textsf{french}\index{french@\textsf{french}|textit}\xspace}
+\newcommand{\optfrenchkw}{\textsf{frenchkw}\index{frenchkw@\textsf{frenchkw}|textit}\xspace}
\newcommand{\optgerman}{\textsf{german}\index{german@\textsf{german}|textit}\xspace}
+\newcommand{\optgermankw}{\textsf{germankw}\index{germankw@\textsf{germankw}|textit}\xspace}
\newcommand{\optngerman}{\textsf{ngerman}\index{ngerman@\textsf{ngerman}|textit}\xspace}
+\newcommand{\optngermankw}{\textsf{ngermankw}\index{ngermankw@\textsf{ngermankw}|textit}\xspace}
\newcommand{\optspanish}{\textsf{spanish}\index{spanish@\textsf{spanish}|textit}\xspace}
+\newcommand{\optspanishkw}{\textsf{spanishkw}\index{spanishkw@\textsf{spanishkw}|textit}\xspace}
+\newcommand{\optitaliano}{\textsf{italiano}\index{italiano@\textsf{italiano}|textit}\xspace}
+\newcommand{\optitalianokw}{\textsf{italianokw}\index{italianokw@\textsf{italianokw}|textit}\xspace}
\newcommand{\optcroatian}{\textsf{croatian}\index{croatian@\textsf{croatian}|textit}\xspace}
+\newcommand{\optcroatiankw}{\textsf{croatiankw}\index{croatiankw@\textsf{croatiankw}|textit}\xspace}
\newcommand{\optportuguese}{\textsf{portuguese}\index{portuguese@\textsf{portuguese}|textit}\xspace}
+\newcommand{\optportuguesekw}{\textsf{portuguesekw}\index{portuguesekw@\textsf{portuguesekw}|textit}\xspace}
\newcommand{\optczech}{\textsf{czech}\index{czech@\textsf{czech}|textit}\xspace}
-\newcommand{\optitaliano}{\textsf{italiano}\index{italiano@\textsf{italiano}|textit}\xspace}
+\newcommand{\optczechkw}{\textsf{czechkw}\index{czechkw@\textsf{czechkw}|textit}\xspace}
\newcommand{\optslovak}{\textsf{slovak}\index{slovak@\textsf{slovak}|textit}\xspace}
+\newcommand{\optslovakkw}{\textsf{slovakkw}\index{slovakkw@\textsf{slovakkw}|textit}\xspace}
+\newcommand{\optturkish}{\textsf{turkish}\index{turkish@\textsf{turkish}|textit}\xspace}
+\newcommand{\optturkishkw}{\textsf{turkishkw}\index{turkishkw@\textsf{turkishkw}|textit}\xspace}
\newcommand{\optboxed}{\textsf{boxed}\index{boxed@\textsf{boxed}|textit}\xspace}
\newcommand{\optboxruled}{\textsf{boxruled}\index{boxruled@\textsf{boxruled}|textit}\xspace}
\newcommand{\optruled}{\textsf{ruled}\index{ruled@\textsf{ruled}|textit}\xspace}
@@ -104,16 +116,33 @@
\newcommand{\optnokwfunc}{\textsf{nokwfunc}\index{nokwfunc@\textsf{nokwfunc}|textit}\xspace}
\newcommand{\optblockmarkers}{\textsf{displayblockmarkers}\index{displayblockmarkers@\textsf{displayblockmarkers}|textit}\xspace}
%
+\newcommand{\optgroupmarkers}{\textsf{displaygroupmarkers}\index{displaygroupmarkers@\textsf{displaygroupmarkers}|textit}\xspace}
+\newcommand{\optnoalgohanging}{\textsf{noalgohanging}\index{noalgohanging@\textsf{noalgohanging}|textit}\xspace}
+\newcommand{\opthangingcomment}{\textsf{hangingcomment}\index{hangingcomment@\textsf{hangingcomment}|textit}\xspace}
+\newcommand{\opthanginginout}{\textsf{opthanginginout}\index{opthanginginout@\textsf{opthanginginout}|textit}\xspace}
+%
\newcommand{\Optfrench}{\textsf{french}\index{french@\textsf{french}|textbf}\xspace}
+\newcommand{\Optfrenchkw}{\textsf{frenchkw}\index{frenchkw@\textsf{frenchkw}|textbf}\xspace}
\newcommand{\Optenglish}{\textsf{english}\index{english@\textsf{english}|textbf}\xspace}
+\newcommand{\Optenglishkw}{\textsf{englishkw}\index{englishkw@\textsf{englishkw}|textbf}\xspace}
\newcommand{\Optgerman}{\textsf{german}\index{german@\textsf{german}|textbf}\xspace}
+\newcommand{\Optgermankw}{\textsf{germankw}\index{germankw@\textsf{germankw}|textbf}\xspace}
\newcommand{\Optngerman}{\textsf{ngerman}\index{ngerman@\textsf{ngerman}|textbf}\xspace}
+\newcommand{\Optngermankw}{\textsf{ngermankw}\index{ngermankw@\textsf{ngermankw}|textbf}\xspace}
\newcommand{\Optspanish}{\textsf{spanish}\index{spanish@\textsf{spanish}|textbf}\xspace}
+\newcommand{\Optspanishkw}{\textsf{spanishkw}\index{spanishkw@\textsf{spanishkw}|textbf}\xspace}
\newcommand{\Optcroatian}{\textsf{croatian}\index{croatian@\textsf{croatian}|textbf}\xspace}
-\newcommand{\Optportugues}{\textsf{portugues}\index{portugues@\textsf{portugues}|textbf}\xspace}
+\newcommand{\Optcroatiankw}{\textsf{croatiankw}\index{croatiankw@\textsf{croatiankw}|textbf}\xspace}
+\newcommand{\Optportugues}{\textsf{portuguese}\index{portuguese@\textsf{portuguese}|textbf}\xspace}
+\newcommand{\Optportugueskw}{\textsf{portuguesekw}\index{portuguesekw@\textsf{portuguesekw}|textbf}\xspace}
\newcommand{\Optczech}{\textsf{czech}\index{czech@\textsf{czech}|textbf}\xspace}
+\newcommand{\Optczechkw}{\textsf{czechkw}\index{czechkw@\textsf{czechkw}|textbf}\xspace}
\newcommand{\Optitaliano}{\textsf{italiano}\index{italiano@\textsf{italiano}|textbf}\xspace}
+\newcommand{\Optitalianokw}{\textsf{italianokw}\index{italianokw@\textsf{italianokw}|textbf}\xspace}
\newcommand{\Optslovak}{\textsf{slovak}\index{slovak@\textsf{slovak}|textbf}\xspace}
+\newcommand{\Optslovakkw}{\textsf{slovakkw}\index{slovakkw@\textsf{slovakkw}|textbf}\xspace}
+\newcommand{\Optturkish}{\textsf{turkish}\index{turkish@\textsf{turkish}|textbf}\xspace}
+\newcommand{\Optturkishkw}{\textsf{turkishkw}\index{turkishkw@\textsf{turkishkw}|textbf}\xspace}
\newcommand{\Optboxed}{\textsf{boxed}\index{boxed@\textsf{boxed}|textbf}\xspace}
\newcommand{\Optboxruled}{\textsf{boxruled}\index{boxruled@\textsf{boxruled}|textbf}\xspace}
\newcommand{\Optruled}{\textsf{ruled}\index{ruled@\textsf{ruled}|textbf}\xspace}
@@ -149,6 +178,11 @@
\newcommand{\Optoldcommands}{\textsf{oldcommands}\index{oldcommands@\textsf{oldcommands}|textbf}\xspace}
\newcommand{\Optnokwfunc}{\textsf{nokwfunc}\index{nokwfunc@\textsf{nokwfunc}|textbf}\xspace}
\newcommand{\Optblockmarkers}{\textsf{displayblockmarkers}\index{displayblockmarkers@\textsf{displayblockmarkers}|textbf}\xspace}
+\newcommand{\Optgroupmarkers}{\textsf{displaygroupmarkers}\index{displaygroupmarkers@\textsf{displaygroupmarkers}|textbf}\xspace}
+\newcommand{\Optnoalgohanging}{\textsf{noalgohanging}\index{noalgohanging@\textsf{noalgohanging}|textbf}\xspace}
+\newcommand{\Opthangingcomment}{\textsf{hangingcomment}\index{hangingcomment@\textsf{hangingcomment}|textbf}\xspace}
+\newcommand{\Opthanginginout}{\textsf{opthanginginout}\index{opthanginginout@\textsf{opthanginginout}|textbf}\xspace}
+%
%%%
\newcommand{\ExampleOfAlgo}[1]{%
\begin{minipage}{.4\textwidth}%
@@ -161,11 +195,11 @@
\end{minipage}%
}
%%%%%%%%%%%%%%%%%%%%%%
-\newcommand{\algocfversion}{release 5.0}
+\newcommand{\algocfversion}{release 5.1}
\title{algorithm2e.sty --- package for algorithms\\ {\large\algocfversion}}
\author{(c) 1995-1997 Christophe Fiorio, Tu-Berlin, Germany\\
-(c) 1998-2013 Christophe Fiorio, LIRMM, Montpellier 2 University, France\\
- Report bugs and comments to cfiorio@um2.fr\\
+(c) 1998-2015 Christophe Fiorio, LIRMM, Montpellier University, France\\
+ Report bugs and comments to christophe.fiorio@umontpellier.fr\\
algorithm2esty-annonce@lirmm.fr mailing list for announcements\\
algorithm2esty-discussion@lirmm.fr mailing list for discussion\thanks{The author is very grateful
to David Carlisle, one of the authors of the LaTeX Companion book, for his advices} \thanks{Martin Blais for his
@@ -175,7 +209,7 @@
for the german translation of keywords}
\thanks{Arnaud Giersch for his suggestions and corrections on SetKwComments}
\thanks{and the many users as Jean-Baptiste Rouquier
- for their remarks} } \date{january 06 2013}
+ for their remarks} } \date{October 19 2015}
\makeindex
@@ -283,7 +317,7 @@ The \autoref{algo_disjdecomp} and \autoref{IR} are written with this package.
Here we suppose that we have done:
\begin{verbatim}
-\usepackage[lined,boxed,commentsnumbered]{algorithm2e}
+\usepackage[linesnumbered,lined,boxed,commentsnumbered]{algorithm2e}
\end{verbatim}\index{lined|textit,algonl|textit,boxed|textit}
\noindent The \autoref{algo_disjdecomp} was written in \LaTeX2e code as presented next page. You can label lines,
@@ -362,8 +396,9 @@ command\footnote{Default behaviour uses \emph{short end} keywords, it means type
\input{algorithm2e_exgeneric}
\end{algorithm}
-The \autoref{algo:pseudocodeblock} shows how algorithm is displayed using automatic block
-display (new feature since relase 5.0). To achieve this display, we only add following
+The \autoref{algo:pseudocodeblock} shows how you can have each block tagged with begin-end
+keywords. This is done by using automatic block
+display (new feature since release 5.0). To achieve this display, we only add following
macros at start of the algorithm:\vspace{-1.5ex}
\begin{verbatim}
\AlgoDisplayBlockMarkers\SetAlgoBlockMarkers{begin}{end}%
@@ -375,7 +410,21 @@ commands to avoid a double end (the one of block marker and the one of command).
\begin{algorithm}\AlgoDisplayBlockMarkers\SetAlgoNoEnd\SetAlgoBlockMarkers{begin}{end}
\caption{Generic example in pseudo-code with begin-end block set}\label{algo:pseudocodeblock}
\input{algorithm2e_exgeneric}
-\end{algorithm}\medskip
+\end{algorithm}
+
+Not that since release 5.1, you can also have block tagged for one line display. The
+\autoref{algo:pseudocodegroup} is based on \autoref{algo:pseudocodeblock} but uses ``l macros'' as e.g. \texttt{$\backslash$lIf} to display command on one line ; \texttt{$\backslash$AlgoDisplayGroupMarkers} is added to have also block tagged with markers defined by \texttt{$\backslash$SetAlgoBlockMarkers}. To achieve this display, we replace preamble of \autoref{algo:pseudocodeblock} by:\vspace{-1.5ex}
+\begin{verbatim}
+ \AlgoDisplayBlockMarkers\AlgoDisplayGroupMarkers\SetAlgoBlockMarkers{ \{}{ \}\ }%
+ \SetAlgoNoEnd\SetAlgoNoLine
+\end{verbatim}
+\begin{algorithm}
+ \AlgoDisplayBlockMarkers\AlgoDisplayGroupMarkers\SetAlgoBlockMarkers{ \{}{ \}\ }%
+ \SetAlgoNoEnd\SetAlgoNoLine
+ \caption{\autoref{algo:pseudocodeblock} with \{\} block set even for one line command.}\label{algo:pseudocodegroup}
+ \input{algorithm2e_exgeneric2}
+\end{algorithm}
+\medskip
The \autoref{algo:pythoncodeblock} shows how algorithm looks like with a python-style
syntax. To achieve this display, we need to make following changes before the algorithm:\vspace{-1.5ex}
@@ -588,15 +637,36 @@ keep its original name:
%--------------------------------------------------------------------------
\subsection{language option}
\label{sec:option:language}
+
+There are predefined keywords in different languages already defined (see
+section~\ref{sec_lang} or in the .sty file) that you can activate by using appropriate option. You
+can also activate these localized keywords by using same option followed by \emph{kw}. In
+this case, you keep all localized keywords already defined and add the new ones. Note that
+this option is not robust, and there are macros in differents language that are the
+same. In this case, last defined is the one staying. But this allow you to have
+predefined keywords in multiple languages.
+
\begin{description}
-\item[\Optcroatian:] to have for example \textsl{Algoritam:} instead of \textsl{algorithm:}. \medskip
-\item[\Optczech:] to have for example \textsl{Algoritmus:} instead of \textsl{algorithm:}.
\item[\Optenglish:] the default.
-\item[\Optfrench:] to have for example \textsl{algorithme\ :} instead of \textsl{algorithm:}.
-\item[\Optgerman:] to have for example \textsl{Prozedur\ :} instead of \textsl{procedure:}. \medskip
-\item[\Optngerman:] to have german option as babel
-\item[\Optportugues:] to have for example \textsl{Algoritmo:} instead of \textsl{algorithm:}. \medskip
-\item[\Optspanish:] to have for example \textsl{Algoritmo:} instead of \textsl{algorithm:}. \medskip
+\item[\Optfrench:] to have French keywords, for example \textsl{algorithme\ :} instead of \textsl{algorithm:}.
+\item[\Optfrenchkw:] to add French keywords definition.
+\item[\Optgerman:] to have German keywords, for example \textsl{Prozedur\ :} instead of \textsl{procedure:}. \medskip
+\item[\Optgermankw:] to add German keywords definition.
+\item[\Optngerman:] German option as babel
+\item[\Optspanish:] to have Spanish keywords, for example \textsl{Algoritmo:} instead of \textsl{algorithm:}. \medskip
+\item[\Optspanishkw:] to add Spanish keywords definition.
+\item[\Optitaliano:] to have Italian keywords, for example \textsl{Algoritmo:} instead of \textsl{algorithm:}. \medskip
+\item[\Optitalianokw:] to add Italian keywords definition.
+\item[\Optportugues:] to have Portuguese keywords, for example \textsl{Algoritmo:} instead of \textsl{algorithm:}. \medskip
+\item[\Optportugueskw:] to add Portuguese keywords definition.
+\item[\Optcroatian:] to have Croatian keywords, for example \textsl{Algoritam:} instead of \textsl{algorithm:}. \medskip
+\item[\Optcroatiankw:] to add Croatian keywords definition.
+\item[\Optczech:] to have Czech keywords, for example \textsl{Algoritmus:} instead of \textsl{algorithm:}.
+\item[\Optczechkw:] to add Czech keywords definition.
+\item[\Optturkish:] to have Turkish keywords, for example \textsl{Algoritma:} instead of \textsl{algorithm:}.
+\item[\Optturkishkw:] to add Turkish keywords definition.
+\item[\Optczech:] to have for example \textsl{Algoritmus:} instead of \textsl{algorithm:}.
+\item[\Optczechkw:] to add Czech keywords definition.
\item[\Optonelanguage:] allows, if using standard keywords listed below, to switch from one language to another
without changing keywords by using appropriate language option:
\begin{itemize}
@@ -680,6 +750,24 @@ keep its original name:
\subsection{code typesetting}
\label{sec:option:algodisplay}
+\subsubsection{indentation of long statements}
+\label{sec:option:algohanging}
+
+\begin{description}
+\item[\Optnoalgohanging] By default, long statement are indented on subsequent lines (see
+ to know how to control length of indentation); with this option you get old behavior and
+ lines are no more indented.
+\item[\Opthangingcomment] Comment that are alone on a line (not side comment) are not
+ driven by algorithm hanging: subsequent lines of long comments are indented according to
+ width of start comment marker. With this option, comment are indented like normal
+ statement.
+\item[\Opthanginginout] As for comment, by default, in/out keywords and input keywords
+ (defined by \texttt{$\backslash$SetKwInOut} or \texttt{$\backslash$SetKwInput}) are not
+ indented by algorithm hangindent. They are indented according to width of input
+ keyword. If you want that these keywords acts like other statements, use this option.
+\end{description}
+
+
%---------------------------------
\subsubsection{blocks display}
\label{sec:option:algodisplay:blocks}
@@ -705,6 +793,8 @@ keep its original name:
\begin{description}
\item[\Optblockmarkers] \almac{AlgoDisplayBlockMarkers} becomes the default, see \autoref{sec_styleoptions}
for explanations about the \almac{AlgoDisplayBlockMarkers} macro.
+\item[\Optgroupmarkers] \almac{AlgoDisplayGroupMarkers} becomes the default, see \autoref{sec_styleoptions}
+ for explanations about the \almac{AlgoDisplayGroupMarkers} macro.
\end{description}
%---------------------------------
@@ -802,9 +892,8 @@ There are eight text types in an algorithm environment:
They are defined with the help of the \almacpp{SetKwData}{KwDat}{data} macro, where $\backslash$KwDat will be the
macro and \DataSty{data} the text printed.
-\item Block markers: style of keywords that are print at begin and end of block when
- \optblockmarkers option is set or \almac{AlgoDisplayBlockMarkers} macro used. By default,
- \almac{BlockMarkersSty} is set to \almac{KwSty}.
+\item Block markers : \textbf{BlockMarkersSty} is style of keywords that are print at begin
+ and end of block when \optblockmarkers and/or \optgroupmarkers option are set, or \almac{AlgoDisplayBlockMarkers} and/or \almac{AlgoDisplaygroupMarkers} macro are used. By default, \almac{BlockMarkersSty} is set to \almac{KwSty}.
\item The text (the default): All the remaining text of the algorithm.
\end{enumerate}
@@ -834,8 +923,8 @@ beginning a block outside an algorithm environment.
\item[\Almacppp{SetStartEndCondition}{typo1}{typo2}{typo3}] which sets typo around
condition in \texttt{For}, \texttt{If}, \texttt{Switch}, \texttt{Case} and
\texttt{Repeat} macros. First two are used around \texttt{For}, \texttt{If},
- \texttt{Switch} conditions, First and third are used for \texttt{Case} and
- \texttt{Repeat} condition. Default definition is:\\ \verb+\SetStartEndCondition{ }{ }{}+.\\
+ \texttt{Switch}, \texttt{Case} conditions, First and third are used for \texttt{Repeat}
+ condition. Default definition is:\\ \verb+\SetStartEndCondition{ }{ }{}+.\\
A common alternative is \verb+\SetStartEndCondition{ (}{) }{)}+.\\
It can also be used to remove space around condition, for example if you want python style
commands: \verb+\SetStartEndCondition{ }{}{}+ and \verb+\SetKwFor{For}{for}{:}{}+
@@ -844,6 +933,7 @@ beginning a block outside an algorithm environment.
\almacpp{SetAlgoBlockMarkers{begin keywords}{end keywords}} command. By default, these
keywords are not printed but \emph{begin} and \emph{end} are default keywords used if
\verb+\AlgoDisplayBlockMarkers+ is called.
+\item[\Almac{AlgoDisplayGroupMarkers}] is related to \almac{AlgoDisplayBlockMarkers} and do the same but for command that are displayed on a single line.
\end{description}
%----------
@@ -882,7 +972,12 @@ The following commands help you to define the style and the layout of the captio
\begin{description}
\item[\almacp{SetAlgoCaptionSeparator}{sep}] which sets the separator between title of algorithms (\textbf{Algorithm
1}) and the name of the algorithm. By default it's ':' and caption looks like "\textbf{Algorithm 2: name}" but now you
- can change it by using for example \SetAlgoCaptionSeparator{.} which will give "\textbf{Algorithm 3. name}".
+ can change it by using for example \SetAlgoCaptionSeparator{.} which will give
+ "\textbf{Algorithm 3. name}".
+\item[\Almacp{SetCustomAlgoRuledWidth}{length}] set a custom ruled width of ruled and
+ algoruled options ; note that by the moment you use this macro, rules will have this
+ fixed length: this can cause strange behavior in multicolumn mode or other layout that
+ change the line width.
\item[\Almac{AlCapSkip}] is the dimension of the distance between algorithm body and caption in
\emph{plain} and \emph{boxed} mode. You can change by hands or by using \almacp{SetAlCapSkip}{0ex}.
\item[\Almacp{SetAlCapSkip}{length}] sets the lenght of \almac{AlCapSkip}) dimension between
@@ -997,6 +1092,8 @@ commands'' (see \autoref{sec:setfntsty})
\item[\Almacp{KwSty}{$<$text$>$}] sets $<$text$>$ in keyword type style.
\item[\Almacp{FuncSty}{$<$text$>$}] sets $<$text$>$ in function type style.
+\item[\Almacp{FuncArgSty}{$<$text$>$}] sets $<$text$>$ in function argument type style.
+\item[\Almacp{ProgSty}{$<$text$>$}] sets $<$text$>$ in programm (KwProg) type style.
\item[\Almacp{ArgSty}{$<$text$>$}] sets $<$text$>$ in argument type
style.
\item[\Almacp{DataSty}{$<$text$>$}] sets $<$text$>$ in data typography.
@@ -1139,6 +1236,10 @@ Here is the complete list of these macros:
default: \textbf{textbf}).
\item[\Almacp{SetFuncSty}{$<$font$>$}] sets the function typography
(by default: \textbf{texttt}).
+\item[\Almacp{SetFuncArgSty}{$<$font$>$}] sets the typography of function argument
+(by default: \textbf{emph}).
+\item[\Almacp{SetProgSty}{$<$font$>$}] sets the KwProg typography to $<$font$>$ (by
+ default: \textbf{emph}).
\item[\Almacp{SetArgSty}{$<$font$>$}] sets the argument typography (by
default: \textbf{emph}).
\item[\Almacp{SetDataSty}{$<$font$>$}] sets the data typography (by
@@ -1246,6 +1347,8 @@ the last example above can be define in a simplier way that previously presented
\item[\Almac{SetAlgoNoEnd}] acts like \optnoend option.
\item[\Almacpp{SetInd}{before rule space}{after rule space}] sets the size of the space before the vertical rule
and after. In \almac{NoLine} mode the indentation space is the sum of these two values, by default 0.5em and 1em
+\item[\Almacp{SetAlgoHangIndent}{length}] sets the value of indent length used by
+ hangindent to indent subsequent lines after the first on a long statement.
\item[\Almacp{Setvlineskip}{length}] sets the value of the vertical space after the little horizontal line which
closes a block in \optvlined mode.
\item[\Almacp{SetAlgoSkip}{skip command}] Algorithms puts extra vertical space
@@ -1284,6 +1387,7 @@ the last example above can be define in a simplier way that previously presented
\emph{end} keywords that will be used by \verb+\DisplayBlockMarkers+. Default keywords
are \textbf{begin} and \textbf{end}. but for example you can set
\verb+\DisplayBlockMarkers{\{}{\}}+ to match c-style syntax.
+\item[\Almac{DisplayGroupMarkers}] acts like \optgroupmarkers option: each block of single line command will be started by a \emph{begin} keyword and be ended by an \emph{end} keywords. \Almacpp{SetAlgoBlockMarkers}{begin keyword}{end keyword} defines \emph{begin} and \emph{end} keywords that will be used by \verb+\DisplayGroupMarkers+. Note that begin-end group markers are necessarly the same as \verb+\DisplayBlockMarkers+.
\end{description}
Some length are used to set the layout of ruled, algoruled and boxruled algorithms caption. These length have no
@@ -1331,8 +1435,8 @@ The following macro control how comment are typeseted.
\section{The predefined language keywords}\label{predefkeywords}
-Here are the english keywords predefined in the package. There are other
-language predefined macros provided, such as french keywords, see
+Here are the English keywords predefined in the package. There are other
+language predefined macros provided, such as French keywords, see
\autoref{sec_lang} for a list of other language keywords. All these keywords
are defined using macros provided by the package and described in
\autoref{sec_deflanguage}.
@@ -1573,11 +1677,11 @@ package with your own.
You can also use alternativ \almacp{uBegin}{txt} which acts as \almacp{Begin}{txt} but
without \emph{end}. Useful for example as a part separator that doesn't necessary need
an \emph{end} keyword.
-\item[\Almacpppp{SetKwProg}{Prog}{Title}{is}{end}] Env is a block with 'Title' (in
- \texttt{CapSty} style) at the beginning followed by args followed by '\texttt{is}' then
- '\texttt{text}' inside a block ended by '\texttt{end}'. If no '\texttt{end}' is
- specified, nothing is written (no blank line is inserted). Useful to typeset function or
- prog. For example:\par
+\item[\Almacpppp{SetKwProg}{Prog}{Title}{ is}{end}] Env is a block with 'Title' (in
+ \texttt{CapSty} style) at the beginning followed by args in \texttt{ProgSty} followed by
+ '\texttt{is}' then '\texttt{text}' inside a block ended by '\texttt{end}'. If no
+ '\texttt{end}' is specified, nothing is written (no blank line is inserted). Useful to
+ typeset function or prog. For example:\par
\noindent\ExampleOfAlgo{algorithm2e_exProg.tex}\par
\end{description}
@@ -1588,8 +1692,8 @@ If you want describe the function by an algorithm, use instead \emph{function} o
\begin{description}
\item[\Almacpp{SetKwFunction}{KwFn}{Fn}] defines a macro
- \almacp{KwFn}{arg} which prints \emph{Fn} in Function typography and
- its argument \emph{arg} in argument typography, surrounded by a pair
+ \almacp{KwFn}{arg} which prints \emph{Fn} in \texttt{FuncSty} typography and
+ its argument \emph{arg} in \texttt{FuncArgSty} typography, surrounded by a pair
of parentheses.
\almacpp{SetKwFunction}{Dothat}{Do that} defines the macro
@@ -1645,29 +1749,51 @@ If you want describe the function by an algorithm, use instead \emph{function} o
\item \almacpp{If(comment)}{cond}{Then's text}\\
as previous but put \emph{comment} after \texttt{then} keyword. Usually use with
comment macro like \almac{tcc}*[f]\{comment\} or \almac{tcp}*[f]\{comment\}
+ \item \almacpp{If}{cond}{Then's text(comment)}\\
+ as previous but put \emph{comment} after \texttt{end} keyword. Usually use with
+ comment macro like \almac{tcc}*[f]\{comment\} or \almac{tcp}*[f]\{comment\}
+ \item \almacpp{If(comment1)}{cond}{Then's text(comment2)}\\
+ as previous but put \emph{comment1} after \texttt{then} keyword and \emph{comment2}
+ after \texttt{end}. Usually use with comment macro like \almac{tcc}*[f]\{comment\} or
+ \almac{tcp}*[f]\{comment\}
\item \almacp{ElseIf}{ElseIf's text}\\
ElseIf's text is writen in a block and terminating by the \texttt{endif}.
\item \almacp{ElseIf(comment)}{ElseIf's text}\\
the same with comment.
+ \item \almacp{ElseIf}{ElseIf's text(comment)}\\
+ the same with comment.
+ \item \almacp{ElseIf(comment)}{ElseIf's text(comment)}\\
+ the same with comment.
\item \almacp{Else}{Else's text}\\
Else's text is writen in a block and terminating by the \texttt{endif}.
- \item \almacp{Else}{Else's text}\\
+ \item \almacp{Else(comment)}{Else's text}\\
+ the same with comment.
+ \item \almacp{Else}(comment){Else's text(comment)}\\
the same with comment.
\item \almacpp{lIf}{cond}{Then's text}\\
Then's text is written on the same line as \texttt{then}. No \texttt{endif}
is printed. Do not put $\backslash$; after \emph{Then's text} neither after \almac{lIf}.
\item \almacpp{lIf(comment)}{cond}{Then's text}\\
the same with comment.
+ \item \almacpp{lIf*}{cond}{Then's text}\\
+ Then's text is written on the same line as \texttt{then}. No \texttt{endif} and no end
+ of line are printed. Do not put $\backslash$; after \emph{Then's text} neither after \almac{lIf}.
\item \almacp{lElseIf}{ElseIf's text}\\
ElseIf's text is written on the same line as \texttt{else if}. No \texttt{endif}
is printed.
\item \almacp{lElseIf(comment)}{ElseIf's text}\\
the same with comment.
+ \item \almacp{lElseIf*}{ElseIf's text}\\
+ ElseIf's text is written on the same line as \texttt{else if}. No \texttt{endif}
+ and no end of line are printed.
\item \almacp{lElse}{Else's text}\\
Else's text is written on the same line as \texttt{else}. No \texttt{endif}
is printed.
\item \almacp{lElse(comment)}{Else's text}\\
the same with comment.
+ \item \almacp{lElse*}{Else's text}\\
+ Else's text is written on the same line as \texttt{else}. No \texttt{endif}
+ is printed and no end of line are printed.
\item \almacpp{uIf}{cond}{Then's text} (for uncomplete if)\\
defines a If block unterminated like in a \almac{eIf} block,
i.e. don't print the \texttt{endif} or don't put the little
@@ -1738,16 +1864,26 @@ in the package:\par\smallskip \ExampleOfAlgo{algorithm2e_ex01.tex}\par---\par
\begin{itemize}
\item \almacpp{Switch}{iden}{switch's block}
\item \almacpp{Switch(comment)}{iden}{switch's block}
+ \item \almacpp{Switch}{iden}{switch's block(comment)}
+ \item \almacpp{Switch(comment)}{iden}{switch's block(comment)}
\item \almacpp{Case}{cond}{Case's block}
\item \almacpp{Case(comment)}{cond}{Case's block}
+ \item \almacpp{Case}{cond}{Case's block(comment)}
+ \item \almacpp{Case(comment)}{cond}{Case's block(comment)}
\item \almacpp{uCase}{cond}{Case's block}
\item \almacpp{uCase(comment)}{cond}{Case's block}
\item \almacpp{lCase}{cond}{Case's text}
+ \item \almacpp{lCase*}{cond}{Case's text}
\item \almacpp{lCase(comment)}{cond}{Case's text}
\item \almacp{Other}{Otherwise's block}
\item \almacp{Other(comment)}{Otherwise's block}
+ \item \almacp{Other}{Otherwise's block(comment)}
+ \item \almacp{Other(comment)}{Otherwise's block(comment)}
\item \almacp{lOther}{Otherwise's text}
+ \item \almacp{lOther*}{Otherwise's text}
\item \almacp{lOther(comment)}{Otherwise's text}
+ \item \almacp{uOther}{Otherwise's text}
+ \item \almacp{uOther}(comment){Otherwise's text}
\end{itemize}
\end{description}
@@ -1768,8 +1904,11 @@ As for If-then-elseif-else-endif macro, you can use () to put comments after mai
\begin{itemize}
\item \almacpp{For}{loop's condition}{For's text}
\item \almacpp{For(comment)}{loop's condition}{For's text}
+ \item \almacpp{For}{loop's condition}{For's text(comment)}
+ \item \almacpp{For(comment)}{loop's condition}{For's text(comment)}
\item \almacpp{lFor}{loop's condition}{For's text}
\item \almacpp{lFor(comment)}{loop's condition}{For's text}
+ \item \almacpp{lFor*}{loop's condition}{For's text}
\end{itemize}
\end{description}
@@ -1788,9 +1927,10 @@ As for If-then-elseif-else-endif macro, you can use () to put comments after mai
\begin{itemize}
\item \almacpp{Repeat}{end loop condition}{the loop}
\item \almacpp{Repeat(comment after repeat)}{end loop condition}{the loop}
- \item \almacpp{Repeat}{end loop condition}{the loop}(comment after until)
- \item \almacpp{Repeat(comment after repeat)}{end loop condition}{the loop}(comment after until)
+ \item \almacpp{Repeat}{end loop condition}{the loop(comment after until)}
+ \item \almacpp{Repeat(comment after repeat)}{end loop condition}{the loop(comment after until)}
\item \almacpp{lRepeat}{end loop condition}{only one line}
+ \item \almacpp{lRepeat*}{end loop condition}{only one line}
\item \almacpp{lRepeat(comment)}{end loop condition}{only one line}
\end{itemize}
\end{description}
@@ -1803,7 +1943,7 @@ As for If-then-elseif-else-endif macro, you can use () to put comments after mai
%\clearpage
\section{Other language predefined keywords}\label{sec_lang}
-\subsection{french keywords}
+\subsection{French keywords}
Hey, I am a frenchy , so I have defined the same as in
\autoref{predefkeywords} but in french.
@@ -1926,66 +2066,64 @@ Here we describe how they are obtained:
\item \almacpppp{SetKwFor}{Solange}{solange}{tue}{Ende}%While
\end{itemize}
-\subsection{Portuguese keywords}
+\subsection{Spanish keywords}
-\begin{itemize}
-\item $\backslash$Entrada\{Entrada\}\macind{KwEntrada}\par
- $\backslash$Saida\{Sa\'{i}da\}\macind{KwSaida}\par
- $\backslash$Dados\{Dados\}\macind{KwDados}\par
- $\backslash$Resultado\{Resultado\}\macind{KwResultado}
-\item $\backslash$Ate\macind{at\'{e}}\par
- $\backslash$KwRetorna\{[val]\}\macind{KwRetorna}\par
- $\backslash$Retorna\{[val]\}\macind{Retorna}
-\item $\backslash$Iniciob\{inside block\}\macind{Iniciob}
-\item $\backslash$eSe\{condition\}\{then block\}\{else block\}\macind{eSe}\par
- $\backslash$Se\{condition\}\{then block\}\macind{Se}\par
- $\backslash$uSe\{condition\}\{then block without end\}\macind{uSe}\par
- $\backslash$lSe\{condition\}\{then's line text\}\macind{lSe}\par
- $\backslash$Senao\{else block\}\macind{Senao}\par
- $\backslash$uSenao\{else block without else\}\macind{uSenao}\par
- $\backslash$lSenao\{else's line text\}\macind{lSenao}\par
- $\backslash$SenaoSe\{condition\}\{elseif block\}\macind{uSenaoSe}\par
- $\backslash$uSenaoSe\{condition\}\{elseif block without end\}\macind{uSenaoSe}\par
- $\backslash$lSenaoSe\{condition\}\{elseif's line text\}\macind{lSenaoSe}
-\item $\backslash$Selec\{condition\}\{Switch block\}\macind{Selec}\par
- $\backslash$Caso\{a case\}\{case block\}\macind{Caso}\par
- $\backslash$uCaso\{a case\}\{case block without end\}\macind{uCaso}\par
- $\backslash$lCaso\{a case\}\{case's line\}\macind{lCaso}\par
- $\backslash$Outro\{otherwise block\}\macind{Outro}\par
- $\backslash$lOutro\{otherwise's line\}\macind{lOutro}
-\item $\backslash$Para\{condition\}\{text loop\}\macind{Para}\par
- $\backslash$lPara\{condition\}\{line text loop\}\macind{lPara}
-\item $\backslash$ParaPar\{condition\}\{text loop\}\macind{ParaPar}\par
- $\backslash$lParaPar\{condition\}\{line text loop\}\macind{lParaPar}
-\item $\backslash$ParaCada\{condition\}\{text loop\}\macind{ParaCada}\par
- $\backslash$lParaCada\{condition\}\{line text loop\}\macind{lParaCada}
-\item $\backslash$ParaTodo\{condition\}\{text loop\}\macind{ParaTodo}\par
- $\backslash$lParaTodo\{condition\}\{line text loop\}\macind{lParaTodo}
-\item $\backslash$Enqto\{stop condition\}\{text loop\}\macind{Enqto}\par
- $\backslash$lEnqto\{stop condition\}\{text loop\}\macind{lEnqto}
-\item $\backslash$Repita\{stop condition\}\{text loop\}\macind{Repita}\par
- $\backslash$lRepita\{stop condition\}\{line of the loop\}\macind{lRepita}
-\end{itemize}
+\begin{enumerate}
+\item $\backslash$Datos\{Datos\}\macind{Datos}\par
+ $\backslash$Resultado\{Resultado\}\macind{Resultado}\par
+ $\backslash$Entrada\{Entrada\}\macind{Entrada}\par
+ $\backslash$Salida\{Salida\}\macind{Salida}\par
+\item $\backslash$KwA\macind{KwA}\par
+ $\backslash$Devolver\{[value]\}\macind{Devolver}
+\item $\backslash$Inicio\{inside block\}\macind{Inicio}
+\item $\backslash$eSSi\{condition\}\{then block\}\{else block\}\macind{eSSi}\par
+ $\backslash$SSi\{condition\}\{then block\}\macind{SSi}\par
+ $\backslash$uSSi\{condition\}\{then block without end\}\macind{uSSi}\par
+ $\backslash$lSSi\{condition\}\{then line\}\macind{lSSi}\par
+ $\backslash$EnOtroCasoSi\{condition\}\{elseif block\}\macind{EnOtroCasoSi}\par
+ $\backslash$uEnOtroCasoSi\{condition\}\{elseif block\}\macind{uEnOtroCasoSi}\par
+ $\backslash$lEnOtroCasoSi\{condition\}\{elseif line without end\}\macind{lEnOtroCasoSi}\par
+ $\backslash$EnOtroCaso\{else block\}\macind{EnOtroCaso}\par
+ $\backslash$uEnOtroCaso\{else block without end\}\macind{uEnOtroCaso}\par
+ $\backslash$lEnOtroCaso\{else line\}\macind{lEnOtroCaso}\par
+\item $\backslash$Seleccionar\{condition\}\{Seleccionar caso block\}\macind{Seleccionar}
+ $\backslash$uSeleccionar\{seleccionar\}\{caso block without end\}\macind{uSeleccionar}\par
+ $\backslash$Caso\{seleccionar\}\{caso block\}\macind{Caso}\par
+ $\backslash$lCaso\{seleccionar\}\{caso line\}\macind{lCaso}\par
+ $\backslash$Otro\{sin\'o block\}\macind{Otro}\par
+ $\backslash$lOtro\{sin\'o line\}\macind{lOtro}\par
+\item $\backslash$Para\{condition\}\{loop block\}\macind{Para}\par
+ $\backslash$lPara\{condition\}\{loop line\}\macind{lPara}
+\item $\backslash$ParaPara\{condition\}\{loop block\}\macind{ParaPara}\par
+ $\backslash$lParaPara\{condition\}\{loop line\}\macind{lParaPara}
+\item $\backslash$Mientras\{condition\}\{loop block\}\macind{Mientras}\par
+ $\backslash$lMientras\{condition\}\{loop line\}\macind{lMientras}
+\item $\backslash$ParaCada\{condition\}\{loop block\}\macind{ParaCada}\par
+ $\backslash$lParaCada\{condition\}\{loop line\}\macind{lPourCh}
+\item $\backslash$ParaTodo\{condition\}\{loop block\}\macind{ParaTodo}\par
+ $\backslash$lParaTodo\{condition\}\{loop line\}\macind{lParaTodo}
+\item $\backslash$Repetir\{stop condition\}\{loop block\}\macind{Repetir}\par
+ $\backslash$lRepetir\{stop condition\}\{line loop\}\macind{lRepetir}
+\end{enumerate}
Here we describe how they are obtained:
\begin{enumerate}
-\item \almacpp{SetKwInput}{Entrada}{Entrada}\par
- \almacpp{SetKwInput}{Saida}{Sa\'{i}da}\par
- \almacpp{SetKwInput}{Dados}{Dados}\par
- \almacpp{SetKwInput}{Resultado}{Resultado}%
-\item \almacpp{SetKw}{Ate}{at\'{e}}
- \almacpp{SetKw}{KwRetorna}{retorna}\par
- \almacpp{SetKw}{Retorna}{retorna}\par
-\item \almacppp{SetKwBlock}{Inicio}{in\'{i}cio}{fim}%
-\item \almacphuit{SetKwIF}{Se}{SenaoSe}{Senao}{se}{ent\~{a}o}{sen\~{a}o se}{sen\~{a}o}{fim se}%
-\item \almacphuit{SetKwSwitch}{Selec}{Caso}{Outro}{selecione}{fa\c{c}a}{caso}{sen\~{a}o}{fim caso}\texttt{fim selec}%
-\item \almacpppp{SetKwFor}{Para}{para}{fa\c{c}a}{fim para}%
-\item \almacpppp{SetKwFor}{ParaPar}{para}{fa\c{c}a em paralelo}{fim para}
-\item \almacpppp{SetKwFor}{ParaCada}{para cada}{fa\c{c}a}{fim para cada}%
-\item \almacpppp{SetKwFor}{ParaTodo}{para todo}{fa\c{c}a}{fim para todo}%
-\item \almacpppp{SetKwFor}{Enqto}{enquanto}{fa\c{c}a}{fim enqto}%
-\item \almacppp{SetKwRepeat}{Repita}{repita}{at\'{e}}%
+\item \almacpp{SetKwInput}{Datos}{Datos}\par
+ \almacpp{SetKwInput}{Resultado}{Resultado}\par
+ \almacpp{SetKwInput}{Entrada}{Entrada}\par
+ \almacpp{SetKwInput}{Salida}{Salida}\par
+\item \almacpp{SetKw}{KwA}{a}\par
+ \almacpp{SetKw}{Devolver}{devolver}
+\item \almacppp{SetKwBlock}{Inicio}{inicio}{fin}
+\item \almacphuit{SetKwIF}{SSi}{EnOtroCasoSi}{EnOtroCaso}{si}{entonces}{sin\'o, si}{sin\'o}{fin si}
+\item {\footnotesize\almacphuit{SetKwSwitch}{Seleccionar}{Caso}{Otro}{seleccionar}{hacer}{caso}{sin\'o}{fin caso}\texttt{fin seleccionar}}
+\item \almacpppp{SetKwFor}{Para}{para}{hacer}{fin para}\par
+\item \almacpppp{SetKwFor}{ParaPara}{par}{hacer en paralelo}{fin para}\par
+\item \almacpppp{SetKwFor}{Mientras}{mientras}{hacer}{fin mientras}\par
+\item \almacpppp{SetKwFor}{ParaCada}{ParaCada}{hacer}{fin para cada}
+\item \almacpppp{SetKwFor}{ParaTodo}{para todo}{hacer}{fin para todo}
+\item \almacppp{SetKwRepeat}{Repetir}{repetir}{hasta que}
\end{enumerate}
\subsection{Italian keywords}
@@ -2050,6 +2188,68 @@ Here we describe how they are obtained:
\item \almacpppp{SetKwFor}{Finche}{finché}{fai}{fine finché}
\end{enumerate}
+\subsection{Portuguese keywords}
+
+\begin{itemize}
+\item $\backslash$Entrada\{Entrada\}\macind{KwEntrada}\par
+ $\backslash$Saida\{Sa\'{i}da\}\macind{KwSaida}\par
+ $\backslash$Dados\{Dados\}\macind{KwDados}\par
+ $\backslash$Resultado\{Resultado\}\macind{KwResultado}
+\item $\backslash$Ate\macind{at\'{e}}\par
+ $\backslash$KwRetorna\{[val]\}\macind{KwRetorna}\par
+ $\backslash$Retorna\{[val]\}\macind{Retorna}
+\item $\backslash$Iniciob\{inside block\}\macind{Iniciob}
+\item $\backslash$eSe\{condition\}\{then block\}\{else block\}\macind{eSe}\par
+ $\backslash$Se\{condition\}\{then block\}\macind{Se}\par
+ $\backslash$uSe\{condition\}\{then block without end\}\macind{uSe}\par
+ $\backslash$lSe\{condition\}\{then's line text\}\macind{lSe}\par
+ $\backslash$Senao\{else block\}\macind{Senao}\par
+ $\backslash$uSenao\{else block without else\}\macind{uSenao}\par
+ $\backslash$lSenao\{else's line text\}\macind{lSenao}\par
+ $\backslash$SenaoSe\{condition\}\{elseif block\}\macind{uSenaoSe}\par
+ $\backslash$uSenaoSe\{condition\}\{elseif block without end\}\macind{uSenaoSe}\par
+ $\backslash$lSenaoSe\{condition\}\{elseif's line text\}\macind{lSenaoSe}
+\item $\backslash$Selec\{condition\}\{Switch block\}\macind{Selec}\par
+ $\backslash$Caso\{a case\}\{case block\}\macind{Caso}\par
+ $\backslash$uCaso\{a case\}\{case block without end\}\macind{uCaso}\par
+ $\backslash$lCaso\{a case\}\{case's line\}\macind{lCaso}\par
+ $\backslash$Outro\{otherwise block\}\macind{Outro}\par
+ $\backslash$lOutro\{otherwise's line\}\macind{lOutro}
+\item $\backslash$Para\{condition\}\{text loop\}\macind{Para}\par
+ $\backslash$lPara\{condition\}\{line text loop\}\macind{lPara}
+\item $\backslash$ParaPar\{condition\}\{text loop\}\macind{ParaPar}\par
+ $\backslash$lParaPar\{condition\}\{line text loop\}\macind{lParaPar}
+\item $\backslash$ParaCada\{condition\}\{text loop\}\macind{ParaCada}\par
+ $\backslash$lParaCada\{condition\}\{line text loop\}\macind{lParaCada}
+\item $\backslash$ParaTodo\{condition\}\{text loop\}\macind{ParaTodo}\par
+ $\backslash$lParaTodo\{condition\}\{line text loop\}\macind{lParaTodo}
+\item $\backslash$Enqto\{stop condition\}\{text loop\}\macind{Enqto}\par
+ $\backslash$lEnqto\{stop condition\}\{text loop\}\macind{lEnqto}
+\item $\backslash$Repita\{stop condition\}\{text loop\}\macind{Repita}\par
+ $\backslash$lRepita\{stop condition\}\{line of the loop\}\macind{lRepita}
+\end{itemize}
+
+Here we describe how they are obtained:
+
+\begin{enumerate}
+\item \almacpp{SetKwInput}{Entrada}{Entrada}\par
+ \almacpp{SetKwInput}{Saida}{Sa\'{i}da}\par
+ \almacpp{SetKwInput}{Dados}{Dados}\par
+ \almacpp{SetKwInput}{Resultado}{Resultado}%
+\item \almacpp{SetKw}{Ate}{at\'{e}}
+ \almacpp{SetKw}{KwRetorna}{retorna}\par
+ \almacpp{SetKw}{Retorna}{retorna}\par
+\item \almacppp{SetKwBlock}{Inicio}{in\'{i}cio}{fim}%
+\item \almacphuit{SetKwIF}{Se}{SenaoSe}{Senao}{se}{ent\~{a}o}{sen\~{a}o se}{sen\~{a}o}{fim se}%
+\item \almacphuit{SetKwSwitch}{Selec}{Caso}{Outro}{selecione}{fa\c{c}a}{caso}{sen\~{a}o}{fim caso}\texttt{fim selec}%
+\item \almacpppp{SetKwFor}{Para}{para}{fa\c{c}a}{fim para}%
+\item \almacpppp{SetKwFor}{ParaPar}{para}{fa\c{c}a em paralelo}{fim para}
+\item \almacpppp{SetKwFor}{ParaCada}{para cada}{fa\c{c}a}{fim para cada}%
+\item \almacpppp{SetKwFor}{ParaTodo}{para todo}{fa\c{c}a}{fim para todo}%
+\item \almacpppp{SetKwFor}{Enqto}{enquanto}{fa\c{c}a}{fim enqto}%
+\item \almacppp{SetKwRepeat}{Repita}{repita}{at\'{e}}%
+\end{enumerate}
+
\subsection{Some Czech keywords}
Here are some czech keywords, please feel free to send me the others.
@@ -2084,6 +2284,125 @@ How they are obtained:
\section*{Release notes}\label{sec:relnotes}
\begin{verbatim}
+% - October 19 2015 - revision 5.1
+% * CHANGE/ADD: l commands (the ones as \lIf) can now be used with a
+% star. If done, no end of line are done, so you can enclose
+% l command into another one. For example, you can write:
+% \lForEach{$i$}{\lIf*{foo}{bar}}.
+% Note that when you use a star, side comments are not allowed.
+% * CHANGE/ADD: Now you can have a side comment at end of macros which
+% have a block. For example you can do :
+% \Begin(\tcc*[h]{side comment for begin}{text}(\tcc*[h]{side comment after end})
+% Note: there are some side effects for some commands:
+% \SetKwProg : macro defined thanks to \SetKwProg are allowed
+% to have no end marker. In this case,
+% beware to end side comment, this can
+% do weird output (but no error)
+% * CHANGE: \SetKwSwitch defines also an \uOther command which was not
+% the case until this release.
+% * CHANGE: \SetStartEndCondition{typo1}{typo2}{typo3} defined two end
+% conditions (type2 and typo3) : typo3 is no more used for
+% case condition as typo2 is used which is more consistent
+% since there is a condition followed by a keyword as for
+% if-then or other command that are defined using typo2.
+% * CHANGE: keywords was not language dependant to allow to use multiple
+% languages in the same document, but some keywords in
+% different language were having the same keyword that lead
+% last one declared to replace first one and so you could have some
+% spanish keywords printed as you were in portuguese. So
+% this behavior is changed from now:
+% - localized keywords are defined if according language
+% option is defined ;
+% - if you want to keep old behaviour and use localized
+% keywords without using language option (keep old
+% behavior), you can use languagekw option
+% (e.g. frenchkw, germankw, ...). Note that you can use
+% multiple languagekw options at the same time, in
+% contrary of language option. Note also that if you use
+% multiple languagekw options, you can get back the same
+% problem as previously when keywords was not language
+% dependant.
+% * ADD: new typo styles:
+% - Arguments of functions have now their own style. By
+% default, FuncArgSty is the same as ArgSty.
+% - Name of KwProg have now their own sty (they used ArgSty
+% previously). By default, ProgSty is still ArgSty.
+% As usual, \SetFuncArgSty{}, FuncArgSty{} and
+% \SetProgSty{}, ProgSty{} are macros to set and use these
+% typo styles.
+% * ADD: Options to manage algorithm hangindent
+% Until this revision, long statement acts as classical text and
+% continue on next line starting from the same point. This makes
+% difficult to notice that the new lines of text is not a new
+% statement. Now, hangindent is managed and when a long
+% statement continue on next lines, lines, except the first,
+% are indented.
+% Option: noalgohanging
+% By default, long statement are indented on subsequent
+% lines; with this option you get old behavior and lines are
+% no more indented
+% Option: hangingcomment
+% Comment that are alone on a line (not side comment) are
+% not driven by algo hanging: subsequent lines of long
+% comments are indented according to width of start comment
+% marker. With this option, comment are indented like normal
+% statement.
+% Option: hanginginout
+% As for comment, by default, in/out keywords and input
+% keywords (defined by \SetKwInOut or \SetKwInput) are not
+% indented by algorithm hangindent. They are indented
+% according to width of input keyword. If you want that these
+% keywords acts like normal statement, use this option.
+% \SetAlgoHangIndent{length}
+% This macro allows you to set your own indent length. By
+% default, \SetAlgoHangIndent{0.5em}
+% * ADD: Group markers.
+% This option is related to block markers of release 5.0. Some
+% have ask to put also block markers for single line
+% command. This new feature has been implemented to do this.
+% So, you can now ask package to put begin and end keywords
+% automatically at start and end of single line command (see
+% example in documentation).
+% These new group markers macros are:
+% - \AlgoDisplayGroupMarkers and \AlgoDontDisplayGroupMarkers
+% Note that a new option has also been added: displaygroupmarkers
+% * ADD: \SetCustomAlgoRuledWidth{length}
+% set a custom ruled width of ruled and algoruled options ;
+% note that by the moment you use this macro, rules will have
+% this fixed length: this can cause strange behavior in
+% multicolumn mode or other layout that change the line
+% width.
+% * ADD: turkish language option
+% * FIX: a spurious whitespace which results in a spurious indent in the
+% user's text right after the end of the algorithm environment
+% was introduced in release 5.0. This is fixed now thanks to
+% Alexander Malkis.
+% * FIX: there was a problem with margins in caption when option figure
+% was use with caption package. This is fixed.
+% * FIX: when changing font size in caption with, interline skip stayed
+% unchanged and so with a small font was to large. This is fixed.
+% * FIX: in contrary of that is written in the documentation, ':' what
+% not in KwSty typo for KwIn and KwOut command. This is fixed.
+% * FIX: strange behaviour with label and lines numbered: @currentlabel
+% was updated according to algo line number not in all
+% situation. For e.g, with hyperref package, always updated ;
+% with \nlset also updated, but with \nl or linesnumbered
+% option, not updated. This "feature" causes different output
+% with \label command according to options used which is not
+% that one want. This is solved now, and @currentlabel is
+% always updated so \label command works always is the same way.
+% * FIX: some czech keywords
+% * FIX: some spanish keywords
+% * FIX: some croatian keywords
+% * FIX: krantz class changes definition of chapter and get one more
+% option that classical classes as book.cls or report.cls and
+% broke fix for hyperref on chapter definition. This is now
+% fixed and algorithm detects use of krantz class and use then
+% a definition of chapter working with krantz class.
+% * FIX: an issue with internal macro which causes ([Q]) use as argument
+% of some environment to be misprinted (thanks to Martin Schröder).
+% * FIX: mispelled name of hyperrefcounter inside internal macro.
+%
% - January 6 2013 - revision 5.0
% * CHANGE: SetKwSwith takes now 9 args: 9th arg is the same as
% previous 8th arg ('end of switch' keyword). New 8th arg is
@@ -2124,12 +2443,12 @@ How they are obtained:
% \SetStartEndCondition{ }{}{} and \SetKwFor{For}{for}{:}{}
% * ADD: new environment algomathdisplay which allow display math (like inside \[ \] or $$ $$)
% handling end line and line number
-% * ADD: new command \SetKwProg{Env}{Title}{is}{end} which defines a macro
+% * ADD: new command \SetKwProg{Env}{Title}{ is}{end} which defines a macro
% \Env{args}{text}. Env is a block with 'Title' (in \CapSty) at the beginning
% followed by args followed by 'is' then 'text' is put below inside a block ended
% by 'end'. If no 'end' is specified, nothing is written (no
% blank line is inserted). Useful to typeset function or prog for example:
-% \SetKwProg{Fn}{Function}{is}{end} makes \Fn{afunc(i: int) : int}{return 0\;}
+% \SetKwProg{Fn}{Function}{ is}{end} makes \Fn{afunc(i: int) : int}{return 0\;}
% writes:
% Function afunc(i: int) : int is
% | return 0;
@@ -2146,7 +2465,7 @@ How they are obtained:
% | else:
% | return 0
% with appropriate typo.
-% * ADD: option croatian: croation keywords (thanks to Ivan Gavran)
+% * ADD: option croatian: croatian keywords (thanks to Ivan Gavran)
% * ADD: option ngerman: same as german option but so can be used with global option ngerman
% of babel
% * ADD: option spanish: Spanish support (thanks to Mario Abarca)
diff --git a/Master/texmf-dist/doc/latex/algorithm2e/algorithm2e_exAlgoDisjdecomp.tex b/Master/texmf-dist/doc/latex/algorithm2e/algorithm2e_exAlgoDisjdecomp.tex
index abb2cc3c5e4..d62fbb685aa 100644
--- a/Master/texmf-dist/doc/latex/algorithm2e/algorithm2e_exAlgoDisjdecomp.tex
+++ b/Master/texmf-dist/doc/latex/algorithm2e/algorithm2e_exAlgoDisjdecomp.tex
@@ -15,13 +15,13 @@
\Up$\leftarrow$ \FindCompress{$Im[i-1,]$}\;
\This$\leftarrow$ \FindCompress{$Im[i,j]$}\;
\If(\tcp*[h]{O(\Left,\This)==1}){\Left compatible with \This}{\label{lt}
- \lIf{\Left $<$ \This}{\Union{\Left,\This}}\;
- \lElse{\Union{\This,\Left}\;}
+ \lIf{\Left $<$ \This}{\Union{\Left,\This}}
+ \lElse{\Union{\This,\Left}}
}
\If(\tcp*[f]{O(\Up,\This)==1}){\Up compatible with \This}{\label{ut}
- \lIf{\Up $<$ \This}{\Union{\Up,\This}}\;
+ \lIf{\Up $<$ \This}{\Union{\Up,\This}}
\tcp{\This is put under \Up to keep tree as flat as possible}\label{cmt}
- \lElse{\Union{\This,\Up}}\tcp*[r]{\This linked to \Up}\label{lelse}
+ \lElse{\Union{\This,\Up}}\tcp*[h]{\This linked to \Up}\label{lelse}
}
}
\lForEach{element $e$ of the line $i$}{\FindCompress{p}}
diff --git a/Master/texmf-dist/doc/latex/algorithm2e/algorithm2e_exgeneric2.tex b/Master/texmf-dist/doc/latex/algorithm2e/algorithm2e_exgeneric2.tex
new file mode 100644
index 00000000000..4b44545b4c1
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/algorithm2e/algorithm2e_exgeneric2.tex
@@ -0,0 +1,20 @@
+\Fn(\tcc*[h]{algorithm as a recursive function}){\FRecurs{some args}}{
+ \KwData{Some input data}
+ \KwResult{Same for output data}
+ \If(\tcc*[h]{a simple if but with a comment on the same line}){this is true}{
+ we do that, else nothing\;
+ \lIf{we agree that}{we do that}
+ \Else{
+ \lIf{this first condition is true}{we do that}
+ \lElseIf(\tcc*[h]{else if}){this other condition is true}{this is done}
+ \lElse(\tcc*[h]{else}){in other case, we do this}
+ }
+ }
+ \lFor{\forcond}{a for loop}
+ \While{$i<n$}{
+ a while loop including a repeat--until loop\;
+ \lRepeat(\tcc*[h]{a comment}){this end condition}{do this things}
+ }
+ They are many other possibilities and customization possible that you have to
+ discover by reading the documentation.
+}
diff --git a/Master/texmf-dist/doc/latex/algorithm2e/algorithm2e_exnlsty.tex b/Master/texmf-dist/doc/latex/algorithm2e/algorithm2e_exnlsty.tex
new file mode 100644
index 00000000000..863adcbf581
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/algorithm2e/algorithm2e_exnlsty.tex
@@ -0,0 +1,12 @@
+\SetNlSty{texttt}{[}{]}
+\SetAlgoNlRelativeSize{0}
+\SetNlSkip{0em}
+\nl\KwIn{input data}
+\nl\KwOut{output data}
+\nl\tcc{a comment line in C-style}
+\nl\Repeat{\nl$e<\tau$}{
+ \nl$f_n\leftarrow Y_1$\;
+ \nl$f_{n+1}\leftarrow f_n\times f_{n-1}$\;
+ \nl$e\leftarrow \frac{f_n}{2}$\;
+}
+\nl\KwRet{$e$} \ No newline at end of file