Text FormattingDisplay Code in a two-column Document

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
frodojedi
Posts: 20
Joined: Fri Feb 18, 2011 1:23 am

Display Code in a two-column Document

Post by frodojedi »

Hello everybody,

I need to display Java code in a document with two columns. The problem is that I don´t want that the code stays on one column only, I want that it occupies both the columns.

Basically I would like to get the same behaviour of using the "figure*" environment. I could use both the verbatim or the listings package.

Actually I am trying to do this operation inside the LaTeX template of the IEEE transactions journals: http://www.ctan.org/tex-archive/macros/ ... /IEEEtran/

Any idea?

Thanks in advance

Cheers

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Display Code in a two-column Document

Post by localghost »

I'm quite sure that the float option explained in Section 4.3 of the listings manual will help you on in this regard.


Thorsten
Post Reply