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