# Is it possible to write algorithms in LaTeX? [duplicate]

Possible Duplicate:
How to present a vertical multiplication/addition

Like, for example:

  9
+ 8
---
17


Is this possible? Is there a specific LaTeX thingy (like \frac), or is custom markup needed?

-

## marked as duplicate by hpesoj626, Harish Kumar, Werner, Paul Gaborit, KurtDec 29 '12 at 1:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Will this previous question help you? tex.stackexchange.com/questions/11702/… –  hpesoj626 Dec 29 '12 at 0:01
Possible duplicate: Primary school operations with LaTeX –  Werner Dec 29 '12 at 0:04

## 1 Answer

Even though you might have found your answer in the comments, here how you could use the xlop package.

\documentclass{article}
\usepackage{xlop}

\begin{document}
\opadd{9}{8}
\end{document}


Which will result in:

-