7k views

### How do I get selective bold in Verbatim? [duplicate]

I previously wrote a computer professional book in which I showed what the user typed on the console and the computer's resultant output. The way I liked to do this was with everything in courier and ...
824 views

### How to hide LaTeX commands and keywords in a listing? [duplicate]

Possible Duplicate: How can I highlight some lines from source code? How to hide LaTeX command (keywords) in a listing? When I use for example \textbf{} in the listing it appears as \textbf{}. ...
19k views

### Highlight text in code listing while also keeping syntax highlighting

I’m using the listings package for code listings. Now I try to highlight some part of the code using \hl from the soul package. Here’s an example of a resulting query where the injected part of a SQL ...
11k views

### How to make overlay still work inside lstlisting environment?

Problem I want to explain C# programming language step by step using overlay in beamer.cls. But it does NOT works as shown in the following figure. How to solve this problem? Code Snippet \...
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,...
2k views

In the paper "Beautiful Code Compelling Evidence", by J.R. Heard -- Code is formated in a particular way which includes margin comments. I am looking for a way to do this as I think it is a very clear ...
3k views

### How to define a new environment with a fancy box (tikz) around sample source-code (listings)?

This is what I want to do: \documentclass{beamer} \begin{document} \begin{frame}[fragile]{Frame 1} Some \structure{Python} code here: % I want to define a new "pythoncode" environment, so ...
8k views

### Using Beamer to step through an algorithm written in pseudocode.

I am trying to create a beamer presentation in which I would step through an algorithm, highlighting the current line in the algorithm on each slide. I know it is possible to do with the semiverbatim ...
4k views

### Use textit in listing

How can I use \textit in a listing? \documentclass[a4paper]{article} \begin{document} \begin{lstlisting}[label=test] Some code. \textit{This should be italic.} Some code. \end{lstlisting} \end{...
2k views

### How can I typeset Greek letters in listings?

Is it possible (and if yes, of course how) to use Greek letters within lstlisting (of the listings package)? However, \epsilon, for instance, puts of course exactly that and not a Greek epsilon. I ...
376 views

### Emphasizing some parts of string in lstlisting

I need to stress out some parts of string in lstlisting. I tried with \emph{}, but I got the verbatim result. Is there any way to that? \begin{lstlisting}[frame=single] Array1: 78 54 31 54 92 86 23 ...
1k views

### Can I mark specific lines in lstlisting?

I want to give listings and somehow mark a particular set of lines. My preference would be to make them italic. (The purpose of wanting to do this is so I can say "these lines are required but you do ...
140 views

### Color text inside lstlisting

So I've been looking for a way to color text inside a lstlisting. There are already several questions answere. E.g. here: How can I highlight some lines from source code? All solutions I've found ...