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

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?
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 & ...
7
votes
1answer
457 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 ...
2
votes
1answer
793 views

Highlight changes in a specific entry of a reference list created with biblatex

I would like to highlight changes in a specific entry (or even a part of the entry) of a reference list created with biblatex, e.g., by changing the font color to red. (Unfortunately such a feature is ...
6
votes
1answer
570 views

vim-latex with strange (unwanted) highlighting [closed]

I'm using vim with the latex-suite package installed on Ubuntu 11.10 to edit LaTeX files. The latex-suite highlights the LaTeX source as I edit it, but it seems to get very confused after something ...
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 ...
6
votes
2answers
516 views

How to highlight all identifiers starting by '@'?

I would like to highlight any expression made of letters and that starts with one @. The use of moredelim=*[s][\color{blue}]{@}{\ } works only in case like @name is followed by one space. The ...
34
votes
4answers
1k 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
2answers
781 views

Highlighting a .diff file

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

Syntax: De-highlighting Certain Commands in TexShop

There seem to be commands of various quality. A command like \section has some structural effects and differs considerably from commands like \dots or author-defined shortcuts (for example \eg for ...
6
votes
2answers
5k 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 ...
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 ...
7
votes
1answer
1k views

How do I get colorized syntax highlighted code in pdfLaTeX

I'd like to get syntax highlighted code in LaTeX, but want to preserve the monospaced font (no curly quotes either). pygments doesn't seem to have an option to avoid curly quotes that I could find. ...
7
votes
2answers
405 views

Syntax Highlighting for Plain TeX

I would like to find out what options there are for applying syntax highlighting to Plain TeX, to turn Plain TeX documents into highlighted HTML. The aim is to facilitate sharing tracked changes to ...
6
votes
2answers
2k views

labeling underlined text over multiple lines

I have a large number of documents I need to create, and there is one very particular need I cannot find a solution for. In these documents, there are pieces of text that are underlined and they ...
4
votes
1answer
448 views

Beamer: How to do src highlighting when src is split with \only<> command? [duplicate]

Thanks to Marc van Dongen there is a template of a "step by step" programming tutorial (with a sample layout in his question): How to create step by step annotated programming tutorial in LaTeX? . I ...
18
votes
1answer
322 views

Vim Configuration for expl3

I've started with programming in expl3 and vim doesn't realise that underscores are now part of LaTeX identifiers. I'd be much obliged if somebody could explain how to best configure vim so it has ...
4
votes
1answer
1k views

Adding a highlight to \texttt blocks

I'm trying the add a grey highlight to the \texttt command to essentially achieve the same effect as the code blocks on here. This is something I attempted to do when I first started writing my ...
2
votes
1answer
829 views

Using “listings” package to colorize the source code of ANTLR grammar file?

I use listings package in my diploma thesis for source code. Besides the mainstream languages like Java and C# I also need to include the sources of the language grammars (.g) which are pure mark-up ...
10
votes
1answer
727 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. ...
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} & ...
13
votes
1answer
572 views

Highlight passages from the body as quotes between the paragraphs

In newspaper and magazine articles, striking messages from the main text are often highlighted in form of quotes in larger font size, sometimes also set apart by a bold rule or so. For an article I am ...
15
votes
3answers
15k views

Piecewise highlighting in beamer presentation

I would like to do the following with beamer: All items of an itemize environment should be displayed in gray. The current item should be highlighted in black while all others remain grayed out, but ...
1
vote
0answers
113 views

Print programs with its proper syntax by minted [closed]

I have post a question several weeks ago: Print programs with its proper syntax, and I finally decided to use the package minted. I summarize a little bit my needs here: the language I define has its ...
4
votes
1answer
243 views

How to highlight a non-ascii keyword using the listings package? [duplicate]

I'm trying to highlight a couple of keywords which contain non-ASCII characters using the listingsutf8 package. This is the relevant part of my document: \usepackage[brazilian]{babel} ...
3
votes
2answers
406 views

How to emphasize the character '&' within a listing?

How do I emphasize with the listings package the column separators in a tabular environment? This is my MWE: \documentclass{article} \usepackage{lmodern} \usepackage{graphicx} ...
2
votes
1answer
318 views

Force minted to insert new space in code that won't fit on the page

Essentially I would like to have listings' breaklines option on minted. I can't seem to find it. I could manually insert new lines but it becomes difficult when the code comes from an external file.
5
votes
1answer
973 views

Circle around content of a table: is it possible?

I managed to create three tables with letters in it: \begin{minipage}{0.37\textwidth} \begin{tabular}{c | c | c | c | c} E & G & P & A & L\\ \hline I & I & U & G & F\\ ...
1
vote
1answer
235 views

Print programs with automatically generated line numbers and tabbing

I have post a question several weeks ago: Print programs with its proper syntax, and I choose to use tabbing package at the moment. Now I really need to keep the tabbing and print a line number ...
2
votes
0answers
149 views

TortoiseHg with word diffs and LaTeX [closed]

I am having a hard time figuring out how to configure TortoiseHg to do colored word diffs for my TeX and LaTeX documents. I found the following two threads How to use Mercurial for version control ...
3
votes
0answers
431 views

Syntax highlighting blocks of code with LaTeX and literate programming tools [closed]

Using packages like minted (thanks to Pygments), LaTeX can generate beautifully highlighted/colored source code. Literate programming tools such as noweb and cweb can generate beautifully typeset and ...
5
votes
1answer
3k views

Fortran syntax highlighting in listings

I've got some Fortran 90 source code I want to put into my thesis appendix. For this I'm using the listings package. Is it possible to have colored syntax highlighting for the Fortran code?
3
votes
1answer
385 views

Highlight entries in Table of Contents with coloured rectangles using TikZ an tocloft

The solution presented in How to highlight specific entries in a tocloft-formatted ToC did not work for colored background. There is a problem when using color because the colored rectangles are ...
4
votes
1answer
325 views

What does a number followed by “ in” mean?

The TeX syntax highlighter that I use colors all occurrences of a number followed by " in", e.g. 0 in or 32 in in a dangerous bright red, in almost all contexts. Why?
0
votes
1answer
369 views

Highlighting line ranges in listings

I've put here one adaptation for "no-beamer" documents of this code. Thanks a lot for the indications given below by Daniel. % Sources : % 1) ...
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 ...
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 ...
2
votes
1answer
380 views

Using pdfliteral to highlight text

Using pdfliteral, one can color text like the following: w1_prev = node.new("whatsit","pdf_literal") w1_prev.data = "q 1 0 0 rg" w1_prev.mode = 1 w2_prev = ...
3
votes
1answer
432 views

Loading babel with the 'hungarian' (magyar) option breaks 'pygments' code highlighting

Given the following TeX file everything works as expected: the (Hungarian) text Árvíztűrő Tükörfúrógép typesetted as expected and the code snippet also formatted brilliantly. \documentclass{article} ...
4
votes
2answers
1k views

Undesirable highlighting of a keyword name (dh) occuring within an identifier (0dh)

I'm using the x86masm dialect of Assembler and register names are emphasized even when they occur inside of a label or a hexadecimal number. For example, dh is register, but 0dh is a number, yet the ...
1
vote
1answer
553 views

Highlight foreground text using overpic?

I am using the overpic package to edit a pre-created pdf by writing notes in between the lines using \put(){$$} for each line. Im having difficulty however using the soul package and \hl to ...
2
votes
1answer
2k views

How to highlight own keywords in HTML lstlistings?

I would like to highlight some words in a lstlisting. The language is HTML. However, \emph seems not to be working with HTML. Any suggestions how I could work around this problem? Right now I have: ...
8
votes
3answers
3k views

Highlight environment by setting a gray background color

The title explains everything. I have a theorem with ntheorem and want to highlight it with a gray background color. What would be the easiest way to achieve this?
9
votes
2answers
795 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 ...
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 ...
10
votes
1answer
448 views

How to highlight specific entries in a tocloft-formatted ToC

I am writing a document using the book class, and I use tocloft in order to customize the appearance of my ToC. So far, the package did a great job for most customizations, except for one thing: I am ...
3
votes
2answers
1k views

Emphasizing a string in code example using showexpl

I am writing documentation for a package using the showexpl package which in turn uses the listings package. When using listing I can highlight a portion of the code like this: ...
10
votes
1answer
11k views

Highlight in beamer in the table of contents the line corresponding to the forthcoming section

I am preparing a presentation with beamer. Before each new section I show the table of contents. I wonder how can I somehow highlight the line of the table of contents with corresponds to the new ...