4

i'm looking for another option than \underline for underline math symbols as well as regular letters on same height. enter image description here

What I want is to change the underline of the first two symbols to the red underlines in this image, e.g. to match the height of the underline in the last two symbols. enter image description here

I already tried

\usepackage{contour}
\usepackage{ulem}

\renewcommand{\ULdepth}{1.0pt}
\contourlength{0.8pt}

\newcommand{\myuline}[1]{%
    \uline{\phantom{#1}}%
    \llap{\contour{white}{#1}}%
}

but without any success.

Any ideas?

6

The result won't be pretty.

\documentclass{article}
\usepackage{amsmath}
\usepackage{accents}

\newcommand{\under}[1]{%
  \vphantom{#1}%
  \underaccent{\bar}{\smash[b]{#1}}%
}

\begin{document}

$\under{y},\under{\mu}_a,\under{\sigma},\under{a}$

\end{document}

enter image description here

2
  • 1
    thanks so far! is there a way to add some small space between the underline and the letter at the positions where both overlap to make it look better?
    – Micha
    Aug 2 at 21:55
  • @Micha Sorry, but as I said, the result isn't pretty and nothing would improve it.
    – egreg
    Aug 3 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.