9

The question is simple: I have to insert more pseudo codes in my paper. Last year we have labeled them as Table.

Yesterday, my supervisor has said me to use Figure.

What is the standard for IEEE articles and for the dissertations?

  • 13
    I'd label them as "Listing", "Algorithm" or "Program", according to what they are. – Massimo Ortolano Dec 20 '15 at 16:58
  • 4
    Not necessarily, it depends on the journal and sometimes journals accept labels other than Figure or Table. I've used Listing in a paper and no one objected. – Massimo Ortolano Dec 20 '15 at 17:05
  • 6
    @GiacomoAlessandroni Says who? – xLeitix Dec 20 '15 at 17:06
  • 11
    The only standard that matters for dissertations is your advisor. Ask them. – JeffE Dec 20 '15 at 18:38
  • 2
    @JeffE, surely the examiners have a say! – Chris H Dec 21 '15 at 14:24
19

Pseudocode, in a paper, is figure or table?

Strictly speaking, both "Figure" and "Table" are wrong, given that code is neither. However, there is sort of a tradition of using "Figure" for program code (see for instance here or here for examples from the programming languages community in computer science, which unsurprisingly needs to deal with code often). Alternatively, especially short one- or two-line listings are often just inserted without label.

Your supervisor is hence "correct" in the sense that it is at least not uncommon to use "Figure", and nobody should fault you for it. Using "Table", on the other hand, would indeed look strange to me. There is no tradition for using "Table" in this context, and, well, it's certainly not a table.

An alternative that most styles at least seem to tolerate is to use "Listing". I see it rarely being used in other papers, but I have been using Listing for years without it ever being commented on.

  • 2
    One option I like is just placing the algorithm pseudocode in the main body text, with a heading, e.g., Algorithm ABC. This could be your "Listing" option above, though. – Mad Jack Dec 20 '15 at 18:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.