I'm currently working on a paper using the IEEEtran template. I do have a pseudocode I would like to put into this paper. In a former paper I saw that it is possible to put this algorithm in a box which is in a figure and fills up both columns of the paper. I want to do it the same way, however, I was not able to manage it.
Could anyone help me out please?
Best Answer
You are most likely referring to the use of the starred float variant:
The above MWE uses
algorithmicx
andalgorithm
that provides the algorithm pseudocode presentation. However, you can place the algorithm inside afigure
environment as well. Not sure what the journal might restrict in terms of package usage.Note that using "one column" floats in a "two column" document usually leads to undesired placement. For one, they will end up at the top by default (unless you use
dblfloatfix
), and usually the page after they are inserted (making first-page presentation difficult). See Wide figures in two-column documents on the UK TeX FAQ.Here's a version that does not use
algorithm
, but instead restyles thefigure
floating environment to box its contents (thanks tofloat
):lipsum
provided some dummy text.