When adding comment to the end of a block of code, the comment is not right aligned as the other comments but rather it is shifted right by one indentation. I have attached an example showing comments wrongly placed on \EndIf and \Until using the parameter noEnd=false but the problem also happens when issuing comments on \Until even if noEnd=true.
Thank you for the support! There are several ways of fixing this manually or globally but I don't know which is the most idiomatic way nor which will not break something else…
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[noEnd=false]{algpseudocodex}
\usepackage{algorithm}
\begin{document}
\begin{algorithm}[H]
\begin{algorithmic}[1]
\If{test}\Comment{ok}
\State \Comment{ok}
\Else \Comment{still ok}
\State aaaa\Comment{...}
\EndIf \Comment{shifted right}
\Repeat \Comment{fine}
\Repeat \Comment{fine}
\State stmt \Comment{also fine}
\Until{very very very very very long test} \Comment{broken}
\Until{short test} \Comment{broken}
\State \Comment{fine again}
\end{algorithmic}
\end{algorithm}
\end{document}
Hello,
When adding comment to the end of a block of code, the comment is not right aligned as the other comments but rather it is shifted right by one indentation. I have attached an example showing comments wrongly placed on \EndIf and \Until using the parameter noEnd=false but the problem also happens when issuing comments on \Until even if noEnd=true.
Thank you for the support! There are several ways of fixing this manually or globally but I don't know which is the most idiomatic way nor which will not break something else…
OUTPUT.pdf