When using the revtex4-2
document class with the twocolumn
option,
the algorithmic
environment of the algpseudocodex
package
has a right margin which extends too far.
How do I fix this
so the right margin aligns with that of body text?
MWE below.
\documentclass[twocolumn,nobalancelastpage]{revtex4-2}
\usepackage{algpseudocodex}
\begin{document}
See the following lines of code.
The right margin seems to go further than that of body text.
See the following lines of code.
The right margin seems to go further than that of body text.
\begin{algorithmic}
\State A long first statement to demonstrate where statements linewrap.
\State A short second statement.
\Comment{Short comment.}
\LComment{Long comment.}
\end{algorithmic}
\end{document}
The nobalancelastpage
class option is there
just so I can compare the margins of
the body text and the algorithmic
environment.
Screenshot of MWE output below.
The problem goes away if I change one of the following:
revtex4-2
toarticle
twocolumn
toonecolumn
algpseudocodex
toalgpseudocode
(and delete\LComment{Long comment.}
)
\noindent\begin{minipage}{.96\linewidth} ... \end{minipage}
around the algorithmalgorithm
environment (which usually wraps around thealgorithmic
environment)