小页面中的水平对齐

小页面中的水平对齐

我在水平对齐方面遇到了另一个问题。有人在我的上一个问题中建议使用 minipages 而不是 multicol。我确实使用了,一切都很完美,但现在我试图制作三列,我无法将第一列的第一行与其余列对齐(看看图片)

代码图片

以下是我使用的代码:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[brazil]{babel}
\usepackage{amsmath}
\subsection{Estabilidade de cada ponto de equilíbrio em relação a $\mu$}
\begin{minipage}[t]{0.3\linewidth}
\[
    (\overline{x_1},\overline{x_2}) = (0, 0)
\]
\[
    \begin{cases}
        \lambda_1 = 0\\
        \lambda_2 = -1\\
    \end{cases}
\]
\begin{align*}
    \lambda_1 &= 0 &\forall &\mu \in \Re
\end{align*}
\end{minipage}
\vrule{}
\begin{minipage}[t]{0.3\linewidth}
\[
    (\overline{x_1},\overline{x_2}) = (\sqrt{\mu}, 0)
\]
\[
    \begin{cases}
        \lambda_1 = -\sqrt{\mu}\\
        \lambda_2 = -1
    \end{cases}    
\]
\begin{align*}
    \lambda_1 &= -j &\text{ para} && \mu &= -1\\
    \lambda_1 &= 0 &\text{ para} && \mu &= 0\\
    \lambda_1 &= -1 &\text{ para} && \mu &= 1
\end{align*}
\end{minipage}
\vrule{}
\begin{minipage}[t]{0.3\linewidth}
\[
    (\overline{x_1},\overline{x_2}) = (-\sqrt{\mu},  0)
\]
\[
    \begin{cases}
        \lambda_1 = \sqrt{\mu}\\
        \lambda_2 = -1\\
    \end{cases}
\]
\begin{align*}
    \lambda_1 &= j &\text{ para} && \mu &= -1\\
    \lambda_1 &= 0 &\text{ para} && \mu &= 0\\
    \lambda_1 &= 1 &\text{ para} && \mu &= 1
\end{align*}
\end{minipage}
\end{document}

非常感谢您抽出时间和回答。

答案1

您的问题可能来自很多地方。例如,可能没有足够的空间容纳所有三个minipage(其中一个是@GuM 提到的段落缩进),因此minipage被推来推去并导致错位。这是使用该minipage方法的缺点之一。

我建议使用align*环境来对齐你的方程式。这是我的尝试。代码中提供了一些解释% <-

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[brazil]{babel}
\usepackage{amsmath}
\usepackage{amssymb}% <- For `\mathbb{R}'
\begin{document}
\subsection{Estabilidade de cada ponto de equilíbrio em relação a~$\mu$}
\begin{align*}
 &  (\overline{x_1},\overline{x_2}) = (0, 0)
 && (\overline{x_1},\overline{x_2}) = (\sqrt{\mu}, 0)
 && (\overline{x_1},\overline{x_2}) = (-\sqrt{\mu}, 0) \\% <- First line finished
 &  \begin{cases}
      \lambda_1 = 0 \\
      \lambda_2 = -1
    \end{cases}
 && \begin{cases}
      \lambda_1 = -\sqrt{\mu} \\
      \lambda_2 = -1
    \end{cases}
 && \begin{cases}
      \lambda_1 = \sqrt{\mu} \\
      \lambda_2 = -1\\
    \end{cases} \\% <- Second line finished
 &  \begin{aligned}[t]% <- Aligned at the top in this final line
      \lambda_1 & = 0 & \forall \mu & \in \mathbb{R}% <- I used this to denote the set of real numbers
    \end{aligned}
 && \begin{aligned}[t]% <- Aligned at the top in this final line
      \lambda_1 & = -j & \text{para} \quad \mu & = -1 \\
      \lambda_1 & = 0  & \text{para} \quad \mu & = 0  \\
      \lambda_1 & = -1 & \text{para} \quad \mu & = 1
    \end{aligned}
 && \begin{aligned}[t]% <- Aligned at the top in this final line
      \lambda_1 & = j & \text{para} \quad \mu & = -1 \\
      \lambda_1 & = 0 & \text{para} \quad \mu & = 0  \\
      \lambda_1 & = 1 & \text{para} \quad \mu & = 1
    \end{aligned}% <- Third line finished
\end{align*}
\end{document}

在此处输入图片描述

答案2

这是一段代码,没有 minipages,只有alignat*{3},一些amsmath环境和eqparbox包。我擅自\overline 只使用了 x,而不是索引,因为我认为这样看起来更好:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[TS1,T1]{fontenc}
\usepackage[showframe]{geometry}
\usepackage{multicol}
\usepackage{eqparbox}
\newcommand{\eqmathbox}[2][M]{\eqmakebox[#1]{$\displaystyle#2$}}
    \usepackage{mathtools}
%\newcommand{\dydx}[4]{\frac{d^{#1}{#2}}{d{#3}^{#4}}}
   \usepackage{esdiff}

    \begin{document}
\setcounter{section}{3}
\setcounter{subsection}{1}
\subsection{Estabilidade de cada ponto de equilíbrio em relação a \boldmath$\mu$}

\begin{alignat*}{3}
 & \eqmathbox[L]{\begin{gathered}
     (\overline{x}_1,\overline{x}_2) = (0, 0) \\
    \begin{cases}
        \lambda_1 = -2\sqrt{\mu }\\
        \lambda_2 = -1
    \end{cases}
\end{gathered}}
 &\hspace{4em}
 & \eqmathbox[C]{\begin{gathered}
     (\overline{x}_1,\overline{x}_2) = (\sqrt{\mu }, 0) \\
    \begin{cases}
        \lambda_1 =0\\
        \lambda_2 = -1
    \end{cases}
\end{gathered}}
 &\hspace{4em}
 &\eqmathbox[R]{\begin{gathered}
     (\overline{x}_1,\overline{x}_2) = (-\sqrt{\mu }, 0) \\
    \begin{cases}
        \lambda_1 = 2\sqrt{\mu }\\
        \lambda_2 = -1
    \end{cases}
\end{gathered}} \\[1ex]
 & \eqmathbox[L]{\begin{aligned}[t]
  \lambda_1 &= 0 &\forall &\mu \in \Re
\end{aligned}}
 &
 & \eqmathbox[C]{\begin{aligned}[t]
 &\lambda_1, \lambda_2) = (-j2, -1), &x = - 1\\
 &(\lambda_1, \lambda_2) = ( 0, -1), &x = 0\\
 &(\lambda_1, \lambda_2) = (-2, -1), &x = 1
\end{aligned}}
 &
 & \eqmathbox[R]{\begin{aligned}[t]
 &(\lambda_1, \lambda_2) = (j2, -1), &x = -&1\\
 &(\lambda_1, \lambda_2) = ( 0, -1), &x = & 0\\
 &(\lambda_1, \lambda_2) = (2, -1), &x = & 1
\end{aligned}}
\end{alignat*}

\end{document} 

在此处输入图片描述

相关内容