我一直在制作一个有多列多行的表格。虽然表格快完成了,但有些细节让我不太满意。我认为最后一行需要口服皮质类固醇的病情恶化真的很好。
有人能帮我做得更好吗?我还想将执着的尽管最后一行没有分隔符。
\documentclass[11pt,letterpaper,twoside,openright]{book}
\usepackage{longtable}
\usepackage{makecell} %used to insert break line inside table rows
\usepackage{rotating}
\usepackage{multirow} %tables with multirow
\begin{document}
\begin{sidewaystable}[htpb]
\centering
\resizebox{\columnwidth}{!}{%
\begin{tabular}{l|c|c|ccc}
\hline
\multirow{3}{*}{Components of Severity} & \multirow{3}{*}{\thead{Age \\ (Years)}} & \multicolumn{4}{c}{Classification of Asthma Severity}\\
\cline{3-6}
& & \multirow{2}{*}{Intermittent} & \multicolumn{3}{c}{Persistent}\\
\cline{4-6}
& & & Mild & Moderate & Severe\\
\hline
\hline
Symptoms & All & $\leq$ 2 days/week & > 2 days/week but not daily & Daily & Throughout the day\\
\hline
\multirow{2}{*}{Nighttime awakenings}
& 0–4 & 0 & 1–2x/month & 3–4x/month & > 1x/week\\
\cline{2-6}
& $\geq$ 5 & $\leq$ 2x/month & 3–4x/month & > 1x/week but not nightly & Often 7x/week\\
\hline
\makecell[l]{SABA use\\ for symptom control} & All & $\leq$ 2 days/week & > 2 days/week but not daily & Daily & Several times a day\\
\hline
\makecell[l]{Interference \\with normal activity} & All & None & Minor limitation & Some limitation & Extremely limited\\
\hline
Lung function & & & & &\\
FEV1 (predicted) & $\geq$ 5 & \makecell{Normal FEV1 \\between exacerbations\\ > 80\%} & > 80\% & 60–80\% & < 60\%\\
\hline
\multirow{2}{*}{FEV1/FVC}
& 5 – 11 & > 85\% & > 80\% & 75–80\% & < 60\%\\
\cline{2-6}
& $\geq$ 12 & Normal & Normal & Reduced 5\% & Reduced > 5\%\\
\hline
\multirow{3}{*}{\makecell[l]{Exacerbations requiring \\oral corticosteroids}}
& 0–4 & & \multicolumn{3}{c}{\makecell{$\geq$ 2x in 6 months \\or $\geq$ 4 wheezing episodes/year lasting > 1 day\\ AND risk factors for persistent asthma}}& &\\
%\cline{3-6}
& 5-11 & & \multicolumn{3}{c}{$\geq$ 2x/year}& & \\
& $\geq$ 12 & \multirow{-3}{*}{$\leq$ 1x/year} & \multicolumn{3}{c}{\makecell{Consider severity and interval since last exacerbation. \\Frequency and severity may fluctuate over time for patients in any severity category. \\ Relative annual risk of exacerbations may be related to FEV1.}} && \\
\end{tabular}%
}
\end{sidewaystable}
\end{document}
有什么改进的想法吗?
非常感谢
答案1
我可以提出这样的建议:
\documentclass[11pt,a4paper, twoside,openright]{book}%letterpaper,
\usepackage[utf8]{inputenc}
\usepackage[a4paper, margin = 1cm]{geometry}
\usepackage{longtable, booktabs}
\usepackage{makecell} %used to insert break line inside table rows
\renewcommand\cellalign{lc}
\renewcommand\theadfont{\normalsize\bfseries}
\setcellgapes{4pt}
\usepackage{rotating}
\usepackage{multirow} %tables with multirow
\usepackage{amsmath}
\usepackage{textcomp}
\newcommand × perweek{\texttimes/week}
\newcommand × permonth{\texttimes/month}
\newcommand × peryear{\texttimes/year}
\begin{document}
\begin{sidewaystable}[htpb]
\centering
\makegapedcells
\begin{tabular}{l*{5}{c}}%{l|c|c|ccc}
\toprule
\multirowthead{8}[-2\cmidrulewidth]{Components of Severity} & \multirowthead{8}{Age \\ (Years)} & \multicolumn{4}{c}{\thead{Classification of Asthma Severity}}\\
\cmidrule(lr){3-6}%[\dimexpr\cmidrulesep +\relax]
& & \multirowthead{3}[\dimexpr0.5\cmidrulewidth-\cmidrulesep\relax]{Intermittent} & \multicolumn{3}{c}{\thead{Persistent}}\\
\cmidrule(lr){4-6}
& & & Mild & Moderate & Severe \\
\midrule
\midrule
Symptoms & All & $\leq$ 2 days/week & $ > 2 $ days/week but not daily & Daily & Throughout the day \\
\cmidrule(lr){1-6}
\multirow{2}{*}{Nighttime awakenings}
& 0–4 & 0 & 1–2 × permonth & 3–4 × permonth & $> 1$ × perweek \\
& $\geq 5$ & $\leq 2$ × permonth & 3–4 × permonth & $>1$ × perweek but not nightly & Often 7 × perweek \\
\cmidrule(lr){1-6}
\makecell[l]{SABA use & & & & & \\ for symptom control} & All & $\leq 2$ days/week & $ > 2 $ days/week but not daily & Daily & Several times a day\\
\cmidrule(lr){1-6}
\makecell[l]{Interference & & & & & \\with normal activity} & All & None & Minor limitation & Some limitation & Extremely limited\\
\cmidrule(lr){1-6}
Lung function & & & & & \\
FEV1 (predicted) & $\geq 5$ & \makecell{Normal FEV1 & & & \\between exacerbations\\ $ > 80\,\% $} & $ > 80\,\% $ & 60–80\,\% & $ < 60\,\% $ \\
\cmidrule(lr){1-6}
\multirow{2}{*}{FEV1/FVC}
& 5–11 & $ > 85\,\% $ & $ > 80\,\% $ & 75–80\,\% & $ < 60\,\% $ \\
& $\geq 12$ & Normal & Normal & Reduced 5\,\% & Reduced $ > 5\,\% $ \\
\cmidrule(lr){1-6}
\multirowcell{6}{Exacerbations requiring \\oral corticosteroids}
& 0–4 & & \multicolumn{3}{c}{\makecell{$\geq 2$\texttimes in 6 months \\or $\geq 4$ wheezing episodes/year lasting $ > 1$ day\\ AND risk factors for persistent asthma}} \\
& 5–11 & & \multicolumn{3}{c}{$\geq 2$ × peryear} \\
& $\geq 12$ & \multirow{-6}{*}{$\leq 1$ × peryear} & \multicolumn{3}{c}{\makecell{Consider severity and interval since last exacerbation. \\Frequency and severity may fluctuate over time for patients in any severity category. \\ Relative annual risk of exacerbations may be related to FEV1.}} \\
\bottomrule
\end{tabular}%
\end{sidewaystable}
\end{document}