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.

learn more… | top users | synonyms

1
vote
1answer
23 views

Soul letterspacing in memoir sections with \setsecheadstyle

I realize I have asked almost the same question earlier. There, the answer involved xparse or titlesec. Titlesec however gets into conflicts with memoir's pagestyles (running header settings, ...
3
votes
2answers
104 views

Page citation in soul

I'm using the soul package. This works: \ul{lorem ipsum} This doesn't work: \ul{lorem \cite{foo} ipsum} This does work: \ul{lorem {\cite{foo}} ipsum} Neither of these works: \ul{lorem ...
8
votes
3answers
186 views

French accents in \hl from soul package

I'd like to use the \hl command from the soul package in a French text. However, it does not work whenever the part to highlight contains French accents (e.g.: \hl{é}). I could use \'e instead of é ...
2
votes
1answer
69 views

Using multiple { and }

It seems that using multiple {{{ and }}} causes some problem to the latex document. Assume this line \usepackage{color,soul} \begin{document} something \hl{I am referring to \cite{publi}} is good. ...
2
votes
0answers
52 views

No room for a new \dimen despite of loading etex [duplicate]

After upgrading to TeX Live 2013 one of my books does not compile any longer. I do load etex, but still have not enough room. What can I do? Back in 1994 I had a colleague who hacked the LaTeX source ...
3
votes
1answer
85 views

Strikethrough Cyrillic text in XeTeX preserving hyphenation

I was looking for the way to create a strikeout text in XeTeX. After some googling I found two packages that supposedly could do that: ulem and soul. However, it turned out that both of them have some ...
4
votes
1answer
204 views

Underline text with background (soul and ulem nesting)

I'm using soul's \hl to set background for the paragraph parts and ulem's \uline to underline text. The problem is what I cant underline text for text with background. Initial doc: ...
8
votes
1answer
235 views

How to make \hl (highlighting) to automatically place incompatible commands in \mbox?

The soul package provides a useful command \hl for highlighting text. However, \cite, \ref, and some other commands (maybe equations too) must be placed within an \mbox in order for \hl to work ...
2
votes
1answer
91 views

Using latexdiff to highlight changes: alternatives for soul?

I am using latexdiff to create a pdf that highlights changes between two .tex along with hg diff latex, so as to use with Mercurial. However, the problem is that the the strikethrough formatting ...
9
votes
2answers
177 views

Extending underline up to the right side

I need to create command that underlines some given text that takes several lines. And the underline of the last line should be extended up to the right side of page. When I need just to underline ...
0
votes
0answers
25 views

Highlighting SI: “invalid-token-in-number” [duplicate]

I need to highlight some parts of code containing both text and numbers using the siunitxpackage but I get an invalid-token-in-number, the token being a number! Here's my mwe: ...
6
votes
1answer
122 views

Defining font color inside highlight fails

Since I wanted a better readability of highlights of a would be black & white-printed document, I needed to change both the highlighting color (gray) AND the font color (white). Depending which ...
11
votes
2answers
339 views

List of Underlining Packages - Pros and Cons

The \underline macro built into LaTeX is pretty much not useable per Why does underlined text not get wrapped once it hits the end of a line ? I have been attempting to use the soul package to ...
13
votes
2answers
226 views

Soul's underline misses text produced by a macro

The macro ul provided by soul works great, allowing linebreaks within an underlined text block. It even supports macros - if they were registered with soulregister. But if these registered macros ...
3
votes
1answer
79 views

Using soul with indirect formatting applied (using macro with 2 parameters, one possibly optional)

This is a followup to Using soul with indirect formatting applied, where it was determined that using \soulregister allows the soul macros to have font switching macros within the parameters ...
9
votes
1answer
123 views

Using soul with indirect formatting applied

I am using the soul package to underline omitting the descenders. It seems that passing the following as a parameter works fine \textit{special text} but if the \textit is applied indirectly via ...
8
votes
1answer
119 views

Soul vs Microtype in regards to Tracking

When using small/all caps, I was told to adjust the tracking alongside. I have found \SetTracking from microtype and \so from soul. Is there an advantage to using one or the other and if yes why? Do ...
5
votes
1answer
106 views

“! Argument of \xpg@nospace has an extra }” error message with polyglossia

