# algorithmicx: More space between lines

My algorithmicx (more concretely: algpseudocode) lines contain quite a lot of sub-/superscripts, which makes them look quite "squeezed" onto each other.

How can I have them spaced a little apart without adding it manually after every line?

\documentclass[11pt,paper=a4,parskip=half]{scrartcl}

\usepackage{algpseudocode}

\begin{document}

have:
\begin{algorithmic}[1]
\State do()
\State some()
\State stuff()
\end{algorithmic}

want:
\begin{algorithmic}[1]
\State do()\vskip 3pt
\State some() \vskip 3pt
\State stuff()
\end{algorithmic}

\end{document}


I already found out that when I prepend stuff to \ALG@step, it gets prepended to the line, but when I use \vskip or \vspace there, I get errors like missing } inserted which I don't understand…

Maybe you can use \onehalfspacing from setspace package in the algorithmic environment.

\documentclass[11pt,paper=a4,parskip=half]{scrartcl}

\usepackage{algpseudocode}
\usepackage{setspace}
\begin{document}

have:
\begin{algorithmic}[1]\onehalfspacing
\State do()
\State some()
\State stuff()
\end{algorithmic}

want:
\begin{algorithmic}[1]
\State do()\vskip 3pt
\State some() \vskip 3pt
\State stuff()
\end{algorithmic}

\end{document}


• That was easy, thank you :) I had inbetween made some hackery using a 0pt-width \rule to force a minimum height but this is way better Apr 14 '19 at 14:00