Whenever I underline words with letters such as j, p, q, (etc.), the underline goes below the lowest point of the letter. This causes a fairly awful look when several words are underlined in a row. Is there a way to change this behaviour?

This is what I am using:

        \node[inner ysep=1.5pt,inner xsep=0pt,outer sep=0pt] (todotted) {#1};
        \draw[dashed, anchor=base] (todotted.south west) -- (todotted.south east);
\udash{Tasks}, \udash{Dependencies}, \udash{Project} %for dashed underlines
\underline{Tasks}, \underline{Dependencies}, \underline{Project} %for regular underlines

And this is how it looks like now:

enter image description here

I would like for the underline to stay with where it is on Tasks, and when p or j or other such letters occur, the line would just go through them.


You could use \smash.

\underline{Underlined text.} \underline{Underlined text with a p.} \underline{\smash{Underlined text with a p.}}

enter image description here

  • Thank you so much. For reference, also words with my udash as \udash{\smash{p}} – ChrisMM May 24 '20 at 12:23

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.