cases
以紧凑的方式排版环境的正确方法是什么?
我尝试了以下操作:
\begin{equation*}
\setlength{\jot}{0pt}
\lambda =
\tiny \begin{cases}
-8.30767 x^3+702.515 x^2-1905.35 x+1307.96 & 0.\leq r<1221.5 \\
\begin{aligned}
& -1018.45 x^9+49.589 x^8-491.158 x^7+3871.91 x^6-1250.75 x^5 \\
& +2143.9 x^4-4765.99 x^3+1208.14 x^2-1276.41 x+1535.87
\end{aligned} & 1221.5<r<3480. \\
\begin{aligned}
& -14.1574 x^9+85.7979 x^8-267.899 x^7+861.531 x^6-2011.89 x^5 \\
& +3277.38 x^4-4345.17 x^3+4064.09 x^2-2538.21 x+1121.09
\end{aligned} & 3480.<r<3630. \\
\begin{aligned}
& -1656.31 x^9+9271.49 x^8-25812.7 x^7+49845.7 x^6-71507.8 x^5\\
& +76291.1 x^4-61014.1 x^3+35291.1 x^2-13586.7 x+2969.32
\end{aligned} & 3630.<r<5600. \\
\begin{aligned}
& -14.1574 x^9+85.7979 x^8-780.947 x^7+3240.92 x^6-6331. x^5\\
& +7802.27 x^4-6886.25 x^3+1978.92 x^2+2186.71 x-1126.32
\end{aligned} & 5600.<r<5701. \\
-72.258 x^3+525.939 x^2-1202.04 x+879.289 & 5701.<r<5771. \\
-2995.06 x^3+11650. x^2-15077.1 x+6492.61 & 5771.<r<5971. \\
-420.221 x^3+2079.69 x^2-3391.49 x+1817.51 & 5971.<r<6151. \\
3.10353 x^3+20.9044 x^2+40.0953 x+22.2648 & 6151.<r<6346.6 \\
45.878 & 6346.6<r<6356. \\
34.216 & 6356.<r<6368. \\
2.14455 & 6368.<r\leq 6371. \\
\end{cases}
\text{,}
\end{equation*}
但:
\tiny
发出警告(“命令 \tiny 在数学模式下无效”)- 总体外观不令人满意(两行上的案例很难与条件联系起来)
有任何想法吗?
谢谢
答案1
很难显示!我会避免\tiny
,不仅因为警告,而且会重新调整环境主体cases
。
\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{environ}
\usepackage{array}
\NewEnviron{breakcase}{%
\renewcommand{\arraystretch}{1}%
\begin{array}{@{\hspace{2em}}>{{}}l@{}}
\hspace{-2em}\mathopen{}\BODY
\end{array}%
}
\begin{document}
\begin{equation*}
\lambda = \left\{
\renewcommand{\arraystretch}{2}
\resizebox{.8\textwidth}{!}{%
\setlength{\jot}{-2pt}%
$\begin{array}{l@{\qquad}l}
-8.30767 x^3+702.515 x^2-1905.35 x+1307.96 & 0.\leq r<1221.5 \\
\begin{breakcase}
-1018.45 x^9+49.589 x^8-491.158 x^7+3871.91 x^6-1250.75 x^5 \\
+2143.9 x^4-4765.99 x^3+1208.14 x^2-1276.41 x+1535.87
\end{breakcase} & 1221.5<r<3480. \\
\begin{breakcase}
-14.1574 x^9+85.7979 x^8-267.899 x^7+861.531 x^6-2011.89 x^5 \\
+3277.38 x^4-4345.17 x^3+4064.09 x^2-2538.21 x+1121.09
\end{breakcase} & 3480.<r<3630. \\
\begin{breakcase}
-1656.31 x^9+9271.49 x^8-25812.7 x^7+49845.7 x^6-71507.8 x^5\\
+76291.1 x^4-61014.1 x^3+35291.1 x^2-13586.7 x+2969.32
\end{breakcase} & 3630.<r<5600. \\
\begin{breakcase}
-14.1574 x^9+85.7979 x^8-780.947 x^7+3240.92 x^6-6331. x^5\\
+7802.27 x^4-6886.25 x^3+1978.92 x^2+2186.71 x-1126.32
\end{breakcase} & 5600.<r<5701. \\
-72.258 x^3+525.939 x^2-1202.04 x+879.289 & 5701.<r<5771. \\
-2995.06 x^3+11650. x^2-15077.1 x+6492.61 & 5771.<r<5971. \\
-420.221 x^3+2079.69 x^2-3391.49 x+1817.51 & 5971.<r<6151. \\
3.10353 x^3+20.9044 x^2+40.0953 x+22.2648 & 6151.<r<6346.6 \\
45.878 & 6346.6<r<6356. \\
34.216 & 6356.<r<6368. \\
2.14455 & 6368.<r\leq 6371.
\end{array}$}
\right.
\end{equation*}
\end{document}
对于断线,我使用了一些技巧来获得更合理的对齐,以更好地显示断点。
我删除了结尾的逗号,虽然从语法上来说是正确的,但它看起来就像是悬在空中一样。
答案2
看起来你好像想给读者提供一定量的数据。如果不这样做,你可以删除逗号后面的某些数字,或者用省略号替换某些行...
由于所有这些信息对读者来说似乎都很重要,因此您应该明确帮助阅读这些信息。像您这样的等式更像是“让我们看看下一页是否更容易……”之类的信息。
我建议把所有东西都放到一个表格里,这是这类事情的标准格式。下面是一些例子。请理解我不想把所有东西都打出来。
% arara: pdflatex
% arara: pdflatex
\documentclass{article}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{array}
\usepackage{caption}
\usepackage{rotating}
\begin{document}
The variable $\lambda$ can be described by the formula
\[\lambda=A+Bx+Cx^2+Dx^3+Ex^4+Fx^5+Gx^6+Hx^7+Ix^8+Kx^9\]
in which the coefficients depend on the range of $r$. Coefficients and coresponding ranges are shown in table \ref{tab:lambda}.
\begin{sidewaystable}
\centering
\caption{Parameters for the $\lambda$-formula}\label{tab:lambda}
\renewcommand{\tabcolsep}{1.1mm}
\begin{tabular}{@{}S[table-format=-4.5]SSSSSSSSS>{$}l<{$}@{}}
\toprule
{$A$} & {$B$} & {$C$} & {$D$} & {$E$} & $F$ & $G$ & $H$ & $I$ & $K$ & \multicolumn{1}{c}{$r$}\\
\midrule
1307.96 & -1905.35 & 702.515 & -8.30767 &&&&&&& [0,12521.5)\\
1535.87 & -1276.41 & 1208.14 & -4765.99 & 2143.9 & -1250.75 & 3871.91 & -491.158 & 49.589 & -1018.45 & (1221.5,3480)\\
1121.09 &&&&&&&&&&\\
2969.32 &&&&&&&&&&\\
-1126.32 &&&&&&&&&&\\
879.289 &&&&&&&&&&\\
6492.61 &&&&&&&&&&\\
1817.51 &&&&&&&&&&\\
22.2648 &&&&&&&&&&\\
45.878 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & (6346.6,6356) \\
34.216 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & (6356,6368) \\
2.14455 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & (6368,6371] \\
\bottomrule
\end{tabular}
\end{sidewaystable}
\end{document}