{highlighting} is about highlighting document elements. Use this tag in addition to other tags specifying what should be highlighted.
36
votes
8answers
4k views
Highlight elements in the matrix
I have a matrix and need to highlight some elements in the matrix. I have found how to highlight a single element (I want to put the cell in the square):
$$ A = \begin{bmatrix}
\fbox{0} & ...
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 ...
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 ...
15
votes
1answer
1k views
Background coloring with overlay specification in algorithm2e + beamer package
I want to highlight some portion of my pseudo codes in my slides during the course of presentation. It's easy in powerpoint and I've made a sample slide:
However, I couldn't manage to get a similar ...
10
votes
2answers
606 views
Highlighting in beamer using TikZ nodes
Is it possible to alter the code in the following MWE to the effect that “ABCD” is visible on both slides but only on the second it has the red node as background?
\documentclass{beamer}
...
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?
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, ...
6
votes
1answer
554 views
How to redefine \lstinline to automatically highlight or draw frames around all inline code snippets?
How to redefine \lstinline to automatically highlight or draw frames around all inline code snippets? E.g. using \bh and \eh commands from Highlight text in code listing while also keeping syntax ...
10
votes
2answers
647 views
Issues and potentiality of the tikzmark macro: dynamic box adaptation
Since I discovered the tikzmark macro I've been enthusiastic about it.
I think that it is possible to distinguish at least two versions of the command:
a basic one (two examples: ...
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 ...
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 ...
12
votes
1answer
978 views
Mark a pseudocode block and insert comments near it
I am currently working on a LaTeX beamer presentation where I have to explain an algorithm. So I wrote this algorithm with
\usepackage{algorithm,algpseudocode}
This is the current algorithm:
...
27
votes
3answers
1k views
How to create Highlight Boxes in LaTeX?
I am writing an Article in LaTeX.
Please suggest me how to create a highlight boxes like the ones shown below in LaTeX:
28
votes
1answer
608 views
Hobby path realization in convex hull approach
Motivation
In the answer
Highlight a group of nodes in a tikz tree, Jake suggested combining the convex hull approach from padded boundary of convex hull with the hobby path and I was really ...
18
votes
2answers
4k 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 ...
18
votes
2answers
1k views
\boxed{}, TikZ and colored equation background
I wonder if someone could provide me with a simple MWE for using TikZ together with \boxed to produce a colored equation background. If possible with rounded corners.
I am using \boxed{} inside the ...
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
3answers
1k views
Underline my name in the bibliography
For several documents I'm preparing, I need to highlight (or underline) occurences of my name within the bibliography.
Is there an easy way of doing this?
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 ...
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 ...
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}
...
10
votes
2answers
544 views
soul: broken highlighting with xcolor when using \selectcolormodel
I try to highlight text using the soul package.
But I experience problems if I use it in combinations with the xcolor
command selectcolormodel, only spaces are highlighted as shown in the MWE:
...
9
votes
3answers
583 views
How to highlight a single element in a matrix?
I am trying to write out the LU decomposition of a matrix A. I am able to highlight the pivot column with elements below the pivot element except when I get to the last column. Does anyone know how I ...
7
votes
1answer
591 views
Listings package: How to highlight math operators?
I am using the listings package to include GAUSS code to Latex.
E.g. like this:
\lstset{
emph={proc,retp,endp,local}, emphstyle=\color{blue}\textbf,
emph={[2]=,.^,./,=}, emphstyle={[2]\color{red}}
}
...
5
votes
1answer
683 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 ...
6
votes
2answers
568 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}
...
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 ...
16
votes
4answers
2k views
Highlighting specific parts of a TikZ drawing
Friends, sometimes during an automata keynote, I have to present a string recognition step-by-step example. Please consider the following TikZ code:
\begin{tikzpicture}[shorten >=1pt,node ...
10
votes
1answer
525 views
Highlight a column in equation or math environment
While explaining the idea product of two negative numbers I wanted to highlight a vertical part of the display to emphasize on the factors that are being multiplied by:
...
9
votes
1answer
558 views
Highlighting line ranges in a lstlisting: partial solution, but expansion issues
In my quest for a better solution for How to change appearance of a particular line when using \lstincludelisting, I came across the linebackground= option Martin Scharrer added to the listings ...
6
votes
1answer
1k views
Beamer - Source code highlighting/annotation tips
How can I highlight and annotate source code in a beamer presentation like this one? For example, consider the following image from that .pdf file:
It looks to me that above presentation is made ...
11
votes
2answers
449 views
Highlight a group of nodes in a tikz tree
To make it simple, I want to highlight a group of tikz nodes like in the following picture
It was borrowed from the JLatexEditor. I would like to know which Tikz commands I can use to do the job in ...
9
votes
2answers
2k views
How to highlight important parts (with a gray background)
In the below link
http://www.math.uiowa.edu/~goodman/algebrabook.dir/bookmt.pdf
the author highlights anything which is important using a greyish color background. For example, if you see ...
2
votes
1answer
3k views
Package listings: Error “Undefined control sequence.” because of single-quote-symbol?
I'm using the package listings and came across a problem displaying an SQL statement within an java environment. This is the MWE.
\documentclass[]{report}
\usepackage{listings}
...
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 ...
6
votes
1answer
498 views
Custom command inside soul package's \hl
I'm having trouble with the soul package and its \hl command. The soul package's manual says I should not nest soul commands, which I didn't. \textsc works inside \hl. However, the following throws an ...
5
votes
2answers
285 views
Highlight an equation within an align environment with color option
I'd really like to do exactly what's being asked for in this question: Highlight an equation within an align environment, but with the ability to change the color when I call it, so that I could have ...
5
votes
2answers
2k views
Unix Command Highlighting latex
Is there any what I can easily show commands in latex? I am currently using:
\indent\indent\footnotesize{\# apt-get --purge remove rubygems} \\
But this isn't showing a very good disctintion ...
3
votes
3answers
425 views
Highlighting some nodes of a TikZ binomial tree
In this binomial tree I have 4 columns of nodes.
I want the entire last column to be highlighted with light blue, and perhaps a border around this highlighting. Something like a opaque blue-ish ...
2
votes
1answer
107 views
Syntax highlighting for different programming languages [duplicate]
In my paper I want to include some source codes with colored sytax. For syntax highlighting I use the listings package:
\lstset{frame=tb,
language={[Visual]Basic},
aboveskip=3mm,
belowskip=3mm,
...
1
vote
1answer
357 views
Hightlight an XML code beamer
To hightlight an XML code I have refer to XML syntax highlighting, so I write:
\documentclass[10pt]{beamer}
\usepackage{listings}
\usepackage{color}
\definecolor{gray}{rgb}{0.4,0.4,0.4}
...
30
votes
4answers
805 views
Highlight First Occurrence of a Particular Word
I'm writing a scientific paper, and in this paper, I present a series of new terms. The first time a new term is presented, I would like LaTeX to automatically highlight this - e.g. by using italics ...
12
votes
3answers
758 views
Color box with rounded corners around a fragment of a formula
Is there any way in TeX to highlight some part of a formula with a box having colored background and rounded corners?
At present, I need to export such formulas into an image, add those highlight ...
20
votes
1answer
529 views
Highlight equations in a typographically correct manner
I am presenting a model composed of a dozens of equations, some of
them requiring a somewhat lengthy derivation.
The equation that continue the actual model appears progressively
along the derivation ...
19
votes
3answers
3k views
How to highlight an entire paragraph?
I'd like to highlight paragraphs such that the highlight color appears as one whole rectangle underlying the entire paragraph. I have looked around but nothing gives me the desired effect so far.
For ...
12
votes
1answer
228 views
highlights path sequentially BUT in order of clicking
I have been looking for a possibly difficult answer to a simple question. I would like to be able to highlight paths on a TikZ picture. I would like to highlight these paths by clicking on them and at ...
6
votes
1answer
314 views
Mark (highlight) a paragraph (\item{…}) with a squiggly line for later attention
I'd like to mark one or more of my \item{...}'s in an enumeration with a squiggly line at the right so that I can easily see which parts I have to re-phrase/re-write later on. All I have found is how ...
18
votes
3answers
490 views
Visually highlighting symbolic material
I have a diagram in which I need to indicate the difference between symbolic mathematics and English words (potentially to someone who doesn't know about it):
Colour works beautifully for making ...
11
votes
2answers
975 views
Highlight table cells using thick, colored border
I'd like to highlight certain cells of my table. In particular, I'd like to set the border of these sells colored and thick. These cells should also have a background color.
Here's a minimal example ...
9
votes
3answers
521 views
Enumerated text and formula with background color
I want to have an enumeration with text and formulas with a background color, but \colorbox does not work, here's my code:
\documentclass{book}
\usepackage{xcolor}
\usepackage{shadethm}
...
