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 [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.

0
votes
0answers
21 views

how to add vertical space between words and the underline effect?

I searched around here and did not find anything accurate to what I wanted. I would like to know other ways to increase the decrease in the space between underline and words as well as in this MWE ...
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 ...
3
votes
2answers
32 views

How to change the colour of the line when I strike out a sentence

I have the following MWE \documentclass{standalone} \usepackage{soul} \usepackage{xcolor} \begin{document} \st{I want to strike out this sentence} using a red line and I want to replace it with ...
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 ...
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 ...
1
vote
1answer
44 views

How to underline CJK with soul?

I was using soul to underline text. It works until I tried to underline some CJK text. When I have \def \mytest {测试test very long text blah blah blah ...} \ul\mytest in the document, it complains: ...
3
votes
0answers
29 views

Extending soul underline up to the right side of tabular

I found the \longunderline command at Extending underline up to the right side. However it does not work as expected in an tabular: \documentclass{article} \usepackage{tabularx} \usepackage{soul} \...
1
vote
1answer
170 views

Underlining a section title

Many text formatting commands come in two flavors: a brace-delimited version and an "declaration" version, that applies to everything after the command. For example, \textbf vs \bfseries. However, ...
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
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 ...
1
vote
1answer
159 views

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} \...
3
votes
2answers
205 views

Make soul and \texttt work together

