答案1
(在原帖作者澄清数字应该实际出现后,我修改了这个答案后(而不是在垂直线之前。)
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{equation*}
\left\{
\begin{matrix*}[l]
A + B = 1 \\
Ae + Be^2 = 2e^2
\end{matrix*}
\right|
\begin{matrix}
5 \\
\phantom{.}
\end{matrix}
\qquad\qquad
\left\{
\begin{matrix*}[l]
A + B = 1 \\
Ae + Be^2 = 2e^2
\end{matrix*}
\right|
\begin{matrix}
\\
9
\end{matrix}
\end{equation*}
\end{document}
答案2
\documentclass{article}
\usepackage{amsmath}
\usepackage{tabularray}
\begin{document}
\begin{equation*}
\left\{
\begin{tblr}{columns={colsep=2pt}}
A + B = 1 \\
Ae + Be^2 = 2e^2 \\
\end{tblr}
\middle|
\begin{tblr}{columns={colsep=2pt}}
5 \\
\\
\end{tblr}
\right.
\end{equation*}
\begin{equation*}
\left\{
\begin{tblr}{columns={colsep=2pt}}
A + B = 1 \\
Ae + Be^2 = 2e^2 \\
\end{tblr}
\middle|
\begin{tblr}{columns={colsep=2pt}}
\\
9 \\
\end{tblr}
\right.
\end{equation*}
\end{document}
答案3
您可以使用nicematrix
\documentclass{article}
\usepackage{amsmath}
\usepackage{nicematrix}
\begin{document}
\[
\begin{NiceArray}{l@{\;\;}l}
A+B=1 & e \\
Ae+Be^2=2e^2
\CodeAfter
\SubMatrix\{{1-1}{2-1}|
\end{NiceArray}
\qquad
\begin{NiceArray}{l@{\;\;}l}
Ae+Be=e \\
Ae+Be^2=2e^2 & -1
\CodeAfter
\SubMatrix\{{1-1}{2-1}|
\end{NiceArray}
\]
\end{document}
答案4
使用spalign
包....
\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,spalign}
\begin{document}
\[
\spalignsys{A + B = 1; Ae + Be^2 = 2e^2}\left| \begin{aligned}
& \alpha \\
&
\end{aligned}\right.\to
\spalignsys{A + B = 1; Ae + Be^2 = 2e^2}\left| \begin{aligned}
& \\
& \beta
\end{aligned}\right.
\]
\end{document}
或这个.......
\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,spalign}
\begin{document}
\[
\spalignsys{A + B = 1; eA + e^2B = 2e^2}\left| \begin{aligned}
& \pi \\
&
\end{aligned}\right.\to
\spalignsys{A + B = 1; eA + e^2B = 2e^2}\left| \begin{aligned}
& \\
& \lambda
\end{aligned}\right.
\]
\end{document}