File:Latex-algorithmic-if-else.png

Summary

Description
Source Own work
Author Nemti

Produced by the following:

$ cat algorithm.tex
\documentclass[12pt]{article}
\usepackage{algorithmic}
\usepackage[right=8cm]{geometry}
\usepackage[active,pdftex,tightpage]{preview}
\PreviewEnvironment[]{algorithmic}
\begin{document}
\begin{algorithmic}
\IF {$i\geq maxval$}
        \STATE $i\gets 0$
\ELSE
        \IF {$i+k\leq maxval$}
                \STATE $i\gets i+k$
        \ENDIF
\ENDIF
\end{algorithmic}
\end{document}
$ pdflatex algorithm.tex
...
$ pdftoppm -r 600 algorithm.pdf algorithm
$ convert algorithm-1.ppm latex-algorithmic-if-else.png

Licensing

Public domain I, the copyright holder of this work, release this work into the public domain. This applies worldwide.
In some countries this may not be legally possible; if so:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.
Category:Self-published work#Latex-algorithmic-if-else.pngCategory:PD-self#Latex-algorithmic-if-else.png Category:Images with LaTeX source code Category:LaTeX
Category:Images with LaTeX source code Category:LaTeX Category:PD-self Category:Self-published work