I use a code – to be found at the end – for long citations in the french tradition. When I use french quotation marks inside such a long citation, I have no problem on compiling with xetex if I load ...
5
votes
2answers
79 views

Embedding \soulomit in a macro

In the MWE below, the code: \MyUl{abd \soulomit{\MyLink{www.google.com}{The Google}} ghi} works exactly as desired: However, when I attempt to wrap this in a macro, and use \MyUl{abd ...
1
vote
0answers
86 views

Emphasize text that is highlighted using the soul package [closed]

I can highlight a bit of text (i.e., make the background yellow) using the soul package like this: \hl{a bit of text} I figured I could also use italics like this: \hl{\emph{a bit of text}} ... ...
2
votes
1answer
102 views

soul package does not work with user-defined language shorthands

Using \caps from the soul package with user-defined language shorthands generates an error. However, it works fine with language shorthands defined by babel itself, e.g. by using ...
1
vote
1answer
80 views

How to use soul with glossaries to space-out acronyms?

I want to increase the spacing between capital letters of acronyms inside text. Acronyms are printed by \ac, \acs, etc. commands of the glossaries package. soul package provides a nice command \caps. ...
2
votes
1answer
950 views

Issue with soul and nested macros

I'm using package soul to highlight text, for example with \hl{some text}. It works nicely in general, but when the text contains other macros, soul simply skips it. For example: \usepackage{soul} ...
10
votes
1answer
2k views

How to make highlighting work in beamer with overlays

I'm trying to use the soul package to get highlighting via \hl{some text}. I'd like to do this in overlays in beamer. I'm trying to follow the guidelines in section 9.6.1 of the beamer manual to ...
7
votes
2answers
223 views

Is there any solution for highlighting text in CJK?

Is there any solution for highlighting texts or sentences in Chinese, Japanese, and Korean? I know none, at the moment. But this will be changed, if someone would like to help me with CJK in LaTeX. ...
13
votes
1answer
1k views

Strikeout - when which package ? ( ulem vs soul vs …)

When to use which package for strikeout? I see answers : \usepackage{ulem} \sout{Hello World} or \usepackage{soul} \st{Hello world} or \usepackage{cancel} \cancel{Hello world} In what ...
10
votes
1answer
903 views

Environment to underline/strikeout for comparing versions

I have a TeX file that I'm editing with several collaborators and we use environments to highlight and discuss proposed changes like the following: Some text. \begin{old} Text that I propose to ...
5
votes
1answer
212 views

Switching a string in a token register to lowercase and processing via the package soul

I would like to store a string in a token register, transform it to all-lowercase, and process the resulting string via the macro \caps provided by the package soul. That is to say, transform the ...
4
votes
2answers
173 views

Hyphenatable material enclosed in group braces

I have text that I need to repeat quite a few times: \newcommand{\repeatme}{text to repeat that is somewhat long and verbose} I'd like to underline this text and have it not cause hbox overflow ...
10
votes
2answers
925 views

soul: broken highlighting with xcolor when using \selectcolormodel

I try to highlight text using the soul package. But I experience problems if I use it in combinations with the xcolor command selectcolormodel, only spaces are highlighted as shown in the MWE: ...
0
votes
1answer
242 views

Argument of \someCustomCommand has an extra } encountered when command is put in \ul. How to fix this? [duplicate]

Possible Duplicate: Custom command inside soul package's \hl To make the document easier to understand (and easier to write), I have defined: \newcommand{\code}[1]{\texttt{#1}} I ...
6
votes
2answers
2k views

labeling underlined text over multiple lines

I have a large number of documents I need to create, and there is one very particular need I cannot find a solution for. In these documents, there are pieces of text that are underlined and they ...
3
votes
1answer
144 views

Problem with using soul in paragraph mode and siunitx immediately after

This problem seems somewhat obscure, it is potentially a bug in siunitx or soul (I am aware of issues with the latter). Which one is uncertain and I'm not certain that it is a bug. What I want to do ...
5
votes
4answers
834 views

