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
2
votes
1answer
34 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
17 views

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

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
41 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 ...
0
votes
1answer
27 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
214 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
68 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
38 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
45 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
39 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
45 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
51 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
33 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
18 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
108 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
57 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 ...
0
votes
0answers
25 views

Strike through an environment

For a revision of an article I have the following macro: \newcommand{\revision}[2]{\textcolor{red}{\st{#1}}\textcolor{blue}{#2}} that can be changed to \newcommand{\revision}[2]{\textcolor{blue}{#2}...
3
votes
2answers
95 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
89 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 ...
1
vote
0answers
577 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
73 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
173 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
72 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
101 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
40 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
167 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
82 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
102 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
44 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} \...
2
votes
1answer
1k 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
161 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
73 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 ...
2
votes
1answer
404 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
289 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
220 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
107 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
4k 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
0answers
105 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
708 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
729 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
266 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
75 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
104 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
219 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
277 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
79 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
48 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
70 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
756 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
251 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
138 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 ...