{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
1k views

Texworks syntax highlighting not working on windows 8 and 8.1

any latex code I want to view in TexWorks 0.4.5 r.1280 (Miktex 2.9) won't show the syntax highlighting. It compiles just fine but everything line is written in black. On very long documents the ...
9
votes
2answers
295 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 ...
3
votes
1answer
91 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 ...
9
votes
1answer
1k 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 ...
0
votes
0answers
91 views

Indented Code Blocks Have no Background Color When Generating PDF

As the title says, when I run: pandoc -o book.pdf book.md The code blocks show up in monotype font but with no background color. I've also tried all styles using --highlight-style with no success. ...
4
votes
1answer
300 views

Change selection color in TeXShop

I'm working with TeXShop (Mac OS) and I want to change the color of text selection. If I want to search for special words with CMD+F, the program highlights the text in a light gray color... Every ...
5
votes
1answer
301 views

tikz node with listing environment

I'm trying to create a c++ class hierarchy. Each node in the hierarchy is a class description with code listing in it and multiple nodes are connected by lines and arrows depicting the hierarchy. I'm ...
3
votes
1answer
97 views

Making comments stand out when using Sweave and R

Is there any way to bold or highlight all comments when using Sweave? Maybe a command to make all lines starting with # be bolded? <<>>= # I want this to be bold automatically @
11
votes
1answer
216 views

How can I typeset LaTeX source code with this very specific syntax highlighting? [closed]

I want to put some LaTeX source code in my PDF output with the style like this: Color in text mode is white, in math mode is yellow and in comments is grey. For control sequences, I divide it into ...
5
votes
1answer
236 views

Code highlighting for imported source files

I have several source code files that I would like to include in my document. I know that I can use verbatiminput to get the lines from the file, and use lstlisting to highlight the code, but I ...
2
votes
1answer
167 views

Misplaced \noalign error in table, but only when using include{}

I am using xtable() in R to create a LaTeX table that I import into a .rnw file via \input{}. As documented here, I am attempting to highlight rows conditional upon a certain value of one variable. ...
11
votes
2answers
552 views

Table using booktabs and cellcolor looks ugly

When using \cellcolor in a booktabs table, I find that the output is not really appealing: I don't really care that the colored cell does not touch the lines above and below (cf. Coloring columns ...
0
votes
0answers
30 views

Allow line breaks in highlighted text [duplicate]

When I highlight a bit of text using \colorbox, it prevents line breaking. How does one give tex permission to break lines? Example: \documentclass{article} \usepackage{color} \begin{document} ...
4
votes
1answer
464 views

Underline text with background (soul and ulem nesting)

I'm using soul's \hl to set background for the paragraph parts and ulem's \uline to underline text. The problem is what I cant underline text for text with background. Initial doc: ...
2
votes
1answer
201 views

TeXstudio: How to highlight text in \emph or \textit command, for example?

Is there a way to configure TeXstudio so that emphasized text will display in the editor in italics, for example: \emph{some text} The custom highlighting seems to apply only to environments or ...
2
votes
1answer
45 views

Indicate an “added entry to the index” in the main text

I'm writing a text with many index entries: Variable $\Kappa$\index{Kappa@$\Kappa$} is used to ... I'd like to see a hint in the main text, that an entry was added to the index. I tried using ...
5
votes
1answer
7k views

Highlight, textcolor, and boldface simultaneously

I would like some portion of the text to have all three features but it's not compiling. It works two at a time but not with all three. \hl{\textbf{foo}} \hl{\textcolor{red}{foo}} ...
4
votes
1answer
176 views

Color lines in source code that is embedded in LaTeX

I am looking for a way to mark some lines in a source code sample that will be integrated into my LaTeX code. I already found solutions to embed source code and have syntax highlighting like this ...
3
votes
0answers
154 views

Is TeX the only document creator with syntax highlighting? [closed]

Is there any other document creator software other than TeX (word processor, DTP, webapp etc.) that can include syntax highlighted source code in a number of programming languages? For me it seems ...
8
votes
1answer
861 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 ...
2
votes
0answers
122 views

Grey box around the text [duplicate]

I have to write a newenvironment, which plots a grey box around the text. I can't decide which package I should be use. I am writing a dissertation and I want that some text sections have a grey box ...
7
votes
2answers
287 views

How to make a semi - shading stripe in resume with LaTeX

I want to make some semi-shading strips in resume to highlight each field, like this image: However, the template code which I use is as below: \newcommand{\resitem}[1]{\item #1 \vspace{-2pt}} % ...
2
votes
1answer
120 views

Using latexdiff to highlight changes: alternatives for soul?

I am using latexdiff to create a pdf that highlights changes between two .tex along with hg diff latex, so as to use with Mercurial. However, the problem is that the the strikethrough formatting ...
2
votes
0answers
180 views

How to highlight words or sentences? [duplicate]

I would like to create something similar to . To begin with, I would like to create a rounded and background-colored highlight of a word (or a short series of words). What package should I use ? ...
3
votes
1answer
2k views

lstlisting: Syntax highlighting for C++ like in Editor?

i want to insert some C++ code into my thesis and i tried tons of options to make the code look like in my editor. Here is what i have so far: \usepackage{listings} \usepackage{color} ...
6
votes
1answer
153 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 ...
8
votes
1answer
365 views

Why does Vim highlighting treat _a differently than _b in math mode?

I am not using vim-latex, just the regular vim syntax highlighting for latex. To make sure of this I tested this by running: vim -u NONE -N I notice that if I am in math mode "f_a" will display ...
2
votes
1answer
2k views

Highlight some words of a beamer

If I want to highlight some words of following frame: \begin{frame} \frametitle{Paragraphs of Text} Sed iaculis dapibus gravida. Morbi sed tortor erat, nec interdum arcu. Sed id lorem lectus. ...
8
votes
2answers
308 views

How to highlight tree levels

How can i highlight tree levels to be some thing like that... I've drawn my tree with this code \documentclass[landscape]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} ...
0
votes
0answers
25 views

Highlighting text with citations and references [duplicate]

I was using the package soul to highlight text. It is pretty good, except for the fact that I get errors when I try to highlight a block of text with references or a citation. For example: ...
4
votes
2answers
898 views

How Do I Highlight Table Rows in beamer, Piecewise?

I would like to know how to highlight rows within a table in beamer, piecewise, so that when I present the piece, I can originally have no rows highlighted, and then the first, and then both the first ...
2
votes
1answer
95 views

Correctly highlight long ToC entries using TikZ without pagenumbers

Using this answer, I have highlighting for chapters in my Table of Contents. For long chapter names, however, the box is wonky, because P1.north west and P1.north east do not span the entire line: ...
1
vote
1answer
153 views

Syntax highlighting for SPARQL query in a listing? (works fine in minted environment but not in listing with mint)

I can do syntax highlighting in the minted environment, for any SPARQL query using this Pygments lexer thanks to this answer. My problem is how to get SPARQL syntax highlighting to work with mint in ...
2
votes
0answers
111 views

Deciding whether to end a line with a character or not in lstlisting [closed]

I need to write a document where there are written inputs and outputs of unix command line interface software (through bash). For example I need to show something like: $ git log --pretty=format:"%h ...
5
votes
0answers
257 views

legend problem in highlighting a data plot

I followed the tips on highlighting in data plots at http://www.howtotex.com/tips-tricks/highlighting-in-tikz-plots/ The highlighting does not work well with \addlegendentry. A MWE is shown below. ...
2
votes
1answer
544 views

listings doesn't print my keywords bold in lstlisting

I've got the following problem: I want to print a listing with the listings package and lstlisting: \documentclass{scrreprt} \usepackage{listings} \begin{document} ...
4
votes
1answer
565 views

Beamer highlight only a part in an itemize frame

How could I highlight only certain points in itemize environment. The examples I found here shows other parts also highlighted in the next slide. What I want is a single slide with one part ...
4
votes
1answer
295 views

lstlistings - How to highlight single quotes og keywords

I want to highlight some keywords in a listing. One keyword has an apostrophe. I searched and read already quite some time and found a couple of postings that textcomp could be very helpful for ...
2
votes
1answer
134 views

highlight the desired item

How can I mark any desired item/statement in red circle/ oval mark as shown in this slide. Can it be animated too?
2
votes
0answers
160 views

Highlighting extremal values in table when all values are not the same data type

I have a table generated by pgfplotstable, and would like to highlight the maximum value in each row for a particular number of columns. Here is a simple, completely made up, example that should ...
2
votes
1answer
117 views

Highlight smallest number in table

I would like to highlight the smallest number in each row. How would I go about doing this. In the following for example, would like to highlight 3 and 3. \documentclass{article} ...
3
votes
1answer
89 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 ...
9
votes
1answer
138 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 ...
9
votes
2answers
208 views

How to get listings that both feature line breaking of long identifiers and keywords highlighting?

I'm currently writing a book chapter in bioinformatics, and I would like to provide my readers some useful command lines to invoke recent software. To that purpose, I'm using the listings package to ...
3
votes
2answers
2k views

Syntax highlighting in listings for C# that it looks like in Visual Studio

Community, I want to get my C# listings syntax highlighted like in Visual Studio but I did not get it so far. Here's an image of the syntax highlighting of Visual Studio: Here is the code I have: ...
4
votes
1answer
95 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 ...
3
votes
0answers
108 views

Highlight LaTeX code and presenting results as in a manual [duplicate]

I would like to write a short guidelines of LaTeX for my students. In the spirit of some LaTeX manuals, I'd like to present the code and the result as follows, This example illustrate more or less ...
8
votes
2answers
373 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
248 views

pdflatex removes highlights in the included PDF

I have a figure in the PDF format and there are some texts in the figure (pdf) are highlighted. However, when I include this PDF file into latex document, the highlights are automatically removed. Do ...
0
votes
2answers
145 views

auctex, direct speech highlighting

How can I achieve a proper highlighting in auctex/emacs? I use the german guillemets (chevrons), but the highlighting is just revers as I would use the real (french) guillemets. He says: ┬╗Who are ...