导入soul 包可以使用高亮功能
在文本中插入 \hl{} 即可
导入color 包可以使用颜色功能
color 也可以替换成 xcolor
\documentclass{report}
\usepackage{xcolor,soul}
\begin{document}
\textcolor{red}{Text}
\hl{Text}
\hl{\textbf{Text}}
\textbf{\textcolor{red}{\hl{Text}}}
\textcolor{red}{\textbf{\hl{Text}}}
\end{document}

或者可以更改higlht的颜色
\usepackage{xcolor,soul}
\sethlcolor{green}

本文介绍了如何在LaTeX文档中使用soul包实现文本高亮功能,以及通过color包和xcolor进行颜色设置,包括改变hl命令的默认颜色至绿色。
4872

被折叠的 条评论
为什么被折叠?



