Questions tagged [ulem]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
43 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{我我我}我我我,\...
user avatar
1 vote
1 answer
47 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. ...
user avatar
  • 453
0 votes
1 answer
44 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 ...
user avatar
3 votes
3 answers
303 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 ...
user avatar
0 votes
0 answers
34 views

Underlining subsections / subsubsections in LaTeX with ulem?

I want to underline subsubsections in the way shown in the example below with the uwave method of the ulem package. Example of how it should look like This is what I got so far: \documentclass[12pt,...
user avatar
0 votes
2 answers
92 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 ...
user avatar
1 vote
1 answer
367 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 ...
user avatar
  • 217
2 votes
0 answers
159 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 ...
user avatar
3 votes
3 answers
229 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. ...
user avatar
1 vote
1 answer
41 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 ...
user avatar
  • 6,566
0 votes
1 answer
82 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} ...
user avatar
  • 443
0 votes
0 answers
399 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[...
user avatar
1 vote
1 answer
80 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 \...
user avatar
  • 731
0 votes
1 answer
3k 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 ...
user avatar
1 vote
1 answer
309 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.
user avatar
  • 829
0 votes
1 answer
87 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,...
user avatar
  • 367
3 votes
2 answers
1k 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 ...
user avatar
  • 33
4 votes
1 answer
193 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} \...
user avatar
  • 9,288
1 vote
2 answers
169 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 ...
user avatar
2 votes
1 answer
351 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{...
user avatar
  • 377
3 votes
1 answer
90 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 ...
user avatar
  • 4,896
3 votes
2 answers
159 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]{\...
user avatar
  • 61
3 votes
1 answer
65 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 ...
user avatar
2 votes
2 answers
340 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 ...
user avatar
5 votes
3 answers
267 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 ...
user avatar
  • 139
8 votes
2 answers
435 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{...
user avatar
  • 2,449
1 vote
2 answers
2k 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 ...
user avatar
  • 213
3 votes
1 answer
194 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 ...
user avatar
1 vote
1 answer
495 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 ...
user avatar
  • 13
2 votes
2 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 ...
user avatar
  • 133
3 votes
3 answers
210 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 ...
user avatar
  • 469
0 votes
1 answer
910 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 \...
user avatar
  • 469
2 votes
2 answers
1k 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 \...
user avatar
  • 543
1 vote
1 answer
63 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. ...
user avatar
  • 3,212
3 votes
2 answers
453 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 ...
user avatar
  • 1,066
3 votes
1 answer
295 views

Punctuation and text decoration - 'csquotes' not compatible with 'ulem' or 'soul'

I'm using TeX for a long time now, but I'm currently struggling integrating some features for my daily use. To be more precise: I'm intending to use features like text highlighting (yellow markup), ...
user avatar
  • 31
1 vote
0 answers
875 views

How to underline text with in-text citation with wrapping?

The line of text I want to underline includes in-text citation. My problem is that \uline only works on this line when I use \mbox(I get an error without \mbox), which makes it impossible to wrap the ...
user avatar
  • 111
3 votes
1 answer
480 views

How to underline whole bibitem in biblatex?

I want to underline whole bibitem when using biblatex. I tried \AtEveryBibitem{\uline} but failed. What I want to do:
user avatar
2 votes
1 answer
1k views

Problem with linebreak in combination with strikeout from the ulem package and newcommand

Is it possible to combine the "result" of a newcommand with the sout command of the ulem package with working linebrak/hyphenation? \documentclass{article} \usepackage{ulem,lipsum} \textwidth=3cm % ...
user avatar
2 votes
1 answer
1k views

Line break and hyphenation for underlined text

I am struggling with a problem that occurs using \underline. From other posts I heard that there is no possiblity for linebreaks using this command. However, I tried using the ulem package. In fact, ...
user avatar
  • 21
1 vote
2 answers
2k views

highlighting strikeout text with ulem shifts the line downwards

I'm trying to highlight a text with a strikeout word by defining a new command as explained in the docs of ulem. Unfortunately, that moves down the strikeout line a few points, which looks strange ...
user avatar
1 vote
1 answer
300 views

Textwidth underline while ragged right text

I want to do this: But all I can do is: \documentclass[14pt]{extreport} \usepackage[normalem]{ulem} \begin{document} \hfill\begin{minipage}[t]{0.7\textwidth} \begin{flushleft} Lorem:~\uline{ipsum ...
user avatar
0 votes
1 answer
119 views

Strange behaviour of ulem?

I know, it's ugly and seems stupid, but I need to redefine like that. I try a lot of things (\edef, \expandafter...) Nothing seems to work. No break line. \documentclass{article} \usepackage{...
user avatar
  • 165
5 votes
1 answer
356 views

KOMA -- Underlined headings using `ulem` conflicts with `hyperref`

I noticed, that if you underline headings with the use of ulem and redefining \sectionlinesformat (as done in this answer) does conflict with hyperref. The conflict only occurs on unnumbered sections, ...
user avatar
  • 49.2k
7 votes
2 answers
1k views

Underlining words with dash-dotted line without affecting the other text in LaTeX

NOTE: I am searching for a LaTeX solution. The ConText code was offered, which is a good answer, but that doesn't fit my purpose. I want to underline some words in text to show the parts of ...
user avatar
3 votes
1 answer
82 views

Comfortable solution for using ulem together with (r)eledmac

Preface: Sorry for the long text. By writing it, I was able to solve an earlier problem leading to this one. In Underlining with ulem package breaks footnotes Ulrike Fischer and Heiko Oberdiek answer ...
user avatar
  • 909
7 votes
2 answers
2k views

How to underline name of specific authors in biblatex?

My goal is to underline the name of specific authors in a bibliography processed by biber/biblatex. I can make them in bold following https://tex.stackexchange.com/a/73246/127979 and https://tex....
user avatar
  • 77
0 votes
1 answer
412 views

fun style cross-strike-out

I want to cross out (strike out) words or letters in fun ways for poster-sized text for children. ulem and cancel produce rather formal/sterile-looking cancellations, as do tikz-based combinations of ...
user avatar
  • 1,489
1 vote
0 answers
331 views

xecjk conflict with ulem?

Building the following MWE with xelatex in TeXnicCenter results in 5 errors: \documentclass{article} \usepackage{fontspec} \setmainfont[Mapping=tex-text]{Times New Roman} \usepackage{xeCJK} \...
user avatar
  • 559
2 votes
1 answer
3k views

Underline colored text with linebreak

I would like to underline colored text with a black line, and preserve line breaking. My best solution so far is using \uline from the ulem package. However, I cannot get my desired result. My ...
user avatar
  • 1,577