Skip to main content
97 votes

Highlight, textcolor, and boldface simultaneously

\documentclass{article} \usepackage{xcolor} \begin{document} ~\\ \colorbox{pink}{highlight}\\ \colorbox{green}{highlight}\\ \colorbox{yellow}{highlight}\\ \bfseries\colorbox{pink}{highlight + boldface}...
SDrolet's user avatar
  • 4,988
26 votes
Accepted

How to remove box outlines around parenthesis/brackets in TexStudio?

I found the answer myself. These boxes are called placeholders. They can be removed by going to Options > Configure TexStudio. Then on the bottom left check Show Advanced Options. Go to the Completion ...
jkrod's user avatar
  • 603
23 votes

How to create Highlight Boxes in LaTeX?

awesomebox provides some default "highlight boxes", but this can be extended: \documentclass{article} \usepackage{awesomebox} \usepackage[nopar]{lipsum} \begin{document} \lipsum[1] \notebox{\...
Werner's user avatar
  • 606k
19 votes
Accepted

\hl command is underlining instead of highlighting

If you include the package color or xcolor it will highlight the text background. \documentclass{article} \usepackage{soul} \usepackage{color} \begin{document} \hl{\$ 10} \end{document} Using \...
chrisma's user avatar
  • 1,239
18 votes

How to remove box outlines around parenthesis/brackets in TexStudio?

The boxes are placeholders. You can navigate between them using Ctrl+Left/Right. They vanish, if you type over them e.g. if the cursor is before a closing bracket placeholder ), typing ) will move ...
Tim Hoffmann's user avatar
  • 11.2k
16 votes
Accepted

How to highlight citations in a revised manuscript

I don't know your other reasons for using the soul package, but doesn't the xcolor package suffice? Moreover, if I read the author's instructions correctly, you can also choose to use just a different ...
gernot's user avatar
  • 49.9k
16 votes

How to highlight citations in a revised manuscript

You only need the "soul" and "color" packages for this to work. Inside the "\hl{...}" command, instead of just putting in "\cite{...}", type "\mbox{\cite{.....
Emma Bai's user avatar
  • 181
15 votes

Cool Text Highlighting in LaTeX

This is an old question, but recent question linked to it, so well... The image in the question is from a blog post of mine. Due to some visual artifacts, Andrew thought that the highlighting looked "...
Aditya's user avatar
  • 62.6k
14 votes
Accepted

Customizing latexdiff default (UNDERLINE) output styling

There is no standard option to do this, but you can create your own preamble file for latexdiff to replace the highlighting commands. All you need to do after a standard run of latexdiff is to copy ...
Andrew Swann's user avatar
  • 96.1k
14 votes
Accepted

Highlight/color a part of text in block in beamer

You can apply the answer https://tex.stackexchange.com/a/41693/36296 to your problem: \documentclass{beamer} \usepackage{soul} \makeatletter \let\HL\hl \renewcommand\hl{% \let\set@color\beamerorig@...
13 votes

Add keyword to language in minted

Since I only needed highlighting for one word and couldn't find any quick solution (and didn't want to rewrite the entire highlighting), I came up with this (ashamingly) dirty workaround: Firstly, ...
cabeer's user avatar
  • 131
13 votes
Accepted

Turn off highlighting (or any package)

You can redefine the commands from the soul package that you use to do nothing. With highlighting: \documentclass{article} \usepackage{color,soul} \setulcolor{red} \sethlcolor{blue} \begin{document} ...
gernot's user avatar
  • 49.9k
13 votes
Accepted

Annotating a table with arrows

