5

The following MWE contains the definition of a custom macro for colored underlines with the ulem package.

\documentclass{article}
\usepackage{xcolor}
\usepackage{ulem}


\newcommand{\muline}{\bgroup\markoverwith
{\textcolor{red}{\rule[-0.5ex]{2pt}{0.4pt}}}\ULon}

\begin{document}
\muline{This is some very very very very long text that does not fit in a single line but needs two.}
\end{document}

Is it possible to use TikZ to draw the underline?

What I have in mind is the possibility to use something like \draw(start)--(end); instead of the rule command.

Of course it is required that the underline works for multi-line texts as the ulem underline does.

Jansen
  • 315

0 Answers0