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

9
votes
3answers
895 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} ...
9
votes
3answers
2k 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 ...
7
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} ...
6
votes
2answers
350 views

Highlight \verb in inline text

I'm new in LaTeX and I'm searching for solution to highlight verbatim text inside paragraph (for example, it is like on this page, where code is highlighted). Can anyone help me with this? Let say, ...
6
votes
3answers
423 views

Putting a coloured background behind text without adding whitespace

Consider this: I want to be able to highlight text like this without adding space around it -- so each word in the first line should line up with the corresponding word in the second line. (I know ...
6
votes
2answers
4k 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 ...
5
votes
1answer
229 views

Highlighted Matrix with brackets

I would like to produce the matrix as shown in this figure: At the moment, I have this code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} ...
5
votes
1answer
224 views

Strange movement of objects when highlighted item in beamer is uncovered

Can anyone explain to me why there is this strange "shift" of objects when passing from the first to the second slide in the below MWE? \documentclass{beamer} \usepackage{beamerthemeshadow} ...
4
votes
1answer
161 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 ...
4
votes
1answer
285 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 ...
3
votes
1answer
6k 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} ...
10
votes
1answer
440 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 ...
9
votes
2answers
666 views

Highlighting a .diff file

Is there a way to highlight the syntax of a diff file (i.e. by using the listings package)?
8
votes
1answer
243 views

How to make \hl (highlighting) to automatically place incompatible commands in \mbox?

The soul package provides a useful command \hl for highlighting text. However, \cite, \ref, and some other commands (maybe equations too) must be placed within an \mbox in order for \hl to work ...
6
votes
1answer
710 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
699 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 ...
3
votes
1answer
79 views

Using soul with indirect formatting applied (using macro with 2 parameters, one possibly optional)

This is a followup to Using soul with indirect formatting applied, where it was determined that using \soulregister allows the soul macros to have font switching macros within the parameters ...
2
votes
1answer
219 views

disable syntax highlighting in kile

In the \verbatim environment, the syntax highlighting is disabled default, e.g. a $ ist not recognized as beginning of the math mode. I add my own environtment (\rawtext) to the kile Verbatim ...
2
votes
1answer
581 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
215 views

minted Environment Inside minipage Environment

I am having to use the minted environment inside a minipage environment quite often in my document. I wanted to write a new environment for doing this, but since minted isn't designed to be included ...
1
vote
1answer
731 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} ...
0
votes
0answers
65 views

\citep not working if natbib is in the master file

I am building a thesis with a master file and some included files. For example, let say master.tex contains \include{chap1}. The \citep command does highlight in master.tex but not in chap1.tex. I ...
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 ...
21
votes
1answer
460 views

How can I highlight ligatures?

I'd like to highlight all the ligatures used in a document similar to the image below as an attempt to show off some of TeX's tender loving care for the font being used. Is there a way to do this ...
14
votes
2answers
2k views

Set table background hatched and shaded using tikz

I am looking for a convenient way to set the background of tabular cells. I'd like to do two things: (1) Set the background shaded in a color (2) Set the background hatched I learned that the TikZ ...
15
votes
3answers
13k 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 ...
5
votes
2answers
4k views

How to adjust the beamer block width to the size of its content?

I would like to define a nice beamer block environment with the following properties a) it is always centered on the slide (horizontally) b) it is only slightly longer than its content The aim is to ...
20
votes
1answer
689 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 ...
7
votes
1answer
418 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 ...
13
votes
1answer
313 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 ...
11
votes
2answers
2k 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
2answers
165 views

Beamer: highlighting text with colored background through which surrounding text can be seen

On some slides I'd like to highlight some text by using a colored background, like so: I've exaggerated the width of the border around the text in this example to indicate the effect I want. I ...
9
votes
1answer
123 views

Using soul with indirect formatting applied

I am using the soul package to underline omitting the descenders. It seems that passing the following as a parameter works fine \textit{special text} but if the \textit is applied indirectly via ...
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 ...
18
votes
3answers
577 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 ...
8
votes
2answers
723 views

How to highlight (colorize) the syntax of configuration files (like .ini or .conf)?

I need to highlight the syntax of files containing lines with parameters and their values in LaTeX. Let's say I have a following file: # some comment parameter1 = value of parameter1 parameter2 = ...
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?
7
votes
2answers
92 views

Highlighting text through stacked colored underlines

I have sentences in which characters have been "marked" by some people and not by others. I'd like to present the markings simultaneously. Stacked colored underlining (in which a line represents each ...
5
votes
2answers
425 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 ...
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 ...
4
votes
2answers
663 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 ...
13
votes
1answer
530 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 ...
8
votes
1answer
171 views

How can I automatically highlight SuperCollider symbols and environment variables?

I've been poring over the listings manual, trying to figure out how to get some very specific types of formatting for the SuperCollider language. I need to highlight words where the opening delimiter ...
8
votes
2answers
275 views

How can I highlight an interactive GAP session just like so?

Suppose I want to typeset a screen session in some programming language (GAP in my case, but it could be Python, BASH, or something else with an interactive read prompt just as well). So on my screen, ...
6
votes
1answer
122 views

Defining font color inside highlight fails

Since I wanted a better readability of highlights of a would be black & white-printed document, I needed to change both the highlighting color (gray) AND the font color (white). Depending which ...
5
votes
1answer
389 views

TikZ callout pointing to nested nodes

In the following MWE I want to create a TikZ callout pointing to a node within a node. The outer node is for the highlighting environment \tikzMe the inner node is for the \tikzmark. Somehow I do not ...
4
votes
1answer
91 views

Latex find formatted text and print it at the end of document

I am currently coding my interview transcripts for qualitative research by highlighting sentences in different colours (using soul and xcolor packages). So, I want to print all text which belong to ...
4
votes
1answer
189 views

Highlight a prompt with the listings package

I use the listings package to typeset a series of commands in the language Octave (a free clone of Matlab) in my lecture notes. Most of the command lines look like this: octave:1> A=eye(4) A = ...
4
votes
1answer
677 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 = ... ...
3
votes
1answer
266 views

Markup Haskell sources in complex structured document with `lhs2TeX`

Simple task Suppose there is a example.tex file with Haskell listings: \documentclass{article} \usepackage{fancyvrb} \DefineVerbatimEnvironment{code}{Verbatim}{fontsize=\small} \begin{document} ...