Text FormattingSource code formatting

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Uspenskaya
Posts: 5
Joined: Fri Dec 25, 2009 1:11 am

Source code formatting

Post by Uspenskaya »

Hi,

I have a program code written in C++ program language and I want to include it in my work written in Latex. Is there some type of syntax or I should do a screenshot of my source code? Thanks for any help.

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

magicmoose
Posts: 90
Joined: Fri Nov 06, 2009 7:29 am

Source code formatting

Post by magicmoose »

Hi there,

Check out the listings package.

David
Uspenskaya
Posts: 5
Joined: Fri Dec 25, 2009 1:11 am

Re: Source code formatting

Post by Uspenskaya »

tnx for help
Post Reply