Like
Hello World
...........
or
Hello World
-----------
And not so
Hello World // \underline{Hello World}
___________ //
text-decorations
Like
Hello World
...........
or
Hello World
-----------
And not so
Hello World // \underline{Hello World}
___________ //
Best Answer
(Disclaimer: It may be considered a typographically bad practice to underline text.)
I can think of two ways to do this.
ulem
This option is good if you want a fast solution. Use
\dotuline
or\dashuline
from the packageulem
.TikZ
This option is good if you want control. You can create your own macro with TikZ. The following is an example of six macros. The first three produces dotted underlining and the last three dashed underlining.
Note that you can modify these macros to fit your needs. For example you can change the thickness styles by adding
thick
as an option to\draw
, e.g.Other modification might be to change the color and opacity, e.g.
or to change the distance between the text and the decoration by editing the measures in
[inner sep=1pt,outer sep=0pt]
, e.g.All TikZ code in this answer is a simple modification of \cancel draws under thing being canceled