系統如何並排排列且之間有箭頭

系統如何並排排列且之間有箭頭

這是我的問題:我想寫出許多等效的方程組。因此,我希望第一個位於左側,然後是一個箭頭(例如 \Leftrightarrow,因為它們是等效的:)),第二個位於右側,然後其他箭頭與第二個垂直對齊。基本上,我想做與對齊環境相同的事情,但使用系統。儘管如此,我還是沒有弄清楚。

這是我嘗試過的:

\documentclass[11pt]{article}
\usepackage{envmath}
\begin{document} 
\[
\begin{System} 
  x + y = 3 \\ 
  x - y = 1
\end{System} \Leftrightarrow 
\begin{System}
 x=2\\ 
 y=1
\end{System}
\]
\end{document}

有什麼解決辦法嗎?

答案1

您可以使用alignedand\iff產生正確的數學間距:

在此輸入影像描述

代碼:

\documentclass[11pt]{article}
\usepackage{amsmath}

\begin{document} 
\[
    \left\{\begin{aligned} 
      x + y &= 3 \\ 
      x - y &= 1
    \end{aligned}\right. \iff 
    \left\{\begin{aligned}
     x &= 2\\ 
     y &= 1
    \end{aligned}\right.
\]
\end{document}

答案2

將所有東西放在一個tabular環境中:

\documentclass[11pt]{article}

\begin{document}

\begin{tabular}{lll}
    $\left\{\begin{tabular}{l}x+y=3 \\ x-y=1 \\ \end{tabular}\right.$ & $\Leftrightarrow$ & $\left\{\begin{tabular}{l}x=2 \\ y=1 \\ \end{tabular}\right.$ \\
    & & \\
    & $\Leftrightarrow$ & $\left\{\begin{tabular}{l}x=2 \\ y=1 \\ \end{tabular}\right.$ \\
\end{tabular}

\end{document}

在此輸入影像描述

答案3

沒有任何包:

\documentclass{article}
\begin{document} 
\[
\left\{\!\!\begin{array}{c}
x+y=3\\
x-y=1
\end{array}\right. 
\!\!\Leftrightarrow
\left\{\!\!
\begin{array}{c}
x=2\\
y=1 
\end{array}
\right. 
\]
\end{document}

負空格\!\!是為了獲得與彼得的答案類似的間距,但在括號周圍有更多的間距可能對你來說沒問題。這是區別:

微量元素

相關內容