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
1 answer
101 views

How to expand the title text on the chapter title fully and on the header partially?

Having benefited from this TeX.SE answer I've written this code: \documentclass[a5paper,openany,14pt,]{extbook} \usepackage[left=2.34cm, right=2.34cm, top=2.66cm]{geometry} \usepackage[explicit]{...
0 votes
0 answers
48 views

Want to install the soul.sty file in Texlive 2022

I tried using tlmgr but it does not work. Maybe because (for some reason I do not know) it is the 2021 version of tlmgr (at least that is what the GUI says). I have already downloaded soul.sty from ...
0 votes
1 answer
46 views

Soul package does not work with XeLatex with Chinese text

Minimal example: \documentclass{article} \usepackage{xeCJK} \usepackage{soul} \begin{document} \ul{I love you 我 爱 你} % This works \ul{I love you 我爱你} % This throws error \end{...
  • 1,653
1 vote
1 answer
49 views

`soul` and `soulpos` cause page restart if used heavily

I use lots of highlights as it is used to mark my revision from each version before I gave to my lecturer. When I highlight lots of texts, I found out that sometimes page restarted in the middle. ...
0 votes
1 answer
29 views

Argument of \textbf has an extra }

I am writing the latex table code as follows: \usepackage[normalem]{ulem} \useunder{\uline}{\ul}{} \begin{table}[] \begin{tabular}{l|cc|cc|} \cline{2-5} & \multicolumn{2}{c|}{{\ul \textbf{One-vs-...
  • 3
0 votes
1 answer
49 views

Why does the text overlap? [duplicate]

It may not be easy to see, but the error is definitely there -- look at the "r" in "Nordamerikas": How can I remedy this? This was brought to my attention during a final check of ...
3 votes
3 answers
206 views

How to add italic words inside highlight?

I want to highlight text, but some text inside it need to be italic. The problem is, \hl{... \textit{...}...} cause all space inside \texit{...} removed. Using \ can solve the problem, but that is ...
0 votes
2 answers
38 views

\ignorespaces does not work inside \ul

I am trying to write a document template in which the necessary text would be set using \def at the beginning, and then used in the text. And I ran into the problem that if there are spaces in the ...
0 votes
0 answers
34 views

How to underline text from a macro when using Alex Chan's implementation of 'a really nice underline'

Following David Carlisle's answer in How to underline text from a macro including a line break?, I am attempting to adapt David Carlisle's use of \expandafter to allow linebreaks (when underlining ...
0 votes
0 answers
32 views

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

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 ...
  • 81
1 vote
1 answer
67 views

hl with automatic line-break for long words [duplicate]

Im using the soul package for highlighting. I noticed that \hl will go simply out of the margin, if the word is too long: \hl{Loremipsumdolorsitamet,consetetursadipscingelitr,...
0 votes
1 answer
67 views

Soul Highlighting Dimensions

I'm having trouble understanding part of the documentation for the soul package. I want to know the exact lower and upper positions of the produced colored rectangle when highlighting text via the \hl ...
1 vote
1 answer
63 views

Underline command of soul doesn't work with Hebrew

I am trying to use soul to underline a word in a Hebrew document: % !TEX TS-program = xelatex \documentclass{beamer} \usepackage{xcolor,soul} \setul{0.2ex}{0.1ex} \setulcolor{red} \usepackage{...
  • 794
0 votes
1 answer
82 views

{soul} and {xcolor} packages not working

I would like to strikeout a paragraph with some different text colorings in it. As I learned here: Strikeout - when which package ? ( ulem vs soul vs ...) the \st command in soul strikesout whole ...
  • 701
0 votes
0 answers
28 views

problem when using polyglossia and soul packages

The following code presents a strange error found using polyglossia and soul packages. \documentclass{article} \usepackage{polyglossia} \setmainlanguage[variant=brazilian]{portuguese} \...
  • 740
0 votes
1 answer
88 views

Changing colors in soul package

I am writing a template for my lecture notes and I wanted to have a different color as my highlighted text. \usepackage{soul} \usepackage[dvipsnames]{xcolor} \definecolor{delectricblue}{RGB}{93, ...
  • 3
0 votes
1 answer
122 views

URL with track changes and line breaking

I am trying to handle URLs such that I can: split the URL in multiple lines if too long exceeding the page width include a track change mode which means being able to: strikethrough and underline ...
2 votes
1 answer
50 views

Why does highlighting stop working when I introduce hyphenation and text including an equals sign?

I'm using soul's \texthl in combination with \texttt to render inline code that can break at arbitrary hyphenation points when it reaches the end of a line. To simulate the "verbatim" aspect ...
  • 1,512
0 votes
0 answers
23 views

Importing geometry package messes up line breaking behavior of \texthl

It looks like uncommenting line 6 of the code below suppresses the line breaking behavior of \texthl \documentclass[a4paper, 11pt]{article} \usepackage{parskip} \usepackage{fontspec} \usepackage{...
  • 1,512
0 votes
1 answer
112 views

How to use soul's `\ul` instead of `\underline` in TeXstudio

I'm using TeXstudio on Linux, and there is an option under the LaTeX/Font Styles menu to underline the selected text. For convenience, I set Alt + U as a shortcut so that I can quickly underline ...
  • 247
0 votes
1 answer
43 views

How to Underline (with Linebreaking) within Contiguously Highlighted Text Using Soul

I would like to use the command \ul within a block of text that is contiguously highlighted using the macro contained in the following code: \documentclass[12pt,openany]{book} \usepackage{soul} \...
4 votes
4 answers
275 views

pdflatex: conflict between pdfcomment and soul

Here's the MWE: \documentclass{article} \usepackage{soul} \usepackage{pdfcomment} \begin{document} \section*{\hl{Fine}} \section{\hl{Error}} \end{document} which gives the following error ...
  • 41
1 vote
1 answer
77 views

How to Break Text-Underlining within a Paragraph without the Soul Package

Consider the code: \documentclass{book} \usepackage{soul} \begin{document} \thispagestyle{empty} \large How may I do this without the \textit{soul} package?\\[7pt] \ul{Text underlining with ...
  • 7,262
0 votes
0 answers
54 views

How to set background color for long in-text citations with line wrapping?

Normally for revised-version, the revised text should be highlighted. When it contains long in-text citations which span more than one line, the background color will extend to the margin, and ...
  • 43
0 votes
1 answer
72 views

Make \hl include linebreaks

I am using soul package and \hl to highlight text in my Latex. However, it does not work when there is a linebreak or a new paragraph. I have a whole page to highlight. Is it possible to make \hl ...
0 votes
0 answers
33 views

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

Ho do I underline gap in both side aligned line like this: \documentclass{article} \usepackage{cmap} \usepackage[utf8]{inputenc} \usepackage[T2A,T1]{fontenc} \usepackage[english,russian,ukrainian]{...
0 votes
1 answer
23 views

Soul hl within a mdframed environment won't print footnote number?

I am trying to highlight some text with soul::hl within a mdframed environment defined by newmdenv. I get expected output using: hl text outside of the environment normal text within the environment. ...
  • 598
0 votes
0 answers
30 views

soulutf8 + slovak = missing letteR?

The following file \documentclass[twoside]{book} \usepackage{soulutf8} \usepackage[slovak]{babel} \begin{document} \so{missing-letteR} \end{document} Produces the following output: Is it a bug?
0 votes
1 answer
67 views

How can I patch `minted` to use `soul`s higlighting

I'd like to highlight code with a gray background like StackExchange does. I know that I can set bgcolor in minted to put a solid background color on inline code. However, this makes minted use ...
  • 445
1 vote
0 answers
53 views

highlighting with different heights

I want to use \hl from the soul package to highlight my mathematical definitions. The problem is, that it is very inflexible when it comes to height. For example when I write \documentclass{article} \...
1 vote
1 answer
97 views

No automatic line-breaks with ulem and soul packages

In below code, I define two commands \refpage and \refpages using in turn, the ulem and soul packages, but both of them do not break a sentence when that sentence runs on beyond the end of a line. ...
  • 489
0 votes
1 answer
202 views

Multiple line strikeout with ulem/soul and newcommand

I'm having a hard time doing a strikeout of a multi-line text within a newcommand using ulem and soul. The answers below were not helpful: https://tex.stackexchange.com/a/74910/265141 % Multi-line ...
4 votes
3 answers
212 views

Turning soul:hl function into an environment

I am using the function hl from package soul to highlight text. I would like to create a specific environment, that would be used for the highlighting. I tried with newenvironment, but did not figure ...
  • 598
0 votes
1 answer
81 views

How to change the font used in text highlighted with soul's package \hl{} command

I'm using LaTeX with soul's package \hl{text} command to highlight text. I'd like to know if it is possible to automatically change the font used in text marked with hl{text}. I know that I can do ...
2 votes
2 answers
150 views

l e t t e r s p a c i n g with soul/soulutf8

I use l e t t e r s p a c i n g provided by soul/soulutf8 to emphasize words. But If I try to copy a spaced word from the pdf-file, then I get "w o r d" instead of "word". Also ...
1 vote
1 answer
83 views

underline a specific hyper link

I would be happy if anyone can help me to color differently only one specific hyperlink, (preferably, without setting \hypersetup{}. Many thanks in advance. \documentclass{article} \usepackage{soul} ...
0 votes
1 answer
387 views

Using \ul{} (from soul package) with referencing labels (\nameref)

I have this following code: \documentclass[12pt]{article} \usepackage{hyperref} \usepackage{soul} \usepackage{blindtext} \begin{document} \section{Introducton} \label{sec:intro} \blindtext{} \...
2 votes
2 answers
219 views

soul package and Cyrillic with xelatex

How to handle Cyrillic ymbols with soul package? \documentclass[a4paper,10pt]{book} \usepackage{polyglossia} \defaultfontfeatures{Ligatures={TeX}} \setmainfont{Liberation Serif} \...
  • 491
1 vote
0 answers
46 views

soul package with Latex dilimiter [duplicate]

I would like to ask that how can we use Latex delimiter \(\) instead of $$ inside parameter of \hl{} highlight from soul package? \documentclass[a5paper,12pt]{beamer} \usepackage{soul,xcolor} \...
  • 139
0 votes
0 answers
75 views

Looking for a Soul Alternative to Underline in Color with Custom Depth and Thickness Using Pdflatex

Consider the code \documentclass{article} \usepackage{color,soul} \begin{document} \Huge \setulcolor{red} \setul{}{2.5pt} \textcolor{blue}{\ul{\textbf{some text}}} \end{document} with output This ...
0 votes
2 answers
116 views

Why and how ulem package disable linebreaking and stretching encountering brace and macro replacement

Descriptions of my questions So, I am doing some hacking which requires me to use ulem package. I found on page 5 of the documentation of this package (dated 2019/11/18) that One important ...
1 vote
1 answer
93 views

Highlight function does not work with vietnamese language

So i was trying to highlight some text in Vietnamese but all latex programs like overleaf and texstudio all failed to load the text. So what i did wrong? Here's my packages: \documentclass[12pt, ...
  • 15
1 vote
0 answers
44 views

Glossaries and soul causing problems when used together, specifically \glsdisp

Unfortunately, the package soul does not coexist well with glossaries. From this answer it seems that to get both packages to work within the same document one must make use of the \soulregister ...
  • 1,512
6 votes
0 answers
331 views

Cross-line inline tcolorbox

As shown in the following example, underlining a cross-line sentence can be easily done by \ul via soul.sty. Can a cross-line sentence be tcolorboxed automatically in a similar way? \documentclass{...
  • 7,892
2 votes
1 answer
49 views

How do I stop hyperref from putting PDF text enhancements in the bookmarks?

In my book I used a stylized font and background to indicate bits, like this: I do that with this macro: \newcommand{\bindigits}[1]{\colorbox{lightlightgray}{\tt{#1}\rm}\xspace} So I thought it ...
  • 4,620
4 votes
3 answers
162 views

Using soul and xcolor to highlight \emph renders some letters incorrectly

Minimum working example: \documentclass{article} \usepackage{xcolor} \usepackage{soul} \begin{document} \hl{\emph{irreducible}} \hl{{\emph irreducible}} \emph{irreducible} \end{...
  • 41
2 votes
1 answer
41 views

Line-width distributed letter-spacing with \newcommand macros

I am using the soul package to produce "distributed" text. That is, text that is automatically spaced such that it fills the entire line. This works great, but now what I want to do is use a ...
1 vote
0 answers
122 views

Why does highlighting in the soul package change the spacing between letters?

\documentclass{ieeeaccess} \usepackage[noadjust]{cite} \usepackage{amsmath,amssymb,amsfonts} %\usepackage{algorithmic} \usepackage{graphicx} \usepackage{textcomp} \usepackage{color, soul} % comment ...
  • 615
0 votes
0 answers
86 views

How to highlight multiple lines of inline equations?

\documentclass{ieeeaccess} \usepackage[noadjust]{cite} \usepackage{amsmath,amssymb,amsfonts} %\usepackage{algorithmic} \usepackage{graphicx} \usepackage{textcomp} \usepackage{color, soul} % comment ...
  • 615
2 votes
0 answers
653 views

MDPI Default Template Highlight

Hi everyone I am working on MDPI submission using their template avaliable on overleaf and their site here I am highlighting changes using the soul package and the \hl{} but everytime I do this on the ...

1
2 3 4 5