我有两个minipage
并排的,第一个定义为宽度 5cm,第二个定义为宽度 6cm。
然后我在这两个下面放了一些文字。在此文字之后,我还有另外两个minipage
具有相同规格的文字。不幸的是,左右两侧的文字minipage
与下方的文字不一致。我确信这是由于每个文字的长度所致minipage
,但我希望左侧的minipage
文字右对齐到相同的位置,右侧的文字也右对齐到相同的位置minipage
(左对齐)。
这可能吗?
\begin{minipage}[t]{5cm}
\begin{align*}
A_2 = x_1A_1 \therefore
\end{align*}
\end{minipage}%
\begin{minipage}[t]{9cm}
\begin{align*}
& x_1 = 1
\stepcounter{equation}\tag{1}\\
& x_1 = 5/2
\stepcounter{equation}\tag{2}\\
\end{align*}
\end{minipage}%
These values of $x_1$ are not consistent and therefore second asset is linearly independent. To test the third asset, assume that:
\begin{minipage}[t]{5cm}
\begin{align*}
A_3 = x_1A_1 + x_2A_2 \therefore \\
2 * (1) \\
3 * (1)
\end{align*}
\end{minipage}%
\begin{minipage}[t]{9cm}
\begin{align*}
& x_1 + x_2 = 2
\stepcounter{equation}\tag{1}\\
& 2x_1 + 5x_2 = 2
\stepcounter{equation}\tag{2}\\
& 3x_1 + 4x_2 = 37
\stepcounter{equation}\tag{3}\\
& 2x_1+2x_2 = 4
\stepcounter{equation}\tag{4}\\
& x_2 = -3/2\\
& 3x_1 + 3x_2 = 6
\stepcounter{equation}\tag{5}\\
& x_2 = 31\\
\end{align*}
\end{minipage}%
答案1
使用并align
让amsmath
乳胶为您工作。
\documentclass{article}
\usepackage{amsmath,amssymb}
\begin{document}
\begin{align}
A_2 = x_1A_1 \qquad \therefore \quad
& x_1 = 1\\
& x_1 = 5/2
\end{align}
These values of $x_1$ are not consistent and therefore second asset is linearly independent. To test the third asset, assume that:
\begin{align}
A_3 = x_1A_1 + x_2A_2 \qquad \therefore \quad
& x_1 + x_2 = 2 \label{eq:myeq}\\
& 2x_1 + 5x_2 = 2\\
& 3x_1 + 4x_2 = 37\\[1ex]
2 \times \text{equation~\ref{eq:myeq}} \phantom{\qquad{}\therefore{}\quad} & 2x_1+2x_2 = 4\\
& x_2 = -3/2 \notag\\[1ex]
3 \times \text{equation~\ref{eq:myeq}} \phantom{\qquad{}\therefore{}\quad} & 3x_1 + 3x_2 = 6\\
& x_2 = 31 \notag
\end{align}
\end{document}
如果对齐需要持续存在,则仅使用单个align
环境:
\documentclass{article}
\usepackage{amsmath,amssymb}
\begin{document}
\begin{align}
A_2 = x_1A_1 \qquad \therefore \quad
& x_1 = 1\\
& x_1 = 5/2
\intertext{These values of $x_1$ are not consistent and therefore second asset is linearly independent. To test the third asset, assume that:}
A_3 = x_1A_1 + x_2A_2 \qquad \therefore \quad
& x_1 + x_2 = 2 \label{eq:myeq}\\
& 2x_1 + 5x_2 = 2\\
& 3x_1 + 4x_2 = 37\\[1ex]
2 \times \text{equation~\ref{eq:myeq}} \phantom{\qquad{}\therefore{}\quad} & 2x_1+2x_2 = 4\\
& x_2 = -3/2 \notag\\[1ex]
3 \times \text{equation~\ref{eq:myeq}} \phantom{\qquad{}\therefore{}\quad} & 3x_1 + 3x_2 = 6\\
& x_2 = 31 \notag
\end{align}
\end{document}