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
0
votes
0answers
39 views

highlighting with soul corrupts text structure

I have a text where students have to individually highlight certain passages. The lines are numbered for later comparison. I use \hl{} from the soul-package for highlighting, but have found that it ...
0
votes
0answers
31 views

apply nested box in soul package

\documentclass[a4paper,twocolumn]{article} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} % \usepackage{soul} \usepackage{soulpos} \begin{document} \ulposdef\ulpgfC[xoffset=.15em]{% \...
0
votes
0answers
25 views

How to highlight text spanning multiple lines that includes macros?

I am currently proofreading a document and want to highlight some sentences. Unfortunately, I haven't found a highlighting package that can both Preserve linebreaks Highlight text produced by macros, ...
0
votes
1answer
367 views

The installed file does not exist - soul.sty

I want to use this beamer template that I found on Overleaf with MiKTeX in TeXstudio: https://www.overleaf.com/latex/templates/presentation-template-au-theme/ffhvmnbyvdjg I downloaded the the whole ...
2
votes
0answers
18 views

\hl gives 5 errors and I don't know why [duplicate]

The sentence \hl{Upphängningsmetoden visade att masscentrumet låg i punkten (10,5;7,30) i centimeter medan den algebraiska metoden visade på att tyngdpunkten låg i $(10,5;7,34)$} gives 5 errors and I ...
5
votes
2answers
227 views

Alternative to the soul package?

Context One may want to highlight some text, or strike it. This can be done with either the soul package, or with the ulem package using a trick, although it does not work that well. Problem The ...
1
vote
1answer
32 views

Babel seems to break letterspacing of soul package

This is a MWE of a book I'm working on. \documentclass[10pt,twoside]{book} % \usepackage[ngerman]{babel} \usepackage{blindtext} \usepackage{soul} \usepackage{fancyhdr} \pagestyle{fancy} \renewcommand{...
0
votes
0answers
21 views

Adding underline to titles of books and journal in bibliography with respect to page limits

My university has this thing in its bibliography where we make the titles of books and journal bold and underlined. I almost finished writing an article, however, I am unable to add an underline to ...
1
vote
1answer
48 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
215 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
51 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
66 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
26 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
20 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
107 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
98 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
31 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
52 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
140 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
246 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
146 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
41 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
135 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
64 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
62 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
59 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
122 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
289 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
68 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
108 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
215 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 ...
3
votes
1answer
2k 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
206 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
395 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
89 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
140 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
50 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
321 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
143 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
188 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
49 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
3k 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
199 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
100 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 ...
4
votes
1answer
648 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
415 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{...
5
votes
2answers
291 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
130 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 ...
7
votes
3answers
6k 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{\...