Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LaTeX algorithm2e vlined parameter doesn't work

I've been trying to set a short LaTeX doc with an algorithm. The vertical block lines should have a horizontal line marking the end, like in this picture from the handbook: enter image description here

But I get this result instead: current result despite vlined

No idea what I'm doing wrong. The whole doc for the setup is as following:

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage[vlined,linesnumbered,ruled,noend]{algorithm2e}

\begin{document}
     \NoCaptionOfAlgo
     \begin{algorithm}
     \SetKwInOut{Input}{Input}
     \SetKwInOut{Output}{Output}

     \If{true}
     {
         test
     }
     \caption{test}
     \end{algorithm}

\end{document} 
like image 840
Johannes Avatar asked Apr 12 '26 22:04

Johannes


1 Answers

With noend you explicitly remove the horizontal end lines

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage[vlined,linesnumbered,ruled]{algorithm2e}

\begin{document}
     \NoCaptionOfAlgo
     \begin{algorithm}
     \SetKwInOut{Input}{Input}
     \SetKwInOut{Output}{Output}

     \If{true}
     {
         test
     }
     \caption{test}
     \end{algorithm}

\end{document} 

enter image description here

like image 168
samcarter_is_at_topanswers.xyz Avatar answered Apr 16 '26 11:04

samcarter_is_at_topanswers.xyz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!