Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [underline]

{underline} is about underlining portions of text for emphasis or blank spaces for creating forms. Popular packages are {soul} and {ulem}.

10
votes
2answers
1k views

Coloured underlines of equations and text in LaTeX Beamer

A previous question asked how to underline equations in color (1). However, many of the solutions suggested don't work in LaTeX Beamer. I also had difficulties finding ways for simple customisation, ...
7
votes
2answers
615 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 ...
6
votes
1answer
353 views

pdflatex vs lualatex underline mystery

Using lualatex, I have uderlined links : Using pdflatex they are gone : \documentclass[french]{article} \usepackage{xcolor,hyperref,tikz} \hypersetup{% colorlinks=true, urlcolor=blue, ...
5
votes
1answer
93 views

Underline part of a word while preserving kerning

The usual ways of underlining text (or at least the ones I know of: be it with \underline or e.g. the soul package) break kerning when used with part of a word. My current solution consists of a two-...
5
votes
3answers
2k views

Constant Length of \underline

My question is incorporated in the code/output. \documentclass{article} \begin{document} The underline \underline{\qquad} (\verb+\underline{\qquad}+) is the length of the underline that I would ...
5
votes
2answers
5k views

Is it possible to have italic and bold text, and linebreaks under the \underline{text} command?

I was trying to emphasize text with \textbf, \textit and \underline commands. But the text will not automatically wrap to the next line. I also tried the ulem package, and it did not work too. Does ...
5
votes
1answer
180 views

Formula in Latex: How to use special symbols in Latex?

I want to write following formula in Latex: The problem is the "i" underneath "x". It is not a regular fraction. It means that value "x" will be replaced with "i". How can I write this one in Latex? ...
4
votes
3answers
207 views

Macro to capitalize all letters and change breaks to underlines

I'm trying to make a macro that will take an input phrase, capitalize all letters, and replace all breaks with underlines: \ctest{one word} => ONE_WORD I've been trying to use the stringstrings ...
4
votes
1answer
781 views

Continue underlining up to percentage of textwidth

I need to create a recipient section with 3 lines. I'd like to have them underlined and with the same length, regardless of how many words I write in them. I could achieve the result with the {soul} ...
4
votes
1answer
110 views

Cloze package: Hyphenation does not work (anymore?)

I use the cloze package to create cloze texts. The documentation states specifically (p. 4): The command \cloze doesn’t change the behavior of the hyphenation. But when I try the given example, I ...
3
votes
2answers
931 views

\underline rule position

Using the \underline{} command and I'm getting very strange (and inconsistent) results. There randomly seems to be added spacing to one of the underlined words. Any suggestions/solutions would be much ...
3
votes
3answers
100 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 ...
3
votes
2answers
384 views

How to italic the first letter of a word in \verb|| structure

How italic the first letter of a word in \verb|| structure? Suppose that I want have italic (or underscore) for G in \verb|Good|.
3
votes
2answers
148 views

Field for handwritten text [duplicate]

I'm preparing a small workbook. I'm using gray empty underlines as in this answer to make empty fields for handwritten text. I'm using \documentclass[a4paper,11pt]{book}. \documentclass[a4paper,11pt]...
3
votes
2answers
386 views

The Current State-of-the-art TikZ Underliner

UPDATE: The Bounty period is over (AND GUESS WHAT? I gave the credits to the wrong Person (sorry CFR), but thanks Aditya for your contribution. Please upvote CFR answer!!). Find below my current ...
3
votes
2answers
51 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 ...
3
votes
1answer
82 views

How to put text at rightmost position of an underline?

\documentclass{article} \usepackage{booktabs} \usepackage[a4paper,left=0cm,top=0.2cm,bottom=0cm,right=0cm]{geometry} \usepackage{polyglossia} \setmainlanguage[numerals=Devanagari]{bengali} \...
3
votes
1answer
209 views

\everymath and \underline color

I use \everymath to change the color of all maths (blue). However, beyond my expectation, this color happens to automatically apply for any underlined texts. Please kindly instruct me how to solve ...
3
votes
2answers
1k views

How to keep a nice layout when combining overline/underline with superscript/subscript?

I would like to add indices as subscripts and superscripts to a couple of bounds denoted by underline (lower bound) and overline (upper bound), but I am not able to keep the same well-shaped look of ...
3
votes
1answer
108 views

Underline shift

How can i prevent downshift with mixing \underset and \underline? My code: \underset{\text{должность}} {\underline{\hspace{1cm}\text{доцент, к.т.н.}\hspace{1cm}}} \quad\underset{\text{подпись, дата}}{...
3
votes
1answer
58 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 ...
3
votes
0answers
36 views

Extending soul underline up to the right side of tabular

I found the \longunderline command at Extending underline up to the right side. However it does not work as expected in an tabular: \documentclass{article} \usepackage{tabularx} \usepackage{soul} \...
2
votes
2answers
552 views

Trying to create an underlined, wrapped link

I'm parsing user HTML to LaTeX templates. The HTML comes from a rich text editor, so of course the incoming HTML syntax can be almost anything. There's one case that breaks LaTeX that I have to handle....
2
votes
1answer
169 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:
2
votes
1answer
164 views

Underline inside of enumerate and align

MAIN QUESTION! This is my first question on here so bear with me. I would like to underline my last line of code where it says underline. I have tried to do so as you can see below, but I keep getting ...
2
votes
2answers
471 views

Underline width

It seems, by using the command \setul{}{ pt} in the soul package, we can change the underline width. But I don't want to use this package. Is there any other command for changing the underline width ...
2
votes
3answers
124 views

underline and background color for section or subsection

Please , help me to get a section or subsection with an underline and background color as the same figure below ? Here is the code of my document with ordinary titles : \documentclass[11pt]{report}...
2
votes
1answer
145 views

How to set not underlined?

\textit is canceled by \textup \itshape is canceled by \upshape \textbf is canceled by \textmd \bfseries is canceled by \mdseries \normalfont cancels everything What cancles \underline? \...
2
votes
1answer
43 views

Problem in bibliography with applemac

I have one problem with the bibliography: I need to work on TexMaker with the package inputenc applemac because my supervisor absolutely wants that I use that, but when the bibliography appears, the ...
2
votes
1answer
216 views

Matching under- and overlines to parentheses

I want to encapsulate text in a sort of inline "dialogue bubble". To do this I defined % overline text \newcommand{\textoverline}[1]{$\overline{\mbox{#1}}$} as seen here, and defined my dialogue ...
2
votes
2answers
1k views

How to get underlined headings

I would like to get underlined section headings that look like the lines under "Professional Experience" and "Education" in this example. I would preferably like to do this without switching to a ...
2
votes
1answer
351 views

underline (empty space) until end of line (manual “fill in the blank” to end of line), within enumerated environment

I keep encountering situations where I would like to quickly include a few "fill-in-the-blank" style underlined horizontal spaces (usually within an enumerated environment) but each time I come to ...
2
votes
1answer
123 views

boxed text and underline within the gb4e environment

I would like to ask about boxed text and underline within the gb4e environment. I would like to box the text to indicate that this word is important. At the same time, I would like to draw an ...
2
votes
1answer
186 views

Underline a name in bibliography using ClassicThesis and BibLaTeX

I need to underline all occurrences of a person's name in the bibliography, using ClassicThesis and BibLaTeX. I would prefer to change the tex file only (not the bib or bst). So far, I have tried this ...
2
votes
1answer
1k 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 ...
2
votes
1answer
50 views

Is it possible to have underlines at the same height in math mode?

For my thesis, I would like to use (light gray) underlines to indicate the rank of tensors. There are three modes: No underline, one underline and two underline. (For rank-0, rank-1 and rank-2 tensors....
2
votes
1answer
94 views

sectsty underline and titlecap not working together

So I'm trying to make the format of the subsection be normal font size, underlined, and have title case. Below is an example, stolen from here: \documentclass{article} \usepackage[normalem]{ulem} \...
2
votes
1answer
62 views

Special underline/Partial box

I'm not exactly sure what to call this, but I'd like to know how to replicate the text decoration shown under the $n$ in the image. It seems a hooked underline or similar to, a partial box, but only ...
2
votes
1answer
348 views

Double-bar notation for second-order tensors4

I found it interesting to represent a tensor with the notation normally used by my professor. Looking for respect to the mathematical symbol I found this code from this post, very interesting. I ...
2
votes
1answer
57 views

Hyperref, tikz node and underline misalignement

With a Tikz node, there is a shift of the underline line. I use lualatex. See my related question : pdflatex vs lualatex underline mystery \documentclass[french]{article} \usepackage{xcolor,hyperref,...
2
votes
1answer
1k views

Subscript after \underline in math mode

I would like to put a subscript after a character with multiple underlines in the math mode but ignoring the underlines. How can I do it? Consider this picture: I would like the subscript to have ...
2
votes
1answer
134 views

Can't underline highlighted text (soul)

\usepackage{soulutf8} \begin{document} \hl{ AAAA {\ul{AAAA}} AAAA} \end{document} fails: ! Package soul Error: Reconstruction \underline works but I don't seem to be able to change its color ...
2
votes
1answer
121 views

How to use table inside a newenvironment [duplicate]

I'm using a table inside a new environment to create a list of definitions, but some of the things being defined are two words. I want to have the first word on one line and the other word on the next ...
2
votes
0answers
102 views

underline doesn't work in `newglossaryentry` (sharelatex) [closed]

%\newglossaryentry{Perm}{name=\ensuremath{{\epsilon}},description={Complex relative permittivity of a material}} \newglossaryentry{Perm}{name=\ensuremath{\underline{\epsilon}},description={Complex ...
1
vote
3answers
81 views

Underlining text with repeated symbol

I'd like to underline by repeating a symbol (for example +). I have this code that works for underlining with x but I couldn't make it work for +: \documentclass{article} \usepackage{tikz} \...
1
vote
1answer
136 views

Color typo in underline text

Using soul package, I try to underline in black a text containing some words. One of the words is colored in grey. \documentclass{article} \usepackage{color} \usepackage{soul} \definecolor{Gray}{...
1
vote
2answers
52 views

How to make a single line in latex to have more line space?

In the following code, due to the shape of Q in "Qualification", the upper side of "L" in "Language" stick with the underline of "Further Qualification". Would it be possible to make the line space of ...
1
vote
1answer
26 views

Fixing the length of underline text

I was looking for an example here about setting the lengh of the command \underline. I'm trying to produce a text on top of a line with 10cm fixed length, with text of variable size. In addition the ...
1
vote
2answers
98 views

arabluatex: Underlining an Arabic text

How to fix the following underlined Arabic text? \documentclass{article} \usepackage[tuenc]{fontspec} \newfontfamily\arabicfont{Amiri}[Script=Arabic, RawFeature={+anum}] \usepackage{arabluatex} \...
1
vote
1answer
78 views

underline and number for a part of a text

How can we underline a part of a text which is accompanied by a number beside the text as the below figure: