summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-12-06 21:20:44 +0000
committerKarl Berry <karl@freefriends.org>2021-12-06 21:20:44 +0000
commitc9a39911e40d8808eec4167a83a0b3da78d1207c (patch)
treee10b38a843e1e1225c6b2e15c0376a7dd0e04e23
parentae4bca457fa7583310a6f209e2fcc71a5005c944 (diff)
algpseudocodex (6dec21)
git-svn-id: svn://tug.org/texlive/trunk@61230 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/algpseudocodex/algpseudocodex.pdf (renamed from Master/texmf-dist/doc/latex/algpseudocodex/documentation.pdf)bin363697 -> 355352 bytes
-rw-r--r--Master/texmf-dist/doc/latex/algpseudocodex/algpseudocodex.tex (renamed from Master/texmf-dist/doc/latex/algpseudocodex/documentation.tex)15
-rw-r--r--Master/texmf-dist/tex/latex/algpseudocodex/algpseudocodex.sty24
3 files changed, 28 insertions, 11 deletions
diff --git a/Master/texmf-dist/doc/latex/algpseudocodex/documentation.pdf b/Master/texmf-dist/doc/latex/algpseudocodex/algpseudocodex.pdf
index f83ae1c374f..09a3887bca9 100644
--- a/Master/texmf-dist/doc/latex/algpseudocodex/documentation.pdf
+++ b/Master/texmf-dist/doc/latex/algpseudocodex/algpseudocodex.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/algpseudocodex/documentation.tex b/Master/texmf-dist/doc/latex/algpseudocodex/algpseudocodex.tex
index fed9558e4ad..5bbed3e33ea 100644
--- a/Master/texmf-dist/doc/latex/algpseudocodex/documentation.tex
+++ b/Master/texmf-dist/doc/latex/algpseudocodex/algpseudocodex.tex
@@ -1,5 +1,5 @@
%% documentation.tex
-%% Copyright 2020 Christian Matt
+%% Copyright 2020-2021 Christian Matt
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -29,7 +29,7 @@
\title{\bf{Algpseudocodex Package Documentation}}
\author{Christian Matt \\ \url{https://github.com/chrmatt/algpseudocodex}}
-\date{\today\\v1.0}
+\date{\today\\v1.0.1}
\begin{document}
@@ -679,5 +679,16 @@ The following keywords can be customized:
\hfill Default: \verb|\textbf{output}|
\end{itemize}
+\section{Revision History}
+
+\subsection*{v1.0.1 (2021-12-05)}
+\begin{itemize}
+ \item Fixed bug regarding alignment of comments after end if, end for etc.
+\end{itemize}
+
+\subsection*{v1.0 (2020-08-16)}
+\begin{itemize}
+ \item Initial release.
+\end{itemize}
\end{document}
diff --git a/Master/texmf-dist/tex/latex/algpseudocodex/algpseudocodex.sty b/Master/texmf-dist/tex/latex/algpseudocodex/algpseudocodex.sty
index e6da8cd0c9f..1b6c53368b6 100644
--- a/Master/texmf-dist/tex/latex/algpseudocodex/algpseudocodex.sty
+++ b/Master/texmf-dist/tex/latex/algpseudocodex/algpseudocodex.sty
@@ -1,5 +1,5 @@
%% algpseudocodex.sty
-%% Copyright 2017, 2020 Christian Matt
+%% Copyright 2017, 2020-2021 Christian Matt
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -20,7 +20,7 @@
% Based on Szasz Janos' algpseudocode.sty
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{algpseudocodex}[2020-08-16 v1.0 pseudocode typesetting]
+\ProvidesPackage{algpseudocodex}[2021-12-05 v1.0.1 pseudocode typesetting]
\RequirePackage{kvoptions}
\RequirePackage{algorithmicx}
\RequirePackage{etoolbox}
@@ -129,6 +129,12 @@
\algpx@startCodeCommandX{}{}%
}
+% execute before printing end if etc.
+\newcommand{\algpx@startEndBlockCommand}{%
+ % add space for indentation because of how ALG@nested is computed
+ \algpx@startCodeCommandX{}{\hspace*{\algorithmicindent}}%
+}
+
% extended version of \algpx@startCodeCommand
% first argument is printed before content
% second argument is used to reserve space after contents (for end symbol of long comments)
@@ -523,12 +529,12 @@
\algdef{SE}[WHILE]{While}{EndWhile}[1]{%
\algpx@startIndent\algpx@startCodeCommand\algorithmicwhile\ #1\ \algorithmicdo%
}{%
- \algpx@endIndent\algpx@startCodeCommand\algorithmicend\ \algorithmicwhile%
+ \algpx@endIndent\algpx@startEndBlockCommand\algorithmicend\ \algorithmicwhile%
}
\algdef{SE}[FOR]{For}{EndFor}[1]{%
\algpx@startIndent\algpx@startCodeCommand\algorithmicfor\ #1\ \algorithmicdo%
}{%
- \algpx@endIndent\algpx@startCodeCommand\algorithmicend\ \algorithmicfor%
+ \algpx@endIndent\algpx@startEndBlockCommand\algorithmicend\ \algorithmicfor%
}
\algdef{S}[FOR]{ForAll}[1]{%
\algpx@startIndent\algpx@startCodeCommand\algorithmicforall\ #1\ \algorithmicdo%
@@ -536,17 +542,17 @@
\algdef{SE}[LOOP]{Loop}{EndLoop}{%
\algpx@startIndent\algpx@startCodeCommand\algorithmicloop%
}{%
- \algpx@endIndent\algpx@startCodeCommand\algorithmicend\ \algorithmicloop%
+ \algpx@endIndent\algpx@startEndBlockCommand\algorithmicend\ \algorithmicloop%
}
\algdef{SE}[REPEAT]{Repeat}{Until}{%
\algpx@startIndent\algpx@startCodeCommand\algorithmicrepeat%
}[1]{%
- \algpx@endIndent[2]\algpx@startCodeCommand\algorithmicuntil\ #1%
+ \algpx@endIndent[2]\algpx@startEndBlockCommand\algorithmicuntil\ #1%
}
\algdef{SE}[IF]{If}{EndIf}[1]{%
\algpx@startIndent\algpx@startCodeCommand\algorithmicif\ #1\ \algorithmicthen%
}{%
- \algpx@endIndent\algpx@startCodeCommand\algorithmicend\ \algorithmicif%
+ \algpx@endIndent\algpx@startEndBlockCommand\algorithmicend\ \algorithmicif%
}
\algdef{C}[IF]{IF}{ElsIf}[1]{%
\algpx@endIndent[1]\algpx@startCodeCommand\algorithmicelse\ \algorithmicif\ #1\ \algorithmicthen%
@@ -557,12 +563,12 @@
\algdef{SE}[PROCEDURE]{Procedure}{EndProcedure}[2]{%
\algpx@startIndent\algpx@startCodeCommand\algorithmicprocedure\ \textproc{#1}\ifstrempty{#2}{}{(#2)}%
}{%
- \algpx@endIndent\algpx@startCodeCommand\algorithmicend\ \algorithmicprocedure%
+ \algpx@endIndent\algpx@startEndBlockCommand\algorithmicend\ \algorithmicprocedure%
}
\algdef{SE}[FUNCTION]{Function}{EndFunction}[2]{%
\algpx@startIndent\algpx@startCodeCommand\algorithmicfunction\ \textproc{#1}\ifstrempty{#2}{}{(#2)}%
}{%
- \algpx@endIndent\algpx@startCodeCommand\algorithmicend\ \algorithmicfunction%
+ \algpx@endIndent\algpx@startEndBlockCommand\algorithmicend\ \algorithmicfunction%
}
\ifbool{algpx@noEnd}{%