Problem with a counter inside a \ul command

The following MWE gives a compilation error. If i move the \arabic{count} outside from the \ul command, it works \documentclass{article} \usepackage{soul} \begin{document} \newcounter{count}% ...
10
votes
1answer
657 views

Why is it that coloring in soul in beamer is not visible

\documentclass{beamer} \usepackage{soul,color} \begin{document} \begin{frame} \hl{Hello World} \end{frame} \end{document} I process this with pdflatex and I do not see the expected highlight. ...
7
votes
1answer
168 views

soul dropping some accented letters from the end of words

I'm using soul to letterspace headings in a Hungarian document and compiling it with lualatex. For some reason soul drops some of the accented letters at the end of a word, but not all. In the ...
4
votes
1answer
392 views

Letterspacing memoir section headers

I'd like to add letterspacing to the \section commands with \setsecheadstyle in a memoir book. I tried using soul: \sodef\soSection{}{.1em}{.5em plus.1em}{.1em plus.1em minus.1em} ...
12
votes
1answer
432 views

Triple underlining

I am quoting passages from ms. letters and need to underline a few words with three lines. Does a command exist for doing so? I've consulted Melchior Franz's soul package documentation from 2003 and ...
1
vote
1answer
525 views

Highlight foreground text using overpic?

I am using the overpic package to edit a pre-created pdf by writing notes in between the lines using \put(){$$} for each line. Im having difficulty however using the soul package and \hl to ...
7
votes
1answer
324 views

How could I use \input within soul arguments?

So, I basically want to do something like this: \documentclass{article} \usepackage{soul} \begin{document} \so{Hello} \so{\input{key.tex}} \end{document} Now the first "so" works but the second ...
3
votes
2answers
632 views

How to make overlaid text?

Is there a nice way to overlay text in the space of one character? So if text is overlaid as I described it would almost result in a black square.
3
votes
1answer
355 views

conditional highlighting with soul

The journal PLoS ONE, says in the FAQ When submitting your revision, you will need to include the following new files: [...] A ‘clean’ copy of your revised manuscript. A revised manuscript with ...
6
votes
1answer
370 views

bug with page numbers when using soul package

I recently ran into a curious bug when using the soul package. I managed to boil it down to the following example. The problem is that the page numbers get messed up. In the example below, they should ...
6
votes
1answer
378 views

Using a \phantom{} in \ul from the soul package

In responding to how to typeset a Long underscore in LaTeX, I attempted to use a \phantom with \ul, but end up Argument of \makeph@nt has an extra }. So, what is the proper way to use a \phantom ...
6
votes
1answer
2k views

Problems with \ref when using soul for highlighting

Here is a minimal example showing the problem. \documentclass[10pt]{article} \usepackage[usenames,dvipsnames]{color} \usepackage{soul} %\soulregister{\ref}{1} \begin{document} \section*{x}\label{x} ...
5
votes
1answer
937 views

Error “Reconstruction failed” with soul package

I've got a problem with the soul package while adding a letter-spacing to a result of a command that is defined just like this: \newcommand{\myCommand}{some text} In the document I'd like to have ...
6
votes
1answer
707 views

Custom command inside soul package's \hl

I'm having trouble with the soul package and its \hl command. The soul package's manual says I should not nest soul commands, which I didn't. \textsc works inside \hl. However, the following throws an ...
4
votes
1answer
2k views

How to highlight paragraph (linebreak preserving) as well as itemize, tabular etc.?

I want to highlight changes which are introduced by myself in the pdf document. So far the soul package is very neat but it does throw errors when I want to highlight not only paragraphs but also some ...
5
votes
2answers
310 views

How to only import certain commands?

The soul package defines a ton of short macros, some of which I use regularly for my own writing. I only need \hl and \sethlcolor. Is there a way to load the package and only get those two commands? ...
17
votes
6answers
5k views

Highlight text in code listing while also keeping syntax highlighting

I’m using the listings package for code listings. Now I try to highlight some part of the code using \hl from the soul package. Here’s an example of a resulting query where the injected part of a SQL ...