|
kuing
发表于 2021-8-26 17:30
借用一下前几天的 case 套 case 的代码,就可以实现:
或许楼主更喜欢
用的是那帖 3# 的 lcase 那组- \documentclass{article}
- \usepackage{mathtools}
- \newcommand\smt[1]{\smash[t]{#1}}
- \newcommand\smb[1]{\smash[b]{#1}}
- \newsavebox\Obox\newsavebox\Bbox\newsavebox\Tbox
- \newsavebox\outbox
- \newcommand\kkkkk[1]{%
- \sbox\Obox{$
- \renewcommand\smt[1]{##1}
- \renewcommand\smb[1]{##1}
- \displaystyle#1$}%
- \sbox\Bbox{$
- \renewcommand\smt[1]{##1}
- \renewcommand\smb[1]{\smash[b]{##1}}
- \displaystyle#1$}%
- \sbox\Tbox{$
- \renewcommand\smt[1]{\smash[t]{##1}}
- \renewcommand\smb[1]{##1}
- \displaystyle#1$}%
- \sbox\outbox{%
- \vphantom{\raise\dimexpr
- \dp\Obox-\dp\Tbox-\ht\Obox+\ht\Bbox
- \relax\box\Obox}%
- \renewcommand\smt[1]{\smash[t]{##1}}%
- \renewcommand\smb[1]{\smash[b]{##1}}%
- $\displaystyle#1$}%
- \box\outbox
- }
- \newcommand\lcase[1]{{}\left\{\begin{aligned}\relax#1\end{aligned}\right.}
- \newcommand\lcaseo[1]{\kkkkk{\lcase{#1}}} %补全距,用于外层及中间
- \newcommand\lcaset[1]{\smt{\kkkkk{\lcase{#1}}}}%去高度,用于顶上的
- \newcommand\lcaseb[1]{\smb{\kkkkk{\lcase{#1}}}}%去深度,用于底下的
- \newcommand\lcasetz[1]{\smt{\lcase{#1}}} %最后一层专用(为节约资源)
- \newcommand\lcasebz[1]{\smb{\lcase{#1}}} %最后一层专用(为节约资源)
- \begin{document}
- \fboxsep=0pt
- %加 \boxed 只是为了看边界有没有问题,非必要
- \[\boxed{
- \lcaseo{
- x&=\smt{\dfrac{1-t^2}{1+t^2}}\\
- y&=\smb{\dfrac{2t}{1+t^2}}
- }
- }\quad\boxed{
- \lcaseo{
- x&=\smt{\dfrac{\displaystyle\int}{1+t^2}}\\
- y&=\smb{\dfrac{\displaystyle\int}{1+t^2}}
- }
- }\quad\boxed{
- \lcaseo{
- x&=\smt{\dfrac{1+t^2}{\displaystyle\int}}\\
- y&=\smb{\dfrac{1+t^2}{\displaystyle\int}}
- }
- }\]
- \end{document}
复制代码 |
评分
-
查看全部评分
|