3
votes
3answers
189 views

How to improve this text highlighting?

I want to highlight some letters which represent an amino acid sequence of a protein using different colors. The below code works fine, but the highlighted box is not fitting exactly the letters, as ...
4
votes
1answer
348 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: ...
8
votes
1answer
470 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
1answer
112 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 ...
6
votes
1answer
134 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 ...
3
votes
1answer
84 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
131 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 ...
1
vote
0answers
97 views

Emphasize text that is highlighted using the soul package [closed]

I can highlight a bit of text (i.e., make the background yellow) using the soul package like this: \hl{a bit of text} I figured I could also use italics like this: \hl{\emph{a bit of text}} ... ...
3
votes
1answer
1k views

Issue with soul and nested macros

I'm using package soul to highlight text, for example with \hl{some text}. It works nicely in general, but when the text contains other macros, soul simply skips it. For example: \usepackage{soul} ...
8
votes
2answers
236 views

Is there any solution for highlighting text in CJK?

Is there any solution for highlighting texts or sentences in Chinese, Japanese, and Korean? I know none, at the moment. But this will be changed, if someone would like to help me with CJK in LaTeX. ...
10
votes
2answers
1k views

soul: broken highlighting with xcolor when using \selectcolormodel

I try to highlight text using the soul package. But I experience problems if I use it in combinations with the xcolor command selectcolormodel, only spaces are highlighted as shown in the MWE: ...
6
votes
2answers
2k views

labeling underlined text over multiple lines

I have a large number of documents I need to create, and there is one very particular need I cannot find a solution for. In these documents, there are pieces of text that are underlined and they ...
10
votes
1answer
729 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. ...
1
vote
1answer
557 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 ...
6
votes
1answer
739 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 ...
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 ...