テキストの下線に色を付けたい場合には、color, soul パッケージを使用する。
そして、下線をつけたいテキストを\ul で囲む。
例
\usepackage{color, soul}
\begin{document}
\setulcolor{red}
\ul{Hello.}
\setulcolor{blue}
\ul{Good morning.}
\end{document}
結果

雑記
投稿日:2020年12月13日 更新日:
テキストの下線に色を付けたい場合には、color, soul パッケージを使用する。
そして、下線をつけたいテキストを\ul で囲む。
\usepackage{color, soul}
\begin{document}
\setulcolor{red}
\ul{Hello.}
\setulcolor{blue}
\ul{Good morning.}
\end{document}

執筆者:seyanen
関連記事
大文字のスクリプト体を入力するには、mathrsfs パッケージを使う。 例 \usepackage{mathrsfs} \begin{document} $$\mathscr{ABCDEFGHIJK …
ゼロの成分が多いブロック行列を tex で出力する。 \usepackage{amsmath} を使う。 例 \usepackage{amsmath} \begin{document} $$ \lef …
2023/01/18
matplotlib のグラフ作成と gnuplot との対応 比較
2022/10/14
pythonで配列(リスト)の、ある要素がわかっているときにその次の要素を取得する方法。