Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [highlighting]

{highlighting} is about highlighting document elements. Use this tag in addition to other tags specifying what should be highlighted.

0
votes
0answers
22 views

Multi-line text highlight with \cite

Basically want to mimic highlight function of Word or pdf. Need to highlight Need to be multi-line able to cite Not properly working MWE (taken from here and modified): \documentclass[5p,hidelinks]{...
3
votes
2answers
50 views

How to use the global definition of a variable in a command where that variable has already been defined?

I was trying to highlight some text, which contains \x, using the \hl command from the soul package, where \x is simply defined as \def\x{\mathbf{x}}. However, I've found that \x has already been ...
2
votes
1answer
37 views

Enable highlighting and auto-line-breaking for texttt{}

I'm using the following command to modify texttt{} so that it automatically breaks long lines (without inserting a hyphen), and it's very helpful when writing documents where I have to write lengthy ...
1
vote
0answers
43 views

How can I highlight text in the middle of sentences

I want to be able to present short code in the middle of a sentence. How can I highlight text in the middle of sentences in Latex so it they appear as code. Consider this example For this purpose ...
0
votes
0answers
9 views

How do I keep morekeywords from being highlighted in a comment?

Say I have the following listing style: \lstdefinestyle{custCpp}{ language=c++, keywordstyle={\bfseries}, % keyword color keywordstyle = [2]{\color{blue}\bfseries}, otherkeywords = {...
1
vote
1answer
49 views

How can I achieve writing text in latex thesis/report in highlighting block?

I want to highlight some text in a block just as we are able to do so in latex beamer template or as we can see notes section in many books which has a box highlighted and perhaps have different ...
0
votes
1answer
36 views

How to highlight deleted text in the PDF output generated by compiling latexdiff

For the purposes of showing corrections to a PhD thesis, I am using latexdiff to produce a PDF showing the difference between the original and the new version. My examiner has requested me to not ...
0
votes
1answer
40 views

How can I use `\uline` from the `ulem` package to underline text inside a `\colorbox`?

Screenshot: I have the following code: \uline{No underlining for \colorbox{lightgray}{everything} inside the colorbox.} Which looks like this: How can I get a continuous line for the text inside \...
2
votes
0answers
58 views

Dynamically Highlight Active Hypertarget

Is it possible to [dynamically] highlight the active hypertarget in a pdf document? I am using LaTeX (with the bookmark package) to create a pdf document (via dvips and ps2pdf) with many pages of ...
1
vote
0answers
34 views

Listing parenthesis highlighting [duplicate]

I'm using the listings package to insert code into the document. My research led me towards the literate option of listings to control operator highlighting. I have one issue - the right round bracket ...
1
vote
0answers
26 views

soulutf8 doesn't work with Cyrillic in XeLaTeX

I'm trying to highlight a text written in Russian using soulutf8 package. In the PDF file, rendered with XeLaTeX, instead of highlighted Russian letters, I've got nothing. With English symbols, it ...
4
votes
1answer
127 views

Highlight/color a part of text in block in beamer

I am using beamer in Latex to make a presentation. I use a block for definition like: \begin{block}{P1} \justifying Some text here \end{block} Let us say I wish to highlight a word "Some". By ...
1
vote
1answer
81 views

Highlighting part of equation with text underneath

I am trying to use this but change the text to be down and to be not divided but I did not know how to alter the code. Any help?
3
votes
1answer
154 views

Line break long verbatim text with highlighted background

I created an MWE-look-alike in the original document then 'background highlighted' (somehow 'highlight' means something else in verbatim) some text to show where/what to focus on. This MWE-look-alike ...
2
votes
1answer
58 views

White space between hightlight tex [duplicate]

Here I faced challenge in highlighted text using soul package, when highlighting white space occurs in between lines. It should be closed up, please suggest any option for fixing this issue: Note: ...
0
votes
0answers
36 views

Highlighting text in between paragraph [duplicate]

Here my requirement is highlighting the text with run on case. Here I attached the sample page PDF. MWE: \documentclass{book} \usepackage{color} \begin{document} \section{Overview} Numerous ...
0
votes
1answer
25 views

soulutf8 highlight turn on/off

I have an issue with the soul package (and soulutf8). In order to easily turn on/off highlighting text (\hl{<text>}), I have defined a counter highlighter, that is either set to 0 (highlighting ...
3
votes
1answer
245 views

How do I highlight a term with an underbrace?

I would like to highlight my equation in this way: I'm using an align environment. Could you help me?
0
votes
2answers
223 views

Add grey background to inline text

I want to make several words with a grey background like this within normal text? Like with \colorbox{yellow}{\lstinline{some text here}} but grey instead of yellow. How to do that?
1
vote
0answers
51 views

Visually highlight portions of a document

I'm looking for a possibility to visually highlight entire portions of a document. It could be a paragraph or entire pages. Ideally by changing the background color, but it could also be a colored bar ...
6
votes
3answers
552 views

How to highlight a portion of Matlab Code

Consider following code posted for What can I use to typeset MATLAB code in my document? \documentclass{article} \usepackage[T1]{fontenc} \usepackage{bigfoot} % to allow verbatim in footnote \...
6
votes
4answers
199 views

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

I know this question has been asked before but the examples that they give are too complicated to replicate, for example. Is there some way to make boxes like these (dashes are not necessary but ...
0
votes
0answers
36 views

Context related code highlighting with t-vim

Notice that \inlinec{\n} represents only a single character. An escape sequence like \inlinec{\n} provides a general and extensible mechanism for representing hard-to-type or invisible characters. ...
4
votes
3answers
557 views

\hl command is underlining instead of highlighting

How can I highlight the dollar currency symbol? For some reason, the code below is underlining rather than highlighting when I try it. \documentclass{article} \usepackage{soul} \begin{document} \hl{\...
3
votes
2answers
88 views

How to highlight a line of text (with colored background) with animation in beamer?

There are several ways to highlight a line of text with colored background in beamer, for example, using framed or mdframed. How to animate this highlight, i.e., filling the background color from ...
1
vote
1answer
53 views

Higlight a desired “n-th” author in \fullcites in cleanthesis?

I have found different answers about highlighting authors in biblatex in the bibliography but not so much in specific citations. I have different \fullcite{Label} commands along a text where I show ...
0
votes
1answer
211 views

Highlight code in lstlisting

I would like to highlight code in a listlisting environment. I tried two techniques: using \usepackage{lstlinebgrd} and using \usepackage{color} (based on this conversation) but none really match what ...
1
vote
3answers
78 views

Highlighting certain parts of matrix without TikZ

I have a matrix, given in the following snippet: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{blkarray} \begin{document} \begin{equation} \begin{...
0
votes
0answers
40 views

How to highlight a math box in Lyx?

Is there a way to highlight a math box in Lyx? Something like this for example?
3
votes
0answers
192 views

Syntax highlighting of (Cisco) terminal

I want to highlight a complete terminal flow, mostly for the Cisco CLI, but Bash would be nice, too. As for now, the result achieved with the package lstlisting looks as follows: I achieved that with ...
6
votes
2answers
61 views

listings: highlight a prefixed keyword starting with a single quote

This is about Rust and their lifetime notation: \documentclass[crop,varwidth]{standalone} \usepackage{listings} \usepackage{xparse} \usepackage{expl3} \usepackage[svgnames]{xcolor} \def\noprint#1{} ...
0
votes
0answers
43 views

What can cause page counter to reset without using setcounter?

I have a document in which the displayed page number goes from 8 on the 8th page to 0 on the next page. Unfortunately I cannot provide the code because the document is confidential and when I replace ...
3
votes
1answer
201 views

How to highlight a `enumerate` environment in latex?

This is a continuation of this question. The following code works very well to highlight a paragraphs(and inline texts too). \makeatletter \newcommand{\hl}[1]{% \setbox\@tempboxa\hbox{#1}% \...
4
votes
2answers
197 views

How to highlight some inline text using parbox?

I have some paragraphs to highlight for later edit in my latex document. For that I use the following code \newcommand{\hl}[1]{\noindent\colorbox{pink}{\parbox{\dimexpr\linewidth-2\fboxsep} {#1}}} ...
1
vote
1answer
114 views

Equation in Beamer customized with beamerhighlight

I would like to replicate for this code: \documentclass[10pt]{beamer} %\usepackage{etex} \usepackage[utf8]{inputenc} \usepackage[TS1,T1]{fontenc} \usepackage{xspace} \usepackage{amsmath,amssymb} \...
4
votes
2answers
272 views

Highlight elements in the matrix in tikz

I have a matrix and need to highlight some elements in the matrix as in the example. Thanks \documentclass{beamer} \usepackage{tikz} \usetikzlibrary{calc,arrows,automata,positioning} \usepackage{...
2
votes
1answer
121 views

Background colouring (highlighting) for maths formula in Lyx?

I want to highlight selected maths formulas in Lyx. Is there a simple way of doing this from the GUI ? I have tried selecting and right-clicking -> Text style , but that seems to change the font ...
8
votes
1answer
194 views

Words with swedish letters don't show in \hl{}

I want to highlight a Swedish word with \hl{en kassör}, but the word kassör just disappears and only en is highlighted. I use the pdfLaTex compiler in v2 Overleaf. I use the following code: \...
2
votes
1answer
262 views

Highlight parts of a text piecewise in beamer

I'm about to write a presentation with beamer and want to show a complete sentence first. After that I'd like to highlight one or more words in that sentence to explain them. My current approach is ...
3
votes
1answer
89 views

How to make a soul driver draw two lines at once (one above and one below text)

This is a follow up question from Box highlighting of text with rounded corners (soul-based). The desired end result is a sort of "circled text", as one would do if annotating a text with a pencil. I ...
8
votes
2answers
160 views

Environment to change background color of a portion of the page, vertically defined by the height of the contents of the environment?

I am trying to highlight some portions of a document. These portions can be paragraphs, images, equations and – quite importantly – list items. The highlighting should preferrably happen by a ...
0
votes
1answer
90 views

Highlight specific authors in the bibliography and citations declaring their names as commands using biblatex

I want to be able to define a list of authors in a command and highlight them in the bibliography or citations. I am using biblatex with my latex document (I have not been able to update my OS lately ...
3
votes
1answer
115 views

How to highlight text that includes glossaries and citations?

I have the following text, which I am trying to highlight with the package soul. Given below is the unhighlighted MWE MWE (unhighlighted) \documentclass[a4paper,12pt]{report} \usepackage[usenames, ...
1
vote
1answer
47 views

highlight question marks

Compiling the following file \documentclass{article} % \usepackage{xcolor} % this guy does the highlighing work \usepackage{soul} \begin{document} \hl{cf.\ ??} \end{document} with pdflatex produces ...
2
votes
2answers
107 views

Contour text in xelatex

I have this MWE which work fine with pdflatex \documentclass[border=3mm]{standalone} \usepackage{xcolor} \usepackage[outline]{contour} \contourlength{1.2pt} \pagecolor{blue!30} \begin{document} \...
4
votes
1answer
79 views

Why is this way of highlight text in code listing not working with beamer class?

This answer provides a nice solution to Highlight text in code listing while also keeping syntax highlighting which is improved in another answer. The point is the former works like a charm with the ...
1
vote
0answers
80 views

How to highlight and draw over text like this? [closed]

In this paper (page 2), the authors show the following figure containing a selectable text in LaTeX. I found this question about highlighting text but it is not enough. Is there a convenient way/tool ...
2
votes
1answer
101 views

Can't underline highlighted text (soul)

\usepackage{soulutf8} \begin{document} \hl{ AAAA {\ul{AAAA}} AAAA} \end{document} fails: ! Package soul Error: Reconstruction \underline works but I don't seem to be able to change its color ...
2
votes
1answer
105 views

Use siunitx to highlight a table column?

I am using siunitx to align my columns by the decimal point. I want to highlight one of the columns in my table (edited: make a column have a coloured background). I was wondering if siunitx has a ...
2
votes
1answer
105 views

Piecewise highlighting in beamer presentation with sub bullets

I want to piecewise highlight the items of an itemsize and gray out previous items. For this task, i use the following code: \documentclass{beamer} \setbeamercovered{invisible} \setbeamercovered{...