Forgot password?
 Register account
View 1461|Reply 2

请教用了某个命令后,能不能在某个地方取消效果。

[Copy link]

411

Threads

1619

Posts

110K

Credits

Credits
11813

Show all posts

abababa Posted 2017-1-13 10:42 |Read mode
假设现在有三个文件1.tex,2.tex,3.tex,最终都在一个my.tex里用include引入了。
现在1.tex,3.tex这两个文件中都是普通的公式,但是2.tex里用了很多积分公式,于是我在2.tex文档的开头放了\everymath{\displaystyle},让所有符号都变大了。但我想在2.tex文档结束时取消这个效果,这样使其它文档不受影响,效果只是在2.tex中起作用,请教这个应该怎么做?

13

Threads

901

Posts

110K

Credits

Credits
12272

Show all posts

色k Posted 2017-1-13 15:44
  1. \documentclass{article}
  2. \let\disp\relax
  3. \everymath{\disp}
  4. \begin {document}
  5. \include{1.tex}
  6. \let\disp\displaystyle
  7. \include{2.tex}
  8. \let\disp\relax
  9. \include{3.tex}
  10. \end {document}
Copy the Code

411

Threads

1619

Posts

110K

Credits

Credits
11813

Show all posts

 Author| abababa Posted 2017-1-14 18:33
回复 2# 色k

谢谢,刚才试了一下,直接在2.tex最后用\everymath{\relax}也能恢复。

Mobile version|Discuz Math Forum

2025-6-5 00:58 GMT+8

Powered by Discuz!

× Quick Reply To Top Edit