Text FormattingUnderline Problem - font specific?

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
zr0iq
Posts: 5
Joined: Wed Mar 16, 2011 7:31 pm

Underline Problem - font specific?

Post by zr0iq »

I want the first underline be on the same level as the second underline, thus crossing through the y,j and g and whatever else would create such a displacement.

Code: Select all

\documentclass[a4paper,10pt]{article}

\begin{document}

\underline{are you jelly?} ... \underline{is it real?}
 
\end{document}
How to fix this?
Last edited by zr0iq on Sun Apr 03, 2011 10:56 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

zr0iq
Posts: 5
Joined: Wed Mar 16, 2011 7:31 pm

Underline Problem - font specific?

Post by zr0iq »

I fixed it.

Doing it like that, gives perfectly sane underlines for me.

Code: Select all

\usepackage[normalem]{ulem}
\renewcommand\underline{\bgroup\markoverwith{{\rule[-0.2ex]{2pt}{0.4pt}}}\ULon}
Anything wrong with that?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Underline Problem - font specific?

Post by localghost »

Then please mark the topic (not the last post) accordingly as written in Section 3 of the Board Rules (to be read before posting).


Thorsten
Post Reply