2

I've been working on a table with several multicolumns and multirows. Though the table is almost done, there are some details that I'm not very confortable. I don't think the last row Exarcebations requiring oral corticosteroids is really good.

Can someone help me doing it better? I would also like to separate the persistent columns though the last row wouldn't have separator.

 \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}

Any ideas for improvement?

Thank you very much

2
  • 1
    When asking questions it is better to provide a full minimal working example (MWE) both in order to demonstrate what you are trying to do and to help others help you. The MWE should look like \documentclass...\begin{document}...\end{document}, it should compile and contain close to the minimal amount of code needed to explain/demonstrate what you are asking. This saves everyone time and makes it easier to help you:)
    – user30471
    Mar 24, 2015 at 10:47
  • Sorry @Andrew I was working only on the table and forgot those important details to see the table. I've updated my question. Thank you!
    – psoares
    Mar 24, 2015 at 10:56

1 Answer 1

2

I can propose this:

\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} 

enter image description here

4
  • I agree entirely with Bernard. When I found time I was going to post a similar solution. To quote the booktabs manual, Never, ever use vertical rules. Mind you the same manual also says Never use double rules:)
    – user30471
    Mar 25, 2015 at 9:13
  • Thank you very much! Looks much better! So many new stuff! Do you have any documentation that I could read to understand better the commands you used? Thank you!
    – psoares
    Mar 25, 2015 at 11:52
  • I only used the possibilities the booktabs and makecell provide. It will certainly be fruitful to consult them, but feel free to ask questions about the code if what it does is unclear.
    – Bernard
    Mar 25, 2015 at 13:28
  • @Andrew: The rules mentioned by booktabs are general rules. As all general rules, they're here to suffer exceptions (this is the only rule that doesn't suffer an exception) :o)
    – Bernard
    Mar 25, 2015 at 13:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .