{highlighting} is about highlighting document elements. Use this tag in addition to other tags specifying what should be highlighted.
8
votes
3answers
1k views
Ruby highlighter for LaTeX
I'm looking for a package that can highlight ruby source code in LaTeX. I've found this thread: http://stackoverflow.com/questions/1966425/source-code-highlighting-in-latex
But it is from 2009, and ...
14
votes
6answers
3k 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 ...
4
votes
1answer
562 views
\fbox inside listings
I am trying to highlight a specific line inside a listing with listinline. The code I am currently using looks like this:
\begin{lstlisting}[escapechar=!]
class A {
void m() {
B b = ...
...
6
votes
2answers
1k views
Listing: Syntax highlighting for SPARQL query?
I use the following listing to show a SPARQL query:
\begin{lstlisting}[captionpos=b, caption=SPARQL query, label=lst:sparql]
PREFIX java: <http://evolizer.org/ontologies/seon/2009/06/java.owl#>
...
6
votes
2answers
559 views
Red box drawn around question-mark operator in minted Erlang code
I'm trying to include some Erlang code samples in a document using the minted package which include the ? operator to denote a message being received from a process. The code
\documentclass{minimal}
...
18
votes
2answers
3k views
Highlight an equation within an align environment
I would like to define a command that puts a red box around an equation with yellow highlighting. I have the basics working pretty well. What I am unable to figure out is:
How to keep the alignment ...
7
votes
1answer
2k views
XML highlighting - different style for attributes
I need to highlight syntax in my LaTeX presentation, so i've found this answer:
XML syntax highlighting
\lstdefinelanguage{XML}
{
morestring=[b]",
morestring=[s]{>}{<},
...
7
votes
1answer
691 views
Inline comments in LaTeX
Is it possible to make inline comments in LaTeX that do not extend until the end of the line?
The actual problem I'm trying to solve is vim's annoying highlighting of the non-curly end-bracket here:
...
15
votes
2answers
2k views
Code spanning over two pages with minted, inside listing with caption
I am trying using minted to display some code in my document, but the code is long and spans over two pages, this works fine, however when I place my code inside
\begin{listing}
...
5
votes
3answers
1k views
Using keywords including a dot in the name with the listings package
I am using the listings package which works like charm in most cases.
I tried to define new languages for my needs with the help of morekeywords options in \lstset, but entering special keywords ...
20
votes
4answers
1k views
texdiff for multi-file documents in subversion
I've been looking for a convenient way to highlight changes between subversion revisions of my Latex document in the generated PDF. I am working on a reasonably complex document that pulls together ...
17
votes
3answers
3k views
How can I highlight some lines from source code?
I am preparing a presentation (using beamer) and I'll need to include many snippets of source-code. For including source code, I'll probably use listings package. (I know there is also minted package, ...
4
votes
2answers
521 views
pass “global” options to minted/fancyvrb
Is there a way to override default options for the minted environment, rather than having to specify them for each and every snippet of code ?
In other words, is there an equivalent to listings's ...
5
votes
1answer
682 views
Code highlighting in ConTeXt
What is the best way to highlight code when using ConTeXt? I am aware of support for specific languages, as described on the ConTeXt wiki, but it seems rather limited at present. I know that we could ...
4
votes
1answer
215 views
Cg Code in Latex
I am writing some document which contains Cg (C for Graphics) code in the document. I want to show the code in a neat highlighted mode. Any easy method to suggest? I tried the listings package but it ...
52
votes
5answers
8k views
Cool Text Highlighting in LaTeX
LaTeX has soul. ConTeXt, of course, has beautifully marked up "sharpie" highlighting, where you can put sweet hightligher under your text for free!
In the pictured example, you can see highlights ...
18
votes
3answers
1k views
Typesetting LaTeX Source Code with the listings package
I am writing some documentation for a LaTeX package, in which I am going to be including some example LaTeX code. What is the best way to typeset that code? I know I could just use verbatim, but it ...
2
votes
1answer
912 views
operator highlighting using listings
How to color (using listings package?) C (or, well, any other programming language) operators? So that when I write
\begin{lstlistings}[language=C++]
int i = 0;
if(i > 1) {
// do ...
18
votes
3answers
3k views
Highlighting table cells
I have a large (13x13) table in which I need to highlight a subset of cells. I know that I can set a background color to those cells using colortbl or xcolor. But I need to highlight the table without ...
9
votes
4answers
1k views
What is a good way to show changes between two versions
I would like to highlight changes between two versions of a LaTeX document.
I have both my versions in git. Is there an easy way of generating a output document where all changes are highlighted. So ...
21
votes
2answers
3k 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 ...
43
votes
6answers
7k views
Syntax Coloring in LaTeX
Is there any way to include Python code in a LaTeX file and automatically color its syntax? Is it possible to do syntax coloring with any other language? If yes what packages can I use to do that?
11
votes
2answers
1k views
Mark changes since last edition with bars in the margin
I would like to mark the parts of my document that have changed since the last revision with vertical bars in the margin. Is there a package to help with this?
Is there a tool that can compare two ...
