## What is the recommended way to Typset/Format Algorithm-related questions? [closed]

What is the recommended way to typeset algorithms?

For example, I have a question about an algorithm related to automata theory, and I would like to render the algorithm in my question.

In Latex I would use the algorithmic package and then get on with STATE and WHILE, etc. This does not seem to work here however, so is it recommended that I format the algorithm in html, with a numbered, ordered list and the individual details in jsmath/latex or is there some other tacitly agreed upon protocol?

-
This type of question is more appropriate over at the meta site. – Andrew Stacey Jun 25 2010 at 8:48
Closed: this is for meta. – Scott Morrison Jun 25 2010 at 15:50

## closed as off topic by Andrew Stacey, Scott Morrison♦Jun 25 2010 at 15:50

To display code, indent it four spaces -- this is the markdown syntax for code blocks. For example:

factorial :: Integer -> Integer
factorial 0 = 1
factorial n = n * factorial (n - 1)


If you need to put some code inline, then put it in backticks -- "Integer is a type". Unfortunately the code block code seems to suppress jsMath, however.

-
 thanks for the tip, but definitely need a solution that supports both the algorithm notation and mathjs style markup. I guess html is the way to go? – blackkettle Jun 25 2010 at 12:43 sadly, no. The formatter allows very little by way of actual HTML. I recommend that you search on meta as there are several discussions with links there that may help you. – Andrew Stacey Jun 25 2010 at 13:50