You can draw with TikZ. \documentclass[tikz,border=5mm]{standalone} % put a row of 8 elements \newcommand{\putrow}[9]{ \path (0,#1) node{#2} ++(0:1) node{#3} ++(0:1) node{#4} ++(0:1) node{#5} ++(0:1) ...
Black Mild's user avatar
  • 17.9k
12 votes

How to create Highlight Boxes in LaTeX?

\usepackage[most]{tcolorbox} %textmarker style from colorbox doc \tcbset{textmarker/.style={% enhanced, parbox=false,boxrule=0mm,boxsep=0mm,arc=0mm, outer arc=0mm,left=6mm,...
Teoman's user avatar
  • 221
12 votes

Highlight elements in the matrix

easybmat offers an alternative syntax for math tabulars and also includes the command addpath which allows to draw a path between matrix elements. BMAT syntax is \begin{BMAT}{ccccc}{ccccc}...\end{...
Ignasi's user avatar
  • 137k
12 votes

Cool Text Highlighting in LaTeX

Well, this is an old question, but some issues remain unsolved, so I'm trying my hand here. This is a variation of Antal Spector-Zabusky's answer in which I try to handle some of its problems, namely ...
gusbrs's user avatar
  • 14k
12 votes
Accepted

Is there some way put boxes around matrix elements without too much effort?

Here is TikZ proposal using fit. I've wrapped the code in a command I've called mymatrixbox. It takes 4 inputs which define the boundaries of the box using the cell coordinates (it also takes 1 ...
Milo's user avatar
  • 9,490
11 votes
Accepted

Use minted for plain-text? (without syntax-highlighting)

Oh forget it, there is apparently a "language"/lexer called text. So stupid I could not find it as it is not listed on the pygments home page. I'll close this as a dupe.
rugk's user avatar
  • 1,150
10 votes

How can I highlight some lines from source code?

I like lstlinebgrd as well. I know OP was looking for a solution to use with Beamer, but when I only need to highlight a line of code in a static document I use an even simpler version of Daniel's ...
Casey L's user avatar
  • 221
10 votes
Accepted

How do I highlight a term with an underbrace?

Thanks also to the comments and observations of the very good users, I have recreated exactly with LaTeX, your formula. \documentclass{minimal} \usepackage{amsmath,bm} \begin{document} \[ +\...
Sebastiano's user avatar
  • 56.3k
10 votes
Accepted

How to yellow highlight differences of two tex documents automatically in LaTex

Let's suppose you have these two files, respectively old.tex and new.tex: \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \begin{document} This is the old document. ...
Rmano's user avatar
  • 41.9k
9 votes
Accepted

How can I color one cell of a table using a tikzpicture?

You seem to know how to add options to individual cells, with |[...]| already, so in that sense you've almost answered your own question: Add fill=<color> in those options, e.g. |[fill=blue!20]|....
Torbjørn T.'s user avatar
9 votes

Draw a red box around certain parts of multiple lines

Here a possible solution with a TikZ matrix of math nodes: \documentclass{article} \usepackage{amsmath,amssymb} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \noindent Your example as a ...
CarLaTeX's user avatar
  • 64.4k
9 votes
Accepted

Highlighting particular references in .bib file

I'll first describe which commands have to be added to the preamble (two variants, w/wo natbib), and then how to use them. If you or the document class (like elsarticle) loads natbib, add the ...
gernot's user avatar
  • 49.9k
8 votes

Draw a red box around certain parts of multiple lines

A solution with hf-tikz: \documentclass{article} \usepackage{amsmath} \usepackage[customcolors]{hf-tikz} \tikzset{offset def/.style={ above left offset={-0.2,0.5}, below right offset=...
Claudio Fiandrino's user avatar
8 votes
Accepted

Soul color transparency

A workaround: \documentclass{article} \usepackage{xcolor} \usepackage{soul} \colorlet{soulred}{red!30} \begin{document} \begingroup \sethlcolor{soulred}% \hl{some text here}% \endgroup \end{...
Heiko Oberdiek's user avatar
8 votes

How to highlight a portion of Matlab Code

Here is a method which uses fbox. You simply add this command around the line of code you want to highlight and it will draw a box around it. However, I've actually used a modified version called ...
Milo's user avatar
  • 9,490
8 votes

Add grey background to inline text

The svgnames option of xcolor defines a number of shades of grey. Furthermore, you can mix colours easily. Here's a demo: \documentclass{article} \usepackage[svgnames]{xcolor} \begin{document} \...
Bernard's user avatar
  • 272k

Only top scored, non community-wiki answers of a minimum length are eligible