LaTeX数学公式环境中添加删除线

LaTeX数学公式环境中添加删除线

作者:刘兴禄,清华大学,博士在读

cancel

下面是一个例子。

\documentclass{article}

\usepackage{xcolor}
\usepackage[thicklines]{cancel}

\renewcommand{\CancelColor}{\color{lightgray}}

\begin{document}

\[a+\cancel{b}+c\]

$$
a+\cancel{b}+c
$$

\end{document}

效果如下:
在这里插入图片描述

注意,在align等环境中,\cancel命令等是不能使用的

在这里插入图片描述

参考:
[1]: https://ctan.org/pkg/cancel

https://blog.lihj.me/post/latex-formula-display-style.html

https://blog.lihj.me/post/latex-formula-display-style.html

Logo

技术共进,成长同行——讯飞AI开发者社区

更多推荐