欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

latex 行间公式大小(批量设置)

发布时间:2023/12/9 编程问答 53 豆豆
生活随笔 收集整理的这篇文章主要介绍了 latex 行间公式大小(批量设置) 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

1、行间公式大小设置

  在平常的\begin{equation}后面加\small (小), \tiny (极小)

\begin{equation}
    \frac{1}{a+b}
\end{equation}

\begin{equation}\small
    \frac{1}{a+b}
\end{equation}

\begin{equation}\tiny
    \frac{1}{a+b}
\end{equation}

\begin{equation}\frac{1}{a+b} \end{equation}\begin{equation}\small\frac{1}{a+b} \end{equation}\begin{equation}\tiny\frac{1}{a+b} \end{equation}

2、行间公式大小设置 (批量)

有时候,需要把所有公式都变小,每个公式都加一个\small 太麻烦。我们可以通过定义新环境的方法一次性解决。 

  • 定义方法: \newenvironment{name}{begdef}\{enddef}       一个是名字 第二个 是begin 第三个是end.
  • 因此可以定义如下:

             \newenvironment{sequation}{\begin{equation}\small}{\end{equation}}

注意:此处的\small 在\begin{equation}之后,网上有很多公式写到前面是有问题的(作用域问题)

  • 现在调用公式时,就不用再公式后面加\small了。equation换成自己定义的名字sequation。当然用户可以定义其他的名字。

      \begin{sequation}
              \frac{1}{a+b}
      \end{sequation}

导言区定义: \newenvironment{sequation}{\begin{equation}\small}{\end{equation}} 正文中使用: \begin{sequation}\frac{1}{a+b} \end{sequation}

 

总结

以上是生活随笔为你收集整理的latex 行间公式大小(批量设置)的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。