I'm thinking to present some pseudocode in an article by using Latex, and ideally I would like to have something similar to what is shown in the figure below. I searched and tried out some packages, but couldn't replicate the figure very well... I would be very appreciated if someone could help me with this.
1 Answer
Use this template:
\title{AlgorithmTemplate}
\documentclass[10pt]{article}
\usepackage{times}
\usepackage[ruled,vlined]{algorithm2e}
\begin{document}
\begin{algorithm}[h]
\KwIn{Input}
\KwOut{Output}
\nl \bf Pass\;
\caption{{\bf Algorithm} \label{Algorithm}}
\end{algorithm}
\end{document}
-
1Please also consider reading up on Does it matter if I use
\textit
or\it
,\bfseries
or\bf
, etc. and Will two-letter font style commands (\bf
,\it
, …) ever be resurrected in LaTeX?– Werner ♦May 16, 2015 at 0:21