latex加下划线_给latex文字加下划线和高亮显示

要给文字加下划线,用 \underline{ This is an underline text } 就可以.

跟 \emph{} 命令不同 \emph 是会让文字变跟现在文字不同. 如正体变斜体, 或者斜体变正体.

如果想要用文字高亮显示就要用到一个叫soul 的包,

这个包一共有伍个命令:

\so{letterspacing} l e t t e r s p a c i n g

\caps{CAPITALS, Small Capitals} CAPITALS, Small Capitals

\ul{underlining} underlining

\st{overstriking} overstriking

\hl{highlighting} highlighting5

如果没有加color包,那么 hl 命令就跟下划线命令一样. 通常hl是预设黄色的

可以用以下命令改变颜色

\setulcolor{bule} 设置下划线的颜色为蓝

\setstcolor{yellow} 设置overstriking颜色为黄

\sethlcolor{green} 设置高亮显示为绿

更详细的命令请查阅soul的文档

下面是一个演示文档:

\documentclass{article}

\usepackage{color, soul} %用color, 和 soul 包

\begin{document}

\setulcolor{red} set underlining color

\setstcolor{green} set overstriking color

\sethlcolor{blue} set highlighting color

\so{letterspacing} \

\caps{CAPITALS, Small Capitals}\

\ul{underlining}\

\st{overstriking} \

\hl{highlighting}

\end{document}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值