一些LATEX内部命令含有@字符,如\@addtoreset,如果需要在文档中使用这些内部命令, 就需要借助于另两个命令\makeatletter和\makeatother. 下面的例子可以实现公式编号与节号的关联: \documentclass{article} ... \makeatletter % @ is now a normal "letter" for TeX \renewcommand\theequation{\thesection.\arabic{equation}} \@addtoreset{equation}{section} \makeatother % @ is restored as a "non-letter" character for TeX \begin{document}
#Latex# \makeatletter和\makeatother
最新推荐文章于 2024-08-28 16:59:56 发布