I was trying to redefine \texttt command to make it have background color using package soul. But it seems that it is harder than I thought. My initial code is \documentclass{article} \usepackage{...
3
votes
1answer
111 views

Adobe Reader always asks for saving when using eforms and hyperref packages

I am creating a series of laboratory exercises for my University. Thus, I created a .cls file that includes every package and applies any format I need. Among the included packages is the eforms ...
2
votes
1answer
56 views

Issue with RTL text in Polyglossia and Soul

I am trying to use the Soul package with Polyglossia to emphasize with letter spacing (this is a traditional typesetting technique in the language I'm using, and the typeface I'm using doesn't have ...
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{\...
2
votes
0answers
51 views

Punctuation and text decoration - 'csquotes' not compatible with 'ulem' or 'soul'

I'm using TeX for a long time now, but I'm currently struggling integrating some features for my daily use. To be more precise: I'm intending to use features like text highlighting (yellow markup), ...
2
votes
2answers
278 views

Soul “Argument of \xxx has an extra }” after registering custom command with \soulregister

I came across several similar questions and answers with a similar issue, like https://tex.stackexchange.com/a/20055 and https://tex.stackexchange.com/a/46871, but even after registering my custom ...
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}% \...
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: \...
1
vote
0answers
51 views

Underlining greek letters with soulutf8 and compiling with LuaLaTeX [duplicate]

I would like to use the features of soulutf8 and compile a document containing greek letters with LuaLaTeX. However, this approach seems to gobble the letters that I chose for underlining. What can be ...
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 ...
4
votes
3answers
132 views

making soulutf8 work with \(…\)

Is there any easy way to adapt soulutf8 to work with LaTeX math mode delimiters? As of now, compiling \documentclass{article} \usepackage{xcolor,soulutf8} \begin{document} Well, \hl{\(e^{i\pi}=-1\)}....
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
1answer
32 views

soulutf8's highlight fails with accents in moving argument (section)

The following MCE fails to compile (at second run) with error: ! Argument of \@firstofone has an extra }. \par l.3 ...{\numberline {3}\texthl {Caf\IeC {\'e}}}{1} as soon ...
0
votes
0answers
43 views

Highlighting error with acronyms and soulpackage within \hl

With the soul package and acronyms in this combination: \hl{\acrlong{SKO}} there always comes an error like this: Package glossaries Error: Glossary entry {SKO}' has not been defined. ...piel ...
2
votes
1answer
256 views

highlight (soul package) in figure caption generates error

I have a short command that allows me to highlight some text for internal review purposes. Unfortunately, when I use it in a Caption of a figure it gives me the following error. Argument of \@...
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
80 views

\hl does awkward stuff with \allowbreak

I'm trying to add background color to \texttt text, and defining a command for that like this: \newcommand{\code}[1]{\texttt{\hl{#1}}} . Sometimes those lines span more than a few words (with or ...
1
vote
2answers
1k views

Package soul Error: Reconstruction failed

I already read the discussions about this error, but nothing helpfull. My MWE \documentclass{minimal} \usepackage{xcolor} \usepackage{soul} %\soulregister{\cl}{7} irrelevant %\soulregister{\...
1
vote
2answers
381 views

Soul color transparency

I want to highlight some text using package soul. However, I fail setting the color transparency, which is normally possible by writing !trans_value after the color. As soon as I add this ...
4
votes
2answers
191 views

How to use \cite in \DeclareRobustCommand

How do I use \cite in \DeclareRobustCommand? I'm using \DeclareRobustCommand to create two ways to highlight text using package soul. For example, this is what I have in the header of the document: \...
3
votes
1answer
176 views

How to underline siunitx numbers with soul?

I'm trying to write very long lines of underlined text containing percentages using soul for allowing linebreaking and siunitx for getting the right spacing, as I do in the rest of the document. ...
2
votes
1answer
321 views

Error: Reconstruction failed for \hl (highlighted) newcommand text

Sorry if this has been asked before. I could not find an answer to this problem yet. I'm finding some issues when highlighting text defined by newcommand: \documentclass{article} \usepackage{color,...
1
vote
1answer
97 views

Reference in a box to an indexed word

In highlighting math, JPi defined \hlfancy a breakable box to highlight text involving math. In How to refer to indexed words, Andrew defined \INDEX and \DEX to refer to indexed words which work fine ...
0
votes
0answers
179 views

User friendly way to highlight changes

I am working on revamp of a wargame rulebook: it will feature two-column page set up, numbered paragraphs and index. While not quite straightforward, I think I managed to get this rolling so we are ...
0
votes
0answers
122 views

\emph breaks soul's underline

\emph within soul's \ul leaves small gaps in the underline, their size varying depending on the font and whether there is a space after \emph. \documentclass{article} \usepackage{soul} \begin{...
1
vote
1answer
125 views

Color typo in underline text

Using soul package, I try to underline in black a text containing some words. One of the words is colored in grey. \documentclass{article} \usepackage{color} \usepackage{soul} \definecolor{Gray}{...
2
votes
1answer
66 views

How can I include the section number of a deleted section in the deletion formatting applied by latexdiff?

I have a document marked up by latexdiff and then edited to make it compile. The current output for a deleted section is similar to this: How can I include the section number in the deletion markup? ...
0
votes
1answer
860 views

Argument of \language@active@arg" has an extra } — but shorthands should stay

I am trying to fix a problem that had not appeared earlier. Maybe the distro got updated... With TeXLive up to 2015, the following example was working: \documentclass{article} \usepackage[utf8]{...
2
votes
1answer
189 views

Overstriking into equation with Soul

I need help to figure out how overstriking work into equation on Latex. \documentclass[book] \usepackage{amsmath,amsfonts,amssymb} \usepackage{soul} \begin{document} \begin{equation} \st{$ \gamma $}...
1
vote
1answer
155 views

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 ...
1
vote
1answer
307 views

Error when trying to color and underline

Here is my piece of code \documentclass{article} \usepackage{color,soul} \begin{document} \begin{quote} \tt\ \ul{{\color{red}text}}. \end{quote} \end{document} This simple piece of code generates a ...
2
votes
1answer
116 views

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 ...
3
votes
2answers
143 views

Censor glossary items

I have some documents where certain text may need to be hidden (whiteout). The text is often in large blocks that span multiple lines. The removed text needs to take up the same space as it would if ...
2
votes
2answers
117 views

acro acronym not recognized inside the soul package's strikeout command

I'm finding that if I use an acro acronym inside a soul strikeout command, I get errors about the acronym not being defined. Here is my Minimal Working Example: \documentclass{article} \usepackage{...
2
votes
1answer
190 views

Tight black box around chapter titles?

I am looking to make a tight black box around my chapter titles, ideally only 1pt of margin on each side. So far, my best results have been with soul: However, you'll notice that there is too much ...
4
votes
1answer
4k views

How to highlight text with an arbitrary color

Okay so I have the command \newcommand{\hlc}[2][yellow]{{\sethlcolor{#1}\hl{#2}}} in my preamble (after the inclusion of soul and xcolor packages), and colors that are already defined work perfectly ...
3
votes
1answer
438 views

Customizing highlighting from soul

I am using the following customization from make soul highlight span lines for the \hl from soul to get rid of the gaps between the highlighted zones: \documentclass[a8paper, landscape]{scrartcl} \...