如何输入横跨三条线/方程的垂直线?谢谢!
答案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}