![需要帮助解决跨越多行的问题](https://linux22.com/image/341998/%E9%9C%80%E8%A6%81%E5%B8%AE%E5%8A%A9%E8%A7%A3%E5%86%B3%E8%B7%A8%E8%B6%8A%E5%A4%9A%E8%A1%8C%E7%9A%84%E9%97%AE%E9%A2%98.png)
如何输入横跨三条线/方程的垂直线?谢谢!
答案1
另外三种解决方案,基于aligned
环境。第三种解决方案使用环境,这是@Gonzalo Medina 提供的环境dlrcases
的扩展:drcases
mathtools
\documentclass{article}
\usepackage{empheq}%
\usepackage{array, setspace}
\makeatletter
\newcases{dlrcases}{\quad}{%
$\m@th\displaystyle{##}$\hfil}{$\m@th\displaystyle{##}$\hfil}{\lbrace}{\rbrace}
\newcases{lrcases}{\quad}{%
$\m@th{##}$\hfil}{{##}\hfil}{\lbrace}{\rbrace}
\makeatother
\begin{document}
\[
\left\{\setstretch{0.7}\begin{array}{@{}c|c@{\,}}
\begin{aligned}
x & \geq 0 \\
y & \geq 0 \\
x & \leq 5
\end{aligned}
&\! \begin{aligned}
x+y & \leq 7\\
x+2y & \geq 4\\
y &\leq x+5
\end{aligned}
\end{array}
\right\}
\]
\begin{empheq}[left=\empheqlbrace, right=\empheqrbrace]{equation*}
\begin{array}{@{}c|c@{}}
\begin{aligned}
x & \geq 0 \\
y & \geq 0 \\
x & \leq 5
\end{aligned}
&\! \begin{aligned}
x+y & \leq 7\\
x+2y & \geq 4\\
y &\leq x+5
\end{aligned}
\end{array}
\end{empheq}
\[ \begin{dlrcases}
\begin{array}{@{\!}c|c@{}}
\begin{aligned}
x & \geq 0 \\
y & \geq 0 \\
x & \leq 5
\end{aligned}
&\! \begin{aligned}
x+y & \leq 7\\
x+2y & \geq 4\\
y &\leq x+5
\end{aligned}
\end{array}
\end{dlrcases} \]
\end{document}