mirror of
https://github.com/Brandon-Rozek/website.git
synced 2024-11-28 22:36:58 -05:00
683 B
683 B
title | date | draft | tags | |
---|---|---|---|---|
Algorithms in LaTex | 2020-05-14T21:31:28-04:00 | false |
|
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:
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}
\begin{algorithm}
\caption{Even Numbers}
\begin{algorithmic}[1]
\State Set variable $evens$ to an empty list.
\For {every integer $i$}
\If {$i$ is divisible by $2$}
\State Add $i$ to $events$ list.
\EndIf
\EndFor
\end{algorithmic}
\end{algorithm}