Questions with this tag are about the uses, and also problems with using, the `soul` package for letterspacing, underlining, overstriking and highlighting, perhaps also using colour.

learn more… | top users | synonyms

17
votes
6answers
6k 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 ...
31
votes
2answers
8k views

Why does underlined text not get wrapped once it hits the end of a line ?

Sometimes I want to underline some text, and it extends past the end of a line. Why does \underline{} not automatically wrap my text for me ? Also, how can I underline text so that it will still ...
11
votes
2answers
431 views

List of Underlining Packages - Pros and Cons

The \underline macro built into LaTeX is pretty much not useable per Why does underlined text not get wrapped once it hits the end of a line ? I have been attempting to use the soul package to ...
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: ...
4
votes
1answer
420 views

Letterspacing memoir section headers

I'd like to add letterspacing to the \section commands with \setsecheadstyle in a memoir book. I tried using soul: \sodef\soSection{}{.1em}{.5em plus.1em}{.1em plus.1em minus.1em} ...
10
votes
1answer
743 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. ...
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 ...
8
votes
1answer
564 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 ...
6
votes
1answer
745 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 ...
3
votes
1answer
86 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 ...
14
votes
1answer
2k views

Strikeout - when which package ? ( ulem vs soul vs …)

When to use which package for strikeout? I see answers : \usepackage{ulem} \sout{Hello World} or \usepackage{soul} \st{Hello world} or \usepackage{cancel} \cancel{Hello world} In what ...
9
votes
1answer
134 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 ...
10
votes
1answer
1k views

Environment to underline/strikeout for comparing versions

I have a TeX file that I'm editing with several collaborators and we use environments to highlight and discuss proposed changes like the following: Some text. \begin{old} Text that I propose to ...
7
votes
1answer
105 views

Mixing underline and strike-out

Word allows for all kinds of font formatting: The above example combines strike-through/strike-out (like this) and underlining. I'd like to be able to do the same, but neither ulem nor soul allows ...
3
votes
1answer
373 views

conditional highlighting with soul

The journal PLoS ONE, says in the FAQ When submitting your revision, you will need to include the following new files: [...] A ‘clean’ copy of your revised manuscript. A revised manuscript with ...
12
votes
3answers
347 views

French accents in \hl from soul package

I'd like to use the \hl command from the soul package in a French text. However, it does not work whenever the part to highlight contains French accents (e.g.: \hl{é}). I could use \'e instead of é ...
9
votes
2answers
104 views

Follow-up: Underline + strike-through using soul

This is a follow-up question to Mixing underline and strike-out. This time, I'm specifically interested in an implementation using soul (that doesn't require multiple compilations to stabilize). I ...
8
votes
1answer
182 views

soul dropping some accented letters from the end of words

I'm using soul to letterspace headings in a Hungarian document and compiling it with lualatex. For some reason soul drops some of the accented letters at the end of a word, but not all. In the ...
7
votes
1answer
402 views

bug with page numbers when using soul package

I recently ran into a curious bug when using the soul package. I managed to boil it down to the following example. The problem is that the page numbers get messed up. In the example below, they should ...
6
votes
1answer
141 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 ...
6
votes
1answer
455 views

Using a \phantom{} in \ul from the soul package

In responding to how to typeset a Long underscore in LaTeX, I attempted to use a \phantom with \ul, but end up Argument of \makeph@nt has an extra }. So, what is the proper way to use a \phantom ...
5
votes
1answer
1k views

Error “Reconstruction failed” with soul package

I've got a problem with the soul package while adding a letter-spacing to a result of a command that is defined just like this: \newcommand{\myCommand}{some text} In the document I'd like to have ...
5
votes
2answers
433 views

soul's \ul{} breaks wrapfigure and textflow?

Please, I have a nice picture without that \ul{...}, but i need that. \documentclass{article} \usepackage{wrapfig} \usepackage{soul} \begin{document} \begin{wrapfigure}[3]{l}{30mm} \Huge 1 ...
4
votes
2answers
184 views

Hyphenatable material enclosed in group braces

I have text that I need to repeat quite a few times: \newcommand{\repeatme}{text to repeat that is somewhat long and verbose} I'd like to underline this text and have it not cause hbox overflow ...
3
votes
2answers
651 views

How to make overlaid text?

Is there a nice way to overlay text in the space of one character? So if text is overlaid as I described it would almost result in a black square.
0
votes
1answer
279 views

Argument of \someCustomCommand has an extra } encountered when command is put in \ul. How to fix this? [duplicate]

Possible Duplicate: Custom command inside soul package's \hl To make the document easier to understand (and easier to write), I have defined: \newcommand{\code}[1]{\texttt{#1}} I ...