Questions tagged [ulem]
{ulem} concerns the ulem package for underlining and strikethrough capabilities
131
questions
2
votes
1
answer
55
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:
\...
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 ...
2
votes
3
answers
357
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 ...
1
vote
1
answer
20
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}
\...
1
vote
1
answer
55
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}
%\...
2
votes
0
answers
109
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 ...
0
votes
1
answer
66
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 ...
1
vote
1
answer
158
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 ...
4
votes
1
answer
140
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 ...
1
vote
1
answer
39
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{...
0
votes
0
answers
44
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 ...
4
votes
1
answer
285
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 ...
0
votes
1
answer
199
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 ...
0
votes
0
answers
60
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 ...
0
votes
0
answers
44
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):
\...
2
votes
1
answer
148
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}}
\...
0
votes
0
answers
113
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{我我我}我我我,\...
1
vote
1
answer
132
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.
...
0
votes
1
answer
544
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 ...
3
votes
3
answers
394
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 ...
0
votes
2
answers
127
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 ...
2
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 ...
2
votes
0
answers
297
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 ...
3
votes
3
answers
347
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. ...
2
votes
1
answer
81
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 ...
0
votes
1
answer
147
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} ...
0
votes
0
answers
544
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[...
1
vote
1
answer
108
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 \...
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 ...
1
vote
1
answer
489
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.
0
votes
1
answer
104
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,...
4
votes
3
answers
2k
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 ...
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}
\...
1
vote
2
answers
260
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 ...
2
votes
1
answer
448
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{...
3
votes
1
answer
118
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 ...
3
votes
2
answers
202
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]{\...
3
votes
1
answer
76
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 ...
2
votes
2
answers
442
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 ...
5
votes
3
answers
408
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 ...
8
votes
2
answers
478
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{...
1
vote
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 ...
3
votes
1
answer
348
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 ...
2
votes
1
answer
739
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 ...
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 ...
3
votes
3
answers
281
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 ...
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 \...
2
votes
2
answers
2k
views
insert text in rule
I have difficulty writing a compact command that allows me to insert a text between two lines.
I read some links such as this and this, but each one treats the left and right line separately
\...
1
vote
1
answer
65
views
How do I get permission for exam materials?
MWE
\documentclass{minimal}
\usepackage{ulem}
book = 1
phone = 0
photocopy = 1
internet = 0
tablet = 1
\begin{document}
Book, \xout{phone}, photocopy, \xout{internet}, tablet, \ldots\ free or open.
...
3
votes
2
answers
645
views
Size/density of dots used by \dotuline command (ulem package)
I would like to use the \dotuline command (from the ulem package) to create a "fill in the blanks" document.
It gives good results but when the blank becomes small it is hardly noticeable (a single ...