3

I want to write an algorithm in LaTeX. It's not any programming language, it is pseudocode with a very mathematical style. Furthermore it is divided in a main function and some subfunctions. I also would like to be able to comment (almost) every line to describe what it is used for.

As an example, you may want to take a look at this link: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.3496&rep=rep1&type=pdf

See page 10 for the code. I would like to write it in the very same style if this is somehow possible.

Any help is appreciated :)

doncherry
  • 54,637
chris
  • 655
  • 3
    Welcome to TeX.sx! Can you show us some attempt you've made in achieving this layout? Is there something in particular you're struggling with? Some popular packages for code formatting are listings, fancyvrb and minted. There are plenty of questions about them on tex.sx that you can check out. – doncherry Aug 22 '11 at 15:22
  • So far, I have only used listings. The main problem is the structure of the example, how it is split up in the different (sub)functions in one table – chris Aug 22 '11 at 15:33
  • 3
    There are many options that vary across styles and ease-of-use. Here is a list of options in terms of typesetting algorithms in pseudocode that may be of interest: Print programs with its proper syntax – Werner Aug 22 '11 at 15:50
  • Have you read http://www.tex.ac.uk/cgi-bin/texfaq2html?label=algorithms ? – raphink Aug 23 '11 at 06:04

0 Answers0