Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Any ideas of how to represent a list in pseudo-code in LaTex?

  1. Jul 28, 2011 #1
    I'm working with the algorithmic and algorithm packages in LaTeX and looking for a way to perform some operations on a list in the algorithm.. Any ideas how I can do that? Any advice is highly appreciated.

    Thank you in advance.
  2. jcsd
  3. Jul 29, 2011 #2


    User Avatar

    Can't really get what you ask about...

    Do you ask how to print list structures (boxes with dots and arrows) in LaTeX?

    Or maybe you are a fan of Dirty Tricks and ask how to port some Lisp program to [itex]\TeX[/itex]? - if so - be more specific what you want to do.
  4. Jul 29, 2011 #3
    I'm looking for a standard way to represent a list (data structure) in pseudo-code. I looked at the documentation of standard algorithmic packages in latex, e.g.


    but could find anything about lists.

    Pls, let me know if I need to be more clear.
  5. Jul 29, 2011 #4
    In particular, I want to be able to represent the following operations

    list l
    l.add(l1,i) //add element l1 in the i-th position
    l.remove(j) // remove an element in the j-th position
  6. Jul 29, 2011 #5


    User Avatar

    I am not familiar with publications about list processing, so could you give an example of any (available online) paper, where such diagrams are used and printed in a manner you want to achieve?

    BTW: for many papers you may retrieve not only pdf, but also TeX source, so you may steal the solution from other author
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook