Latex 公式缩放 Latex scales an equation to fit page width
用Latex排版时,公式长度超过行宽度时可以用 resizebox 对公式进行自动缩放,用法如下:
1、调用宏包:
\usepackage{graphicx}
2、使用以下命令:
\begin{equation} \resizebox{.9\hsize}{!}{$A+B+C+D+E+F+G+H+I+J+K+L+M+N+O+P+Q+R+S+T+U+V+W+X+Y+Z$} \end{equation}
\begin{equation} \vspace{-0.05in} \resizebox{0.9\hsize}{!}{$\begin{aligned} \mathbbm{E}_{\mathcal{V}}[\mathcal{{\hat{L}}}\left(f_{\mathcal{V}}\right)] &\leq \underbrace{{\frac{1}{n} \sum_{i=1}^{n}{\frac{p_{t}(\boldsymbol{x}_{i})}{\widetilde{p}_{s}(\boldsymbol{x}_{i})}\mathbbm{E}_{\mathcal{V}}[\mathbbm{1}(y_if_{\mathcal{V}}(\boldsymbol{x}_{i}) <\gamma)}}]}_{(I)}+\underbrace{\frac{L\cdot \sqrt{D_{\chi^{2}}\left(P_{t}\| \widetilde{P}_{s}\right)+1}}{{\gamma \cdot q^{\left(q-1\right) / 2} \sqrt{n}}}}_{\left(I I\right)}+ (III). %\underbrace{\epsilon(\gamma, n, \delta)}_{\left(III\right)} \end{aligned}$} \label{fanhua2} \vspace{-0.05in} \end{equation}
注意,需要加入$ 符号
作者:楚千羽
出处:https://www.cnblogs.com/chuqianyu/
本文来自博客园,本文作者:楚千羽,转载请注明原文链接:https://www.cnblogs.com/chuqianyu/p/16094199.html
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须在文章页面给出原文连接,否则保留追究法律责任的权利!