{highlighting} is about highlighting document elements. Use this tag in addition to other tags specifying what should be highlighted.

learn more… | top users | synonyms (1)

28
votes
3answers
16k 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 ...
70
votes
5answers
19k 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 ...
41
votes
8answers
9k 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} & ...
18
votes
2answers
2k views

Highlighting in Beamer using TikZ nodes

This question led to a new package: aobs-tikz 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 ...
17
votes
6answers
5k 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
2k 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 ...
38
votes
3answers
5k 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:
49
votes
6answers
11k 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?
34
votes
1answer
1k 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 ...
21
votes
3answers
5k 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
869 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 ...
14
votes
4answers
2k 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 ...
18
votes
2answers
5k 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 ...
14
votes
1answer
2k 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: ...
11
votes
2answers
991 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: ...
22
votes
2answers
8k 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 ...
15
votes
3answers
2k 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?
19
votes
2answers
4k 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 ...
20
votes
3answers
6k 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 ...
28
votes
3answers
9k 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 ...
20
votes
4answers
3k 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 ...
23
votes
2answers
537 views

Highlighting arbitrary chunks of text connected to quotes in margins - Can this be done in TeX/LaTeX?

I've got an idea and I'm wondering if it is possible to implement in TeX/LaTeX. The idea is I want to be able to associate arbitrary chunks of text on the page with a quote in the margin, and denote ...
12
votes
2answers
2k 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 ...
19
votes
2answers
3k 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} ...
19
votes
3answers
2k 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 ...
14
votes
2answers
5k 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 ...
10
votes
2answers
1k 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: ...
4
votes
1answer
223 views

Can the listings package be set up to highlight Prolog code like minted does?

I am interested to know how listings can be customized to mimic the Pygments's Prolog lexer (i.e. make Prolog code represented by listings look the same as it is done with minted) I previously asked ...
2
votes
2answers
271 views

How can I highlight text before a character with listing?

All is in the title. I would like to add a color to the text before a character with listing package. For example, I would like to add a color to text between the beginning of a line and : or =, in a ...
14
votes
2answers
1k 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
1answer
751 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 ...
7
votes
1answer
3k views

Beamer: highlighting aligned math with overlay

This question led to a new package: hf-tikz Minimal working example: \documentclass{beamer} \usepackage{amsmath} \begin{document} \begin{frame} \begin{align} a_i + b_j = 10 & ...
9
votes
3answers
1k 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 ...
8
votes
1answer
917 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 ...
7
votes
2answers
8k views

How to highlight table rows by colors in Beamer

I would like to highlight rows in tables, in rowwise, that is I would like to highlight row 1 in red, then make row 1 in black but row 2 in red, etc. How can I manage to do so in Beamer?
6
votes
1answer
2k views

Is there a good definition for highlighting PHP code in listings?

Does someone have a good definition for highlighting PHP code with the listings package?
4
votes
2answers
1k views

How to highlight operators and brackets in a C listing?

How can I apply a certain style to C (or, well, any other programming language) operators? So that when I write \begin{lstlistings}[language=C++] int i = 0; if(i > 1) { // do ...
8
votes
2answers
2k views

Beamer overlay box around text - the correct way?

I have something that "works," but I'm wondering if there's a more elegant solution. I want to box some text after an itemize in beamer, so this is what I'm doing: \documentclass{beamer} ...
7
votes
1answer
1k 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}} } ...
7
votes
2answers
919 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} ...
4
votes
1answer
332 views

wrapping inline long lines and adding background color

Objective I'm trying to achieve the following output. Here's the code I used to produce it. I had to hack it \begin{document} \begin{description} \item In ...
4
votes
3answers
777 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 ...
3
votes
1answer
89 views

Highlighting in tabular environment

I am trying highlight a row of matrices in a tabular environment. However, the left brackets of the matrices are gone. And I don't know how to fix this. In addition, how can I highlight 2 elements ...
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
3answers
2k 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 ...
11
votes
1answer
716 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
2answers
796 views

Fixing a code to highlight formulas and text on several lines

In this post I've found the following amazing code to highlight text on several lines. The problem is that code dosen't work well with formulas : for example, fraction using the mode display are ...
12
votes
2answers
784 views

Highlighting a .diff file

Is there a way to highlight the syntax of a diff file (i.e. by using the listings package)?
9
votes
3answers
2k 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#> ...
7
votes
1answer
2k 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 ...