I am using the algorithm
and algpseudocode
packages, whilst wrapping my algorithms around algorithm
and algorithmic
blocks. I would like to change the colour or formatting of my comments (\Comment{...}
) to make them more or less pronounced compared to standard code, as often with narrow technical documents the comment and pseudocode may come close together and the comment may perhaps overflow to the next line, slightly hampering readability.
Thanks
Best Answer
Just redefine the
\algorithmiccomment
command provided by algpseudocode. I usually use:\renewcommand{\algorithmiccomment[1]{\hfill$\triangleright$\textit{#1}}
MWE:
Which produces: