Brandon Rozek

Photo of Brandon Rozek

PhD Student @ RPI studying Automated Reasoning in AI and Linux Enthusiast.

Algorithms in LaTex

Published on

Updated on

Warning: This post has not been modified for over 2 years. For technical posts, make sure that it is still relevant.

There’s a great package in LaTex called algorithm to help format psuedo-code algorithms for scientific papers. Here’s a simple example of its usage:

\caption{Even Numbers}
\State Set variable $evens$ to an empty list.
\For {every integer $i$}
  \If {$i$ is divisible by $2$}
    \State Add $i$ to $events$ list.


Reply via Email Buy me a Coffee
Was this useful? Feel free to share: Hacker News Reddit Twitter

Published a response to this? :