How can I insert this kind of pseudo code in latex?

enter image description here

  • welcome! What have you done so far? in general: you could use the algorithm-package to get this kind of result.
    – naphaneal
    Apr 24, 2016 at 8:47

1 Answer 1


The algorithm2e package has a vlined option wich does exactly what you need (you can also call \SetAlgoVLined at the beginning of each algorithm environment). Read the documentation to learn how to use the package. See also the relevant chapter of the LaTeX WikiBook.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.