Questions tagged [soul]

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.

Questions with this tag are about the uses and problems with using the soul package for letterspacing, underlining, overstriking and highlighting, perhaps with the use of colour. Answers may show the use of soul but could also deal with limitations and alternative means to achieve the desired end.

soul is included in current versions of both TeX Live and MikTeX.

From the preamble to the soul documentation (e.g. on CTAN):

This article describes the soul package, which provides hyphenatable letterspacing (spacing out), underlining and some derivatives such as overstriking and highlighting. Although the package is optimized for LaTeX2ε , it also works with Plain TeX and with other flavors of TeX like, for instance, ConTeXt. By the way, the package name soul is only a combination of the two macro names \so (space out) and \ul (underline)---nothing poetic at all.

244 questions
5
votes
1 answer

Color highlighting with soul package does not work well with ligatures

The picture below says it all. Color highlighting with the soul package prevents a correct rendering of the ff ligature. Is there a way to fix this? \documentclass{article} \usepackage{color, soul} \begin{document} off -- offer \hl{off --…
Sverre
  • 20,729
5
votes
1 answer

How to customize the highlight height with soul

Is it possible to customize the height of the highlighting with the soul package? \documentclass{article} \usepackage{soul} \usepackage{xcolor} \begin{document} \hl{game} \end{document} I would like to reduce a bit the height of the highlighting…
Jansen
  • 315
4
votes
1 answer

soul package command \hl can not work with escaped space

It seems that \hl command in the soul package can not work with escaped space. A minimal non-working example is \documentclass{article} \usepackage{xcolor, soul} \colorlet{mycolor}{red!30} \sethlcolor{mycolor} \begin{document} \hl{can\ we\…
jdhao
  • 711
4
votes
4 answers

How to continue thick underline beyond text?

Here's my code: \documentclass[12pt]{article} \usepackage{soul} \begin{document} \setul{}{2pt} \ul{\Huge\textbf{Some text}} \underline{\Huge\textbf{Some text \hspace{1in}}} \ul{\Huge\textbf{Some text \hspace{1in}}} % This line causes…
Philip
  • 143
3
votes
2 answers

Using soul as tokenizer gives strange result on specific strings

Following this post, I was trying to use soul as a hack-y tokenizer and ran into unexpected behavior on certain strings. I reduced the problem to the following MWE but haven't been able to make further…
3
votes
1 answer

Excess space surrounding highlighted text in modified soul's hl command

In Cool Text Highlighting in LaTeX, Gumbo offered, in a comment to Caramdir's answer, \hlc, a modification of soul's \hl to allow choosing the highlighting color on the fly. \hlc, though, leaves excess space around the highlighted text,…
schremmer
  • 2,107
2
votes
1 answer

Highlighting and striking through text in latex

I have used \documentclass{article} \usepackage{soul} \usepackage[normalem]{ulem} \begin{document} \hl{\mbox{\sout{This is my text which I want to highlight and strike through. The text does not go to the next line, instead it goes beyond the…
YatShan
  • 155
1
vote
1 answer

Modified soul command \hl will not accept \boldsymbol

In Cool Text Highlighting in LaTeX, Gumbo offered, in a comment to Caramdir's answer, \hlc, a modification of soul's \hl to allow choosing the highlighting color on the fly. \hlc accepts $2$ as argument but will not accept \boldsymbol{$2$},…
schremmer
  • 2,107
1
vote
1 answer

Count highlighted words

My coauthors and I are tasked with reducing the word count of our paper. We're beginning by highlighting text with the soul package. But what we'd like to know is how many words are contained in the highlighted sections of text, in order to decide…
bshor
  • 287
  • 2
  • 9
1
vote
1 answer

using soul to highlight only text and math while skip any other macro

I try to highlight large paragraph of text, where there are various other macros such as \cite, \SI, \ref, etc. in between. If I do something like the following: \hl{the duration is \SI{4}{\second} as shown in Figure~\ref{fig:fig1}…
Jerry Ma
  • 161
1
vote
1 answer

Using multiple { and }

It seems that using multiple {{{ and }}} causes some problem to the latex document. Assume this line \usepackage{color,soul} \begin{document} something \hl{I am referring to \cite{publi}} is good. \end{document} But I get this error
mahmood
  • 3,359
0
votes
0 answers

\ul from the soul package eats last character if it has less common diacritics

I am using the soul package to underline text, since it allows me to select at which height to place the underline. However, for some reason if the last underlined character has a less common diacritic (perhaps those which LaTeX cannot combine with…
matea
  • 143
0
votes
0 answers

Underline gap in both side aligned line only using `\ul{}` command

Ho do I underline gap in both side aligned line like…