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

4
votes
1answer
424 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 ...
17
votes
1answer
308 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
783 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
660 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
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} & ...
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 ...
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 ...
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
229 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
384 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
297 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
872 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
230 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
143 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
396 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
373 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
302 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
355 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
699 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
804 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
370 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
392 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
947 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
526 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
1k 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
734 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 ...
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 ...
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 ...
3
votes
2answers
973 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: ...
9
votes
1answer
10k 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 ...
0
votes
1answer
496 views

Package or tool for visualizing differences [duplicate]

Possible Duplicate: What is a good way to show changes between two versions I done a bunch of updates in an article. I have a copy of an old revision of the paper. Now I would like to ...
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 ...
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 ...
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?
7
votes
4answers
681 views

Representing linguistic text annotations in LaTeX

I'm writing a document describing the semantics of opinion phrases in English, and in order to do so, I'm annotating particular spans of text as having particular semantic functions within the ...
7
votes
1answer
825 views

listings package - Can I include a backslash \ in language keyword (\begin) for syntax highlighting in LaTeX code?

I want to highlight a LaTeX code (including backslash \, e.g. \begin). Unfortunately, by default a LaTeX listings package does syntax highlighting only keywords WITHOUT back slash (e.g. begin).
7
votes
1answer
974 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}} } ...
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 ...
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 ...
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 = ... ...
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
2answers
840 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} ...
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 ...
9
votes
2answers
3k views

XML highlighting - different style for attributes

I need to highlight syntax in my LaTeX presentation, so i've found this answer: XML syntax highlighting \lstdefinelanguage{XML} { morestring=[b]", morestring=[s]{>}{<}, ...
8
votes
1answer
1k views

Inline comments in LaTeX

Is it possible to make inline comments in LaTeX that do not extend until the end of the line? The actual problem I'm trying to solve is vim's annoying highlighting of the non-curly end-bracket here: ...
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} ...
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 ...