1

I would like to underline and color only the first letre which is "I" for Information and C for Communication, also color the underlining but this line color all the texte with red !!

\color{red}{\underline{\color{blue} I}}nformation and \underline{C}ommunication

Inesss
  • 11

1 Answers1

1

You can create a command with xparse \Underline that can also take an optional color value that defaults to a color of your choice, in the example blue.

\documentclass{article}
\usepackage{xcolor}
\begin{document}
\NewDocumentCommand\Underline{O{blue}m}{\underline{\textcolor{#1}{#2}}}
\Underline[red]Information and \Underline Communication
\end{document}
yannisl
  • 117,160