Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [ulem]

{ulem} concerns the ulem package for underlining and strikethrough capabilities

Filter by
Sorted by
Tagged with
0 votes
1 answer
30 views

Strike-through text paragraph containing equations

I have several paragraphs of text that contain equation environments and in-line equations. How do I cross out/strike through these paragraphs using ulem package? I tried the suggestions in this ...
Medulla Oblongata's user avatar
3 votes
2 answers
84 views

How to center caption under underlined text

I'm using ulem package to underline text. That's my setup: \usepackage{ulem} \setlength\ULdepth{1.5pt} \noindent Student {\uline{Meow Meow \hfill} \\[-.3\baselineskip] {\centering \footnotesize full ...
Intolighter's user avatar
0 votes
0 answers
27 views

illustarte an removed sentence by ulem

For a one-column text, the below command can help us to cross a sentence with a line. \usepackage{ulem} \newcommand{\soutthick}[1]{% \renewcommand{\ULthickness}{1.3pt}% \sout{\textcolor{folly}{#1}}% } ...
Inzo Babaria's user avatar
2 votes
1 answer
70 views

How can I print a footnote in an \sout from ulem?

So I have a text that gets striked out through the \sout of package ulem. I learned I need to put the \footnote in an \mbox to protect it from getting broken, but the foot note is not printed: \...
TobiBS's user avatar
  • 5,270
0 votes
0 answers
30 views

Underlining a \def text [duplicate]

So basically I have defined a term: \def\Title{Lorem ipsum dolor sit amet consectetur adipiscing elit risus, maecenas nisl imperdiet aliquet taciti ac.} And I want to underline it, but when I do so ...
Keith Kamson's user avatar
2 votes
3 answers
974 views

Can't produce a LaTeX file, error says I am missing 'ulem.sty'

I have been using org mode on my Manjaro system for more than two years, but after the latest update to the LaTeX repos, I can't seem to export org files to pdf or preview latex fragments. The error I ...
Dean's user avatar
  • 41
1 vote
1 answer
23 views

\uline with \hspace does not render at beginning of wrapped line

Not sure what is going on. It seems that a \uline with only \hspace does not render if at the beginning of a wrapped line. \documentclass[12pt]{article} \usepackage{geometry} \usepackage{mathptmx} \...
Oliver's user avatar
  • 229
1 vote
1 answer
59 views

xparse command optional argument in \uline{} error

Sorry, but I am so bad in English. I try my best to describe my problem. Here is an example \usepackage{ulem} \usepackage{xparse} \NewDocumentCommand{\test}{o m}{ % #1#2 } \begin{document} %\...
hua's user avatar
  • 13
2 votes
0 answers
126 views

Underlining Command preventing line breaks

Based on a code by Alex Chan and help from Jinwen here, I made a custom underlining command with nice results: as you can see on the pictures (here and in Jinwen's post edited by me), the underline ...
Vincent Krebs's user avatar
0 votes
1 answer
68 views

Grouping mismatch if loop is dissolved

I am sure that I overlooked something very obvious. Still, why does the example in this nice answer work, but if I remove the loop, I get an error about a grouping mismatch? Consider the following ...
Jasper Habicht's user avatar
1 vote
1 answer
323 views

Are there any similar package (or color ulem) to ulem package with color?

Are there any similar packages (or color ulem) to the ulem package, with color, underline, sout, xout, dash underline, dot underline with color as parameter? I found this Q&A about changing the ...
Mika Ike's user avatar
  • 3,781
4 votes
1 answer
166 views

Passing formatting commands as arguments

I have a custom underlining command \cleverul{text} proposed by @Jinwen here. I would like to be able to pass the command inside a redefinition of the \@makechapterhead macro, as a formatting value ...
Vincent Krebs's user avatar
1 vote
1 answer
52 views

sout doesn't stike through the denominator

Here is the code. \documentclass[12pt,letterpaper]{article} \usepackage{ulem} % strike through \begin{document} \[ \frac{\hat{N}} {O_{max} - O_{min}} = \frac{209.06 \hspace{1mm} \mu V} {(\sout{...
kile's user avatar
  • 667
0 votes
0 answers
54 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 ...
RosesBouquet's user avatar
4 votes
1 answer
302 views

What is the correct way to use the latex-firstaid package?

I have just noticed the latex-firstaid package for patching other packages. Should latex-firstaid be loaded before or after the packages that it patches? Or some other way? The package documentation ...
Doc Octal's user avatar
  • 369
0 votes
1 answer
423 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 ...
D.R's user avatar
  • 771
0 votes
0 answers
133 views

\usepackage{ulem} package for strikethrough generates underlined reference section

I am using the ulem package for strikethrough as: \sout{and PET} method But this underlines some parts of my references in bibliography section. If I comment the ulem out then strikethrough goes with ...
banikr's user avatar
  • 17
0 votes
0 answers
45 views

Combining ulem and seqsplit results in error

The following code works fine when running pdflatex in version pdfTeX 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian), but fails in version pdfTeX 3.14159265-2.6-1.40.21 (TeX Live 2020/Debian): \...
finswimmer's user avatar
3 votes
1 answer
272 views

How to get `\enquote` command to work when nested inside `\uline` command?

When writing \uline{\enquote{test}}, the result is typeset but a square is added and LaTeX throws an error Package csquotes Error: Unbalanced groups or invalid nesting. \uline{\enquote{test}} \...
Al-Motasem Aldaoudeyeh's user avatar
0 votes
0 answers
156 views

How do I top strikethrough (\sout) interfering with bold font (\textbf) in Chinese?

MWE: \documentclass{article} \usepackage{xeCJK} \usepackage[normalem]{ulem} \begin{document} \textbf{a a a} a a a,\textbf{aaa}aaa. \sout{\textbf{a a a} a a a,\textbf{aaa}aaa.} \textbf{我我我}我我我,\...
Rebecca J. Stones's user avatar
1 vote
1 answer
156 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. ...
niksirat's user avatar
  • 617
2 votes
1 answer
868 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 ...
BGranato's user avatar
3 votes
3 answers
452 views

Clever Underlining

I'm using ulem package to perform clean underlining as advised here https://alexwlchan.net/2017/10/latex-underlines/ It works like a charm, but the line stays at the same thickness whatever the font ...
Vincent Krebs's user avatar
0 votes
2 answers
134 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 ...
Qi Tianluo's user avatar
3 votes
1 answer
1k views

Strikethrough and line breaks

I need to use \sout{} from the ulem package for longer passages of text and in combination with other macros. However, this removes all linebreaks and the text is kept on a single line. Is there any ...
Tuetschek's user avatar
  • 273
2 votes
0 answers
343 views

\uline cannot wrap the line after texlive2021

I need to underline some text and hope the text automatically wrap at then end of the line. see Why does underlined text not get wrapped once it hits the end of a line ? The \uline works with ...
CSGrandeur's user avatar
3 votes
3 answers
379 views

ulem with hspace error

The following code \documentclass{minimal} \usepackage{ulem} \begin{document} \emph{\hspace*{2in}} \end{document} used to work without error, to produce an underlined blank space of width 2 inches. ...
Ethan Duckworth's user avatar
2 votes
1 answer
90 views

A problem of alignment with "ulem"

I defined a underline style by ulem package to add a = sign under each character, as follows: \newcommand{\suline}{\bgroup\markoverwith{\raisebox{-0.6em}{=}}\ULon} With parskip package added, the ...
Jinwen's user avatar
  • 8,618
0 votes
1 answer
177 views

Titlesec's titleformat with ulem

I have a very large document that can be reduced to the below example to provide custom formatting for subsection headers. \documentclass[]{article} \usepackage{ulem} \usepackage[explicit]{titlesec} ...
Steve's user avatar
  • 453
0 votes
0 answers
591 views

\uline does not work with \hspace

Long story short: Changed laptop and previous working documents don't compile anymore. Problem show up with comamand \uline from \usepackage[normalem]{ulem} with argument \hspace{3cm}. \documentclass[...
user30586's user avatar
1 vote
1 answer
111 views

Why does \endgroup not work inside \uline?

I want underlined text (or math) where the color of the underline is different from the color of the text (e.g. black text underlined by a red line). Therefore I tried the following code using the \...
Jakob's user avatar
  • 1,003
0 votes
1 answer
5k views

Strikethrough command in LaTeX [closed]

I am trying to have as strikethrough text using base LaTeX command and up till now there is no solution available except the use of some packages, i.e, ulem and cancel. Is there any other way to get a ...
rumaisa_niazi's user avatar
1 vote
1 answer
577 views

uline and uuline same line width

How to align uline and uuline same width of line using ulem package? I attached screenshot for your reference.
Rajesh N's user avatar
  • 829
0 votes
1 answer
131 views

Bad interaction between \usepackage{ulem,tikz} and citations (glossaries and footnotes) in Tufte-Book document class

I constructed a figure with TikZ in a tufte-book document class, and I need to use the ulem package as follows \documentclass[symmetric,justified,marginals=raggedouter]{tufte-book} \usepackage{ulem,...
Phil8544's user avatar
  • 407
4 votes
3 answers
3k views

Changing the color of special underlines with ulem

I'm using the ulem package to produce different kinds of underlining, and want each underline style to be in a different color (so that the difference is visible whether you're viewing the document in ...
Josh M's user avatar
  • 43
4 votes
1 answer
215 views

Math accent at line start in align causes error

The following code no longer works after the LaTeX2e 2019-10-01 kernel update (error occurs using XeLaTeX). \documentclass{article} \usepackage{fontspec,ulem,amsmath} \begin{document} \begin{align} \...
Ruixi Zhang's user avatar
  • 9,613
1 vote
2 answers
278 views

Centering table entries with a custom underline that matches width of column

I have a simple table with 3 columns, which I am using as a heading for data. I have defined a custom underline rule (with custom thickness, color and depth) that I am using to underline each table ...
Jake Rankin's user avatar
2 votes
1 answer
498 views

Redefining contour colour (for underlining)

I'm using the following code (taken from this site for putting nice underlines under my text. \usepackage{ulem} \usepackage{contour} \renewcommand{\ULdepth}{1.8pt} \contourlength{0.8pt} \newcommand{...
Matt's user avatar
  • 417
3 votes
1 answer
122 views

How to use a command that takes one argument as a declaration?

I would like to apply \sout{} from the ulem package to anything between \DIFdelbegin and \DIFdelend below (commands from the Latexdiff script). Can the definitions of the two commands be modified in ...
u17's user avatar
  • 5,006
3 votes
2 answers
218 views

`\uline` from `ulem` package won't break lines automatically when containing boolean expression

Here is the MWE: \documentclass{minimal} % \usepackage{lipsum} % \let\uline\underline \usepackage{ulem} \newif\ifanswer \newcommand{\showanswer}[0]{\answertrue} \newcommand{\hideanswer}[0]{\...
Bill's user avatar
  • 61
3 votes
1 answer
81 views

Can quotes made with \MakeAutoQuote made robust in a \ulem?

The following example gives the error ! Extra }, or forgotten \endgroup because of the »« in the \uwave command. Can the definition of the quotes be changed to avoid the error without loosing the ...
Ulrike Fischer's user avatar
2 votes
2 answers
474 views

Extending section heading underline into margin

I'm using Koma and have got my section heading numbers set in the margin of the page. I have also got a coloured underline for the section headings. I want, if possible, the underline for the section ...
Lyndon Drake's user avatar
5 votes
3 answers
460 views

ULdepth does not change space in equation

I am trying to underline a result within an equation environment. The result contains a Matrix. I use the ulem package with uline. How can I add more space between my matrix and the line? I tried ...
Karl's user avatar
  • 139
8 votes
2 answers
487 views

A problem with Hebrew and English underlined text

When I'm combined at the same line Hebrew and English, the line below is "breaking" for two lines.... e.g. MWE: \documentclass[a4paper,english,hebrew,numbers=noenddot]{scrartcl} \usepackage{...
heblyx's user avatar
  • 2,591
2 votes
2 answers
3k views

Using \cite in \sout causes errors

When I use \cite[something with spaces]{ref} inside \sout{...} I get errors. For the article document class it helps to replace spaces by ~. That doesn't help, however, for the elsarticle document ...
sigvaldm's user avatar
  • 243
4 votes
1 answer
509 views

Striking out colored text through user defined commands

I have been trying to strikeout a colored text defined by a macro, but it seems that it does not support line breaking. I have a command bt to type blue text and I want to strike some of the text with ...
Alexandre H T Dias's user avatar
2 votes
1 answer
787 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 ...
Adrian's user avatar
  • 23
3 votes
3 answers
1k views

How to control the vertical space below a double-underline?

I use an edited version of the \\uline command from the ulem package to get a nice compact double underline to denote tensor variables. The used code comes from this question. My problem is that the ...
Robert's user avatar
  • 163
3 votes
3 answers
295 views

Redefine `\uline` so `\colorbox` is locally defined to have underlined text, too

Initial problem: I want to underline the text with a continuous line with the following code: \uline{No underlining for \colorbox{lightgray}{everything} inside the colorbox.} Workaround: A ...
finefoot's user avatar
  • 579
0 votes
1 answer
2k views

How can I use `\uline` from the `ulem` package to underline text inside a `\colorbox`?

Screenshot: I have the following code: \uline{No underlining for \colorbox{lightgray}{everything} inside the colorbox.} Which looks like this: How can I get a continuous line for the text inside \...
finefoot's user avatar
  • 579