I'm writing a report in which I describe numerous algorithms in the following way:
"[algorithm name]
input: [input]
output: [output]
- step 1
...
- step n"
My problem is that I'm also using the enumitem
package to reduce the spacing between items and it adds an unwanted space between the output line and the beginning of the itemize
.
\documentclass[a4paper,11pt]{article}
\usepackage[shortlabels]{enumitem}
\setlist[itemize]{noitemsep}
\begin{document}
algorithm name
\textsc{input:} input
\textsc{output:} output
\begin{itemize}
\item step 1
\item step 2
\item step 3
\end{itemize}
\end{document}
I tried making the first two lines part of the itemize
by putting "input"
and "output"
as \item
labels, but the difference in length makes them "right-aligned" (relatively to each other) and outside the body box.
algotihmicx
oralgorithm2e
packages ? They are specifically designed for the description of algorithms