
答案1
我提出兩種可能性:
– 將方程式嵌套在singlespace
環境中,並使用cases*
環境來mathtools
簡化程式碼(在&
自動處於文字模式後),
– 或加載empheq
包(加載mathtools
,加載amsmath
)並使用同名環境align*
代替cases
。
\documentclass{article}
\usepackage{empheq}
\usepackage{setspace}
\begin{document}
\doublespacing
Blahblahblah
\begin{singlespace}
\[ x_{ij}^{k}=\begin{cases*}
1, & if vehicle \ensuremath{k} travels from \ensuremath{i} to \ensuremath{j} \\
0, & otherwise
\end{cases*}\]
\end{singlespace}
\begin{empheq}[left={ x_{ij}^{k}=\empheqlbrace}]{align*}
1, & \quad\textrm{if vehicle \ensuremath{k} travels from \ensuremath{i} to \ensuremath{j}} \\[-2ex]
0, & \quad\textrm{otherwise}
\end{empheq}
\end{document}