Text FormattingShowing Matlab Codes in LaTeX

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
bkarpuz
Posts: 124
Joined: Thu Dec 18, 2008 4:53 pm

Showing Matlab Codes in LaTeX

Post by bkarpuz »

Dear LC Members,

I need a similar way to that in the attached sample pdf file for showing my matlab codes in my tex file.
Is there a spacial way to do it?

Many thanks.
bkarpuz
Attachments
1.pdf
(225.23 KiB) Downloaded 173 times
Last edited by bkarpuz on Thu Dec 16, 2010 12:09 pm, edited 1 time in total.

Recommended reading 2024:

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

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

josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Showing Matlab Codes in LaTeX

Post by josephwright »

Normally the best way to include code in a LaTeX file is to use the listings package. The documentation has lots of examples.
Joseph Wright
Post Reply