
分数を含む方程式をケースを使って表示しようとしていますが、行が圧縮されすぎて読みにくくなっています。行間の間隔とタイプセット文字のサイズの両方を増やす方法はありますか? MWEは
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
A = \begin{cases}
\frac{B-.5b}{C-.5c} & \text{sometimes} \\
\frac{D-.3d}{E-.7e} & \text{other times}
\end{cases}
\end{align*}
\end{document}
生成する
答え1
mathtools
拡張:amsmath
dcases
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\[
A = \begin{dcases}
\frac{B-.5b}{C-.5c} & \text{sometimes} \\
\frac{D-.3d}{E-.7e} & \text{other times}
\end{dcases}
\]
\end{document}
答え2
以下は、cases
を使用して複製する方法を示していますarray
。
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
A = \begin{cases}
\frac{B-.5b}{C-.5c} & \text{sometimes} \\
\frac{D-.3d}{E-.7e} & \text{other times}
\end{cases}
\end{align*}
\begin{align*}
A &= \begin{cases}
\frac{B-.5b}{C-.5c} & \text{sometimes} \\
\frac{D-.3d}{E-.7e} & \text{other times}
\end{cases} \\
A &= \renewcommand{\arraystretch}{1.5}\left\{\begin{array}{@{}l@{\quad}l@{}}
\frac{B-.5b}{C-.5c} & \text{sometimes} \\
\frac{D-.3d}{E-.7e} & \text{other times}
\end{array}\right.\kern-\nulldelimiterspace
\end{align*}
\end{document}
最初のものalign*
は出力を複製し、2番目はalign*
元の出力cases
とarray
実装を含みます。 を使用する場合は、 " " 構造を垂直に伸ばすようにarray
調整できます(他の提案と同様)。\arraystretch
cases
表の列と行のパディング)。
デフォルト\arraystretch
でcases
はamsmath
は1.2
、定義\env@cases
(amsmath
.dtx`):
\def\env@cases{%
\let\@ifnextchar\new@ifnextchar
\left\lbrace
\def\arraystretch{1.2}%
\array{@{}l@{\quad}l@{}}%
}
もちろん、このデフォルトのストレッチ係数をもっと大きな値に変更することもできますが、全体的な変更を行うのではなく、特定のインスタンスのみを少し広げたいと1.2
考えていると思います。cases
文字のサイズは、\dfrac
の代わりにを使用して調整できます。ただし、よりも\frac
大きい が必要になります。これによって視覚的にどのようなメリットが得られるのかはわかりません。\arraystretch
1.5
答え3
\displaystyle
私が行ったことは、各行を呼び出して、余分な空白行を挿入することだけでした。パッケージがロードされるときに\dfrac
の代わりに を使用するように(Werner の注意を受けて) 編集しました。\displaystyle\frac
amsmath
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
A = \begin{cases}
\dfrac{B-.5b}{C-.5c} & \text{sometimes} \\
\\
\dfrac{D-.3d}{E-.7e} & \text{other times}
\end{cases}
\end{align*}
\end{document}
答え4
上記のすべての回答への追加
便利な機能は、垂直距離cases
、、または同様の環境の方程式の間には、単に と書く代わりにarray
と書くことができます。たとえば、 です。また、負のスペースにも適用できます。たとえば、\\[your distance with units]
\\
\\[1.5em]
\\[-0.5em]
この最小限の例では、\\[1.0em]
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
A = \begin{cases}
\dfrac{B-.5b}{C-.5c} & \text{sometimes} \\[1.0em]
\dfrac{D-.3d}{E-.7e} & \text{other times}
\end{cases}
\end{align*}
\end{document}
このコードは Steven B. Segletes が修正したものです。私の意見では、単に空行を追加するよりも見栄えが良いと思います。;)