By default, the line numbers in algorithmicx
are inside the float rules.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{algorithm, algpseudocode}
\begin{document}
\begin{algorithm}
\begin{algorithmic}[1]
\Procedure{Input1}{$s_0 \ldots s_7, c$}
\For{$i \gets 0$ to 7}
\State $arr[i][0] \gets s_i$
\EndFor
\State $color \gets c$
\EndProcedure
\end{algorithmic}
\end{algorithm}
\end{document}
Is it possible to change their indentation to make them display outside the float rules, like in the listings
package? (Details omitted in picture) If the solution would change the indentation of the pseudocode as well so that they would be indented where the line numbers originally were, that would be great.