Re: [问题] 如何使括号内有多行文字并全部靠左

楼主: tonygump (阿尼)   2018-08-03 11:55:28
把可嵌入的cases环境嵌在AMS math套件的flalign环境就可以
(你是嵌在equation环境)
这样就不用去动统一的方程式置中选项
https://imgur.com/a/PFltcva
latex码,pdflatex编译
那个\end{cases}后面的空跨号{}是必要的要留着
AMS math套件有不少对齐环境我觉得蛮实用的
我初步整理了一个demo表,方便我自己查用
请看后面贴图
框框是方便区分不同格的input
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{babel}
\begin{document}
The formula style \textbf{Centered} is used.
\[
A=1
\]
A flalign{*} environment with a cases environment wrapped inside.
\begin{flalign*}
\hspace{1cm} & \text{test a case environment}\begin{cases}
\text{First senario}\\
\text{Second senario}
\end{cases} & {}
\end{flalign*}
Another one with twice the blanck length in the beginning.
\begin{flalign*}
\hspace{1cm}\hspace{1cm} & \text{test another environment}\begin{cases}
\text{Right}\\
\text{Wrong}
\end{cases} & {}
\end{flalign*}
\end{document}
https://i.imgur.com/sWaooQI.png
https://i.imgur.com/nI2nK5H.png

Links booklink

Contact Us: admin [ a t ] ucptt.com