Linked Questions

15
votes
4answers
66k views

Displaying Linux commands in LaTeX [duplicate]

Possible Duplicate: Syntax Coloring in LaTeX Unix Command Highlighting latex I am after some advice on how to display Linux terminal commands into LaTeX, so that they are indented and look ...
28
votes
2answers
17k views

How best to include programming source code in LaTeX documents? [duplicate]

Possible Duplicate: Syntax Coloring in LaTeX I'm relatively new to LaTeX, and am starting to use it for academic paper writing. I'm doing a lot of computer programming as part of my academic work,...
2
votes
1answer
8k views

copying a code to latex without loosing the format [duplicate]

I have a code of around 350 lines, and I need to paste it inside a LaTeX file without losing the formatting such as the extra spaces. What do I need to use to get this in LaTeX?
3
votes
1answer
3k views

Alternative way to print source code [duplicate]

Possible Duplicate: Syntax Coloring in LaTeX I want to add source code of my program in document but verbatim really bugs me. All that ugly fonts and stuff.
1
vote
1answer
118 views

What is the LaTeX command or package that allows one to include command line examples in their document? [duplicate]

I am running a command and want to show the output in my document. I will simply cut and paste it. I know that the font must be different. What package or command is used for formatting command ...
2
votes
0answers
34 views

How to format a large text containing special Characters and breaklines? [duplicate]

I have this rather long text which is the output of a several console inputs. I'd like to have the text as it is as of right now. Here a link to the raw text since I didn't want to include it in this ...
95
votes
3answers
213k views

What can I use to typeset MATLAB code in my document?

This question led to a new package: matlab-prettifier Does anybody have a quick and easy way to typeset some relatively long MATLAB code in the appendix? I looked up a few methods, and the mcode ...
13
votes
3answers
10k views

How display LaTeX code in LaTeX document?

I'm making Beamer presentation. How I can display LaTeX code inside presentation?
0
votes
1answer
1k views

Small magazine style class: few questions? [closed]

I'm working on a simple TeX here based on KOMA-Script that I'm trying to customize. I don't want a thesis or a book, I'm trying to create a simple design, with header and footer information and text ...
5
votes
2answers
198 views

How to show < and > correctly in output?

I am trying to write some XML tags as part of my text but I can not get the < and > symbols to come out right in the output. What am I missing? I have tried both <tag> and \<tag\>, the ...
2
votes
1answer
248 views

How can I display nested lists (the programming-datastructure) in LaTeX?

I would like to write something in LaTeX, where I need nested lists. It should be displayed like this: segment = [ [ [0,1,0],[1,1,1],[0,1,0] ] [ [1,1,1],[1,1,1],[1,1,1] ] ...
1
vote
1answer
151 views

How to except code blocks from csquotes smart quoting?

\LaTeX newbie here. I figured out that csquotes can be used to automate smart curly quotes, and have added this to my preamble: \usepackage{csquotes} \MakeOuterQuote{"} This has the effect of ...
1
vote
0answers
65 views

Text editor highlighting in a verbatim-like environment? [closed]

This might be a long shot, but I'm planning to include a roughly 300-line block of python code as an appendix to my undergraduate thesis, and I was wondering if there's a way to make it display with ...