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.

Filter by
Sorted by
Tagged with
1
vote
1answer
38 views

Package soul Error: Reconstruction failed in \tableofcontents and bibliography

I'm writing a book in a scrreprt format. And, for the spacing and underlining the sections, I'm using the soul package. However, it throws an error in tableofcontents and bibliography. I'm clueless ...
0
votes
1answer
37 views

Use \hl command to highlight a subsection title

I am trying to use the \hl command to highlight a subsection and subsubsection title. I have tried wrapping the commands in a \mbox or between parenthesis but it doesn't seem to work. They worked with ...
0
votes
0answers
38 views

Problem of compilation with XelateX (Package soul error)

In a previous question (https://tex.stackexchange.com/questions/548738/special-character-oe-and-biblatex-with-xelatex), it was proposed to modify a part of the code to solve the problem. But the new ...
0
votes
1answer
50 views

Color text: Soul - reconstruction failed with font switching

I want to color my text and followed this sample code. Now I have \documentclass[a4paper,11pt]{article} \usepackage[a4paper,includeheadfoot,margin=2.54cm]{geometry} % for margins on a A4paper \...
0
votes
0answers
25 views

Figure touching the top or bottom of page causes page numbering to reset to zero? [duplicate]

I am experiencing this weird bug where if a figure touches the top or bottom of a page, is the page numbering reset to zero on that page. I haven't been able to make a minimal example showing the ...
0
votes
0answers
18 views

Reducing margin of highlighted text

The soul package adds a little bit of margin to highlighted text. Roughly speaking, 10 lines of highlighted text are as tall as 11 lines of non-highlighted text, i.e. a 10% margin. I am very ...
0
votes
2answers
68 views

Trouble with soul and utf8 [duplicate]

Here is a working example \documentclass{book} \usepackage[utf8]{inputenc} \linewidth 150mm \usepackage[spanish]{babel} \usepackage{soul} \sodef\secso{\scshape}{.125bp}{0.33em ...
2
votes
1answer
46 views

Suppressing text with strikethrough?

I would like to suppress text that has been strickenthrough (struckthrough?). I don't think that hide does this, because hide replaces with an empty box of the same size. I think something like \...
0
votes
0answers
29 views

Page counter is reset when highlighting long text using sethlcolor from soul package [duplicate]

I encounter a similar problem like this TeX question or this other one. However, I open a new question because the examples given by the previous ones were not suited to highlight the potential ...
1
vote
1answer
47 views

Printing TeX special symbols with tex.print, but also highlighted

I would like to be able to automatically print TeX special symbols into pdf. Mostly (but not only) the underscore symbol _, but also highlighted by grey color (similar to how it is displayed in this ...
1
vote
1answer
82 views

\Verb{} in fvextra: Highlighting \Verb{} text to be able to break at the end of line

Searching through various packages documentation and this site I have found how to write inline verbatim text, that is (when neccessary) broken at the end of line. For this feature, I am using \Verb{} ...
4
votes
1answer
227 views

pdfx causes soul to stop working

I noticed that adding pdfx package to my document stopped the soul package from highlighting the text in yellow. \documentclass[a4paper,12pt]{article} \usepackage[a-1b]{pdfx} % comment this out \...
2
votes
1answer
113 views

Conflict between package pdfcomment and polyglossia during compilation by LuaLatex

I would like to prepare a bilingual document and at the same time I would like to be able adding pdf comments by pdfcomment. Compilation by the command lualatex test.tex gets stuck when the library ...
1
vote
0answers
39 views

How do I mix ö with \hl{} using [utf8x]{inputenc} [duplicate]

Say I'm writing about Schrödinger's cat. I would like to be able to put use soul's \hl{} function to make the cat yellow. This should work, but it doesn't: % Minimum working example of UTF-8 ö ...
0
votes
1answer
67 views

combining soul package and color one in a newcommand

I have to use \st (from soul package) for crossing a line over a word in a text file. In addition, for presenting a specific replaced word instead of the first one, I use {\color{blue} second word}. ...
0
votes
0answers
49 views

How to change padding in a colored text

I want to color some block of text (multi line), so I took package xcolor and soul. It works, but I want to have some adjustments: first, the colored text shall have some padding around it, so the ...
1
vote
1answer
56 views

Incompatibility between soul/tikz and accents package

The following code throws an error. \documentclass{amsart} \usepackage{accents} \usepackage{tikz} \usepackage{soul} \def\ubar#1{\underaccent{\bar}{#1}} \begin{document} $\ubar{x}$ \hl{$\bar{x}$} \hl{$...
0
votes
0answers
56 views

How to make a realistic highlighting [duplicate]

I'm using \hl{} from soul package to highlight some words in my document. However, I'd like a "realistic" highlighting, simulating the result of a "manual" note: a not-so-regular rectangle with "...
0
votes
0answers
64 views

Why does \cite command does not work inside \add or \hl commands…?

Why does \cite command not work inside \add or \hl commands...? If my sentence goes like... \cite{Brown2015} studied so and so things and I wish to highlight the citation, so I would modify \hl{\...
1
vote
0answers
26 views

Cyrillic characters don't appear when enclosed by \ul with soulutf8

MWE: \documentclass[17pt,a4paper]{extarticle} \usepackage{graphicx} \usepackage{fontspec} \usepackage{polyglossia} \usepackage{soulutf8} \setmainfont{LMR12R-Gregory} \setdefaultlanguage[variant=...
0
votes
3answers
211 views

Package soul underline problem with macro text

I have been slowly learning LaTeX over the past few years. I have been mostly successful in these efforts. Recently, I stumbled across a problem, I know is probably quite simple to fix, but it has me ...
3
votes
1answer
60 views

My spaces are swallowed

I want to have my code examples show up with not only \code{\textbackslash texttt} but also a grey box. You might be familiar with the looks from some famous web page with questions and answers on ...
3
votes
2answers
104 views

What is the difference between \somecmd and \csname somecmd\endcsname?

This is a demo \documentclass{article} \usepackage{soul} \makeatletter \newcommand{\mydef}[2]{% \expandafter\def\csname my#1\endcsname {#2} } \newcommand{\mygetdef}[1]{% \ifcsname my#1\...
0
votes
0answers
144 views

How to use \discretionary inside soul's \hl?

\documentclass{article} \usepackage{soul} \usepackage{color} \begin{document} Some \hl{te\discretionary{-}{-}{-}xt}. \end{document} The above does not compile due to Missing { inserted, Improper ...
2
votes
1answer
1k views

How to highlight text containing citation and figure referencing?

I am trying to highlight a text with reference. Without references, the below works fine. Could anyone know how to handle the highlighting the text containing citation and figure references? MWE is ...
1
vote
1answer
126 views

How to have underlined text break line in table?

I have a long text in a table which is combined from two commands with a space in between, which has to be underlined. How can I make it wrap while being underlined? The example below shows the ...
1
vote
1answer
265 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
86 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
119 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
43 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
244 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
120 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
141 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: ...
2
votes
0answers
48 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} \...
3
votes
1answer
2k 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
179 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: ...
1
vote
1answer
87 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
521 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} \...
4
votes
2answers
367 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{...
4
votes
1answer
252 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
122 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 ...
5
votes
3answers
5k 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
1answer
157 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
915 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
1k 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
312 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
91 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
117 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
264 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\)}....
4
votes
1answer
404 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, ...