{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)

41
votes
8answers
8k 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} & ...
65
votes
5answers
16k 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 ...
23
votes
3answers
13k views

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

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 package emerged as a possibility, but it seems to be ...
17
votes
2answers
1k 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
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 ...
37
votes
3answers
4k 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:
48
votes
6answers
10k 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?
33
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 ...
20
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
803 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 ...
13
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 ...
11
votes
2answers
894 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
7k 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 ...
14
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
3k 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 ...
13
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: ...
20
votes
3answers
5k 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
8k 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 ...
11
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 ...
18
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} ...
19
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 ...
14
votes
2answers
4k 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
926 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: ...
19
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
514 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 ...
13
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
698 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
991 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
869 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
6k 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?
7
votes
1answer
971 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
837 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} ...
5
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
3answers
646 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
82 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 ...
2
votes
2answers
233 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 ...
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
682 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
731 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 ...
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#> ...
11
votes
2answers
665 views

Array cell highlighting tikz

I'm beginning to write up a PhD thesis and am pretty new to LaTeX. I'm trying to explain a numerical method I'm using and in doing this I wish to highlight sections of arrays to aid explanation. The ...
10
votes
1answer
658 views

Why is it that coloring in soul in beamer is not visible

\documentclass{beamer} \usepackage{soul,color} \begin{document} \begin{frame} \hl{Hello World} \end{frame} \end{document} I process this with pdflatex and I do not see the expected highlight. ...
8
votes
1answer
410 views

How can I highlight YAML code in a pretty way with listings?

I'm trying to highlight simple YAML (the markup language, not the CSS framework) code. I know that there is a solution using pygments and minted, however, I would prefer a solution with ...
7
votes
2answers
306 views

Highlight and use arrows in an equation In a robust manner

I am trying to give a very simple analogy to what I am trying to do with LaTeX. I simply want to write two vectors, one below or next the other, and then, use nodes to link the last two elements of ...
6
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 ...
4
votes
1answer
2k views

How to highlight paragraph (linebreak preserving) as well as itemize, tabular etc.?

I want to highlight changes which are introduced by myself in the pdf document. So far the soul package is very neat but it does throw errors when I want to highlight not only paragraphs but also some ...