How to align uline and uuline same width of line using ulem package? I attached screenshot for your reference.

enter image description here

1 Answer 1


That is because \uline uses a precisely controlled "rule" for the underline, but \uuline lays down the double rule in chunks because it is written the way \uwave is (using \markoverwith). The chunks are clearly a requirement for \uwave (the squiggle characters have to align, and they only come in whole characters), whereas \uuline uses chunks more for convenience.

How critical is it that they line up? The definition of \uuline could use a smaller "chunk" to give more precise matching of size. It could be made to match exactly using two rules, but that would require rewriting more internal macros.

A \uuline with smaller chunks can be defined like this:

\protected\def\uuline{\leavevmode \bgroup
 \ifx\UL@on\UL@onin \advance\ULdepth2.8\p@\fi
 \let\ULleaders\cleaders % added
 % use \UL@pixel widths below
    \vbox{\hrule width3\UL@pixel\kern1\p@\hrule}\kern-0.5\UL@pixel}}%

That may well be good enough.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .