我在文档中对一些拆分的方程式进行水平对齐时,出现了这种不规则的行为,这只是其中一个例子。问题出在第二个方程式上split
(其结构实际上与第一个方程式相同)。我尝试通过在\\
这里和那里进行调整来纠正它,但没有成功。我知道它可能有一个简单的解决方案,但我找不到它。我该怎么办?这是一个bug
环境align
吗?
\documentclass{article}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath}
\DeclareMathOperator{\di}{d\!}
\DeclareMathOperator{\sen}{\rm sen}
\newcommand{\abs}[1]{\left\lvert\,\strut#1\,\right\rvert} %Absolute value
\begin{document}
\section{Trigonométricas Elementales}
\begin{align}
\int\sen x\,\di x & = -\cos x + C \\
\int\cos x\,\di x & = \sen x + C \\
\begin{split}
\int\tan x\,\di x & = -\ln\abs{\cos x} + C \\
& = \ln \abs{\sec x} + C
\end{split} \\
\int\csc x\,\di x & = -\ln\abs{\csc x- \cot x} + C \\
\int\sec x\,\di x & = -\ln\abs{\sec x+ \tan x} + C \\
\begin{split}
\int\cot x\,\di x & = \ln\abs{\cos x} + C \\
& = -\ln\abs{\csc x} + C \\
\end{split} \\
\int\sen^2 x\,\di x & = \frac x2-\frac 14\sen 2x + C \\
\int\cos^2 x\,\di x & = \frac x2+\frac 14\sen 2x + C \\
\int\tan^2 x\,\di x & =\tan x - x + C
\end{align}
\end{document}
答案1
“基本相同”和“相同”不一样……
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\di}{d\!}
\newcommand{\sen}{\mathop{\mathrm{sen}}\nolimits}
\newcommand{\abs}[1]{\left\lvert\,\strut#1\,\right\rvert} %Absolute value
\begin{document}
\section{Trigonométricas Elementales}
\begin{align}
\int\sen x\,\di x & = -\cos x + C \\
\int\cos x\,\di x & = \sen x + C \\
\begin{split}
\int\tan x\,\di x & = -\ln\abs{\cos x} + C \\
& = \ln \abs{\sec x} + C
\end{split} \\
\int\csc x\,\di x & = -\ln\abs{\csc x- \cot x} + C \\
\int\sec x\,\di x & = -\ln\abs{\sec x+ \tan x} + C \\
\begin{split}
\int\cot x\,\di x & = \ln\abs{\cos x} + C \\
& = -\ln\abs{\csc x} + C %\\ <---
\end{split} \\
\int\sen^2 x\,\di x & = \frac x2-\frac 14\sen 2x + C \\
\int\cos^2 x\,\di x & = \frac x2+\frac 14\sen 2x + C \\
\int\tan^2 x\,\di x & = \tan x - x + C
\end{align}
\end{document}