![使用独立类时,如何删除 gather* 左侧的空白?](https://linux22.com/image/279652/%E4%BD%BF%E7%94%A8%E7%8B%AC%E7%AB%8B%E7%B1%BB%E6%97%B6%EF%BC%8C%E5%A6%82%E4%BD%95%E5%88%A0%E9%99%A4%20gather*%20%E5%B7%A6%E4%BE%A7%E7%9A%84%E7%A9%BA%E7%99%BD%EF%BC%9F.png)
\documentclass[preview,border=12pt,varwidth]{standalone}% change it back to your own document class
\usepackage{amsmath}
\begin{document}
\abovedisplayskip=0pt\relax% remove this line in your production
\begin{gather*}
\int \sec^2(5 - 3x/4)\,\mathrm{d}x\\
\int \frac{1}{\cos^2 (5 - 3x/4)}\,\mathrm{d}x
\end{gather*}
\end{document}
gather*
如何去除使用类时左边的空白standalone
?
答案1
重新定义gather
;它只是一行代码。你甚至不必设置\abovedisplayskip
为零。
\documentclass[border=12pt]{standalone}
\usepackage{amsmath}
\newcommand{\diff}{\mathop{}\!d}
\renewenvironment{gather*}{$\gathered}{\endgathered$}
\begin{document}
\begin{gather*}
\int \sec^2(5 - 3x/4)\diff x\\
\int \frac{1}{\cos^2 (5 - \frac{3}{4}x)}\diff x
\end{gather*}
\end{document}