Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am recreating a table that utilized many merged cells (excel) but in reality, this was an offensive creation that goes against most, if not all, rules for formatting tables. Can anyone suggest alternative layouts to this method of grouping cells?

enter image description here

\begin{table}[htbp]\footnotesize
  \centering
  \caption{Add caption}
    \begin{tabular}{cccrrr}
    \toprule
    \multirow{6}[1]{*}{\begin{sideways}40\% of index\end{sideways}} & \multirow{6}[1]{*}{\begin{sideways}\textbf{Exposure Index}\end{sideways}} 
          &       30\%  & \multicolumn{3}{l}{Surface temperature} \\
          &       & 10\%  & \multicolumn{3}{l}{Access to Green Space} \\
          &       & 10\%  & \multicolumn{3}{l}{Tree Canopy Shading} \\
          &       & 18\%  & \multicolumn{3}{l}{Dwellings in high rises (>5 storeys)} \\
          &       & 18\%  & \multicolumn{3}{l}{Rented dwellings in older high-rises (after 1986)} \\
          &       & 15\%  & \multicolumn{3}{l}{Population density} \\
    \cmidrule{1-6}
    \multirow{24}[3]{*}{\begin{sideways}60\% of index\end{sideways}} & \multirow{24}[3]{*}{\begin{sideways}\textbf{Sensitivity Index}\end{sideways}} & 25\%  & \multicolumn{3}{l}{Low income persons (2005, after tax LICO)} \\
          &       & 5\%   & \multicolumn{3}{l}{Low income persons among children (aged 0-5)} \\
          &       & 5\%   & \multicolumn{3}{l}{Renter Household Spending >=50\% of income on housing} \\
          &       & 5\%   & \multicolumn{3}{l}{Low-income renters spending >=50\% of income on housing} \\
          &       & 10\%  & \multicolumn{3}{l}{Persons not speaking English} \\
          &       & 5\%   & \multicolumn{3}{l}{Recent immigrants (2001-2006)} \\
          &       & 5\%   & \multicolumn{3}{l}{No high school certificate among adults (aged 25+)} \\
          &       & 5\%   & \multicolumn{3}{l}{Racialized groups} \\
          &       & 10\%  & \multicolumn{3}{l}{Disability among persons age 25-64} \\
          &       & 5\%   & \multicolumn{3}{l}{Emergency visits 2004-2008 for circulatory disease (age standardized rate)} \\
          &       & 5\%   & \multicolumn{3}{l}{Emergency visits 2004-2008 for respiratory disease (age standardized rate)} \\
    \cmidrule{3-6}
          &       & \multirow{13}[1]{*}{15\%} & \multicolumn{1}{c}{\multirow{13}[1]{*}{\begin{sideways}\textbf{Senior Sensitivity Index}\end{sideways}}} & \multicolumn{1}{c}{10\%} & Frail seniors (age 75+ with a disability) among total population in private households \\
          &       &       & \multicolumn{1}{c}{} & \multicolumn{1}{c}{10\%} & Low income (2005, after tax LICO) and living alone among seniors (age 65+) \\
          &       &       & \multicolumn{1}{c}{} & \multicolumn{1}{c}{20\%} & Low income among seniors \\
          &       &       & \multicolumn{1}{c}{} & \multicolumn{1}{c}{10\%} & Low income among seniors living alone \\
          &       &       & \multicolumn{1}{c}{} & \multicolumn{1}{c}{5\%} & Senior families paying >= 30\% on housing \\
          &       &       & \multicolumn{1}{c}{} & \multicolumn{1}{c}{5\%} & Unattached seniors paying >= 30\% on housing \\
          &       &       & \multicolumn{1}{c}{} & \multicolumn{1}{c}{10\%} & Seniors not speaking English \\
          &       &       & \multicolumn{1}{c}{} & \multicolumn{1}{c}{5\%} & Recent immigrants (1996-2006) among seniors \\
          &       &       & \multicolumn{1}{c}{} & \multicolumn{1}{c}{5\%} & No high school certificate among seniors \\
          &       &       & \multicolumn{1}{c}{} & \multicolumn{1}{c}{5\%} & Seniors in racialized groups \\
          &       &       & \multicolumn{1}{c}{} & \multicolumn{1}{c}{5\%} & Unattached seniors with disability \\
          &       &       & \multicolumn{1}{c}{} & \multicolumn{1}{c}{5\%} & Disability among persons age 65-74 \\
          &       &       & \multicolumn{1}{c}{} & \multicolumn{1}{c}{5\%} & Emergency visits 2004/05 among persons age 65-74 \\
    \bottomrule
    \end{tabular}%
  \label{tab:addlabel}%
\end{table}%
share|improve this question

1 Answer 1

up vote 2 down vote accepted

Notes:

  • Line space and
  • rules may be chosen more aesthetically.
  • I included \, between the percentage and the percent sign.
  • >= 00 was converted to $ \le 00 $ (and similar)
  • You maybe want to use $ \le 00 $ for the cases where you wrote 00+.

I would go more in this direction.

Code

\documentclass{article}
\usepackage{array,booktabs,tabularx}
\begin{document}\noindent%
\footnotesize%
    \begin{tabularx}{\linewidth}{r@{ }r@{ }r@{ }X}
                40\,\% &        &        & Exposure Index                                                              \\ \midrule
                       & 30\,\% &        & Surface temperature                                                         \\
                       & 10\,\% &        & Access to Green Space                                                       \\
                       & 10\,\% &        & Tree Canopy Shading                                                         \\
                       & 18\,\% &        & Dwellings in high rises ($ > 5$ storeys)                                    \\
                       & 18\,\% &        & Rented dwellings in older high-rises (after 1986)                           \\
                       & 15\,\% &        & Population density                                                          \\ \addlinespace
                60\,\% &        &        & Sensitivity Index                                                           \\ \midrule
                       &  5\,\% &        & Low income persons among children (aged 0--5)                               \\
                       &  5\,\% &        & Renter Household Spending $\ge 50\,\%$ of income on housing                 \\
                       &  5\,\% &        & Low-income renters spending $\ge 50\,\%$ of income on housing               \\
                       & 10\,\% &        & Persons not speaking English                                                \\
                       &  5\,\% &        & Recent immigrants (2001--2006)                                              \\
                       &  5\,\% &        & No high school certificate among adults (aged 25+)                          \\
                       &  5\,\% &        & Racialized groups                                                           \\
                       & 10\,\% &        & Disability among persons age 25--64                                         \\
                       &  5\,\% &        & Emergency visits 2004--2008 for circulatory disease (age standardized rate) \\
                       &  5\,\% &        & Emergency visits 2004--2008 for respiratory disease (age standardized rate) \\
                       & 15\,\% &        & Senior Sensitivity Index                                                    \\
        \cmidrule{2-4} &        & 10\,\% & Low income (2005, after tax LICO) and living alone among seniors ($ > 65$)  \\
                       &        & 20\,\% & Low income among seniors                                                    \\
                       &        & 10\,\% & Low income among seniors living alone                                       \\
                       &        &  5\,\% & Senior families paying $\ge 30\,\%$ on housing                              \\
                       &        &  5\,\% & Unattached seniors paying $\ge 30\,\%$ on housing                           \\
                       &        & 10\,\% & Seniors not speaking English                                                \\
                       &        &  5\,\% & Recent immigrants (1996--2006) among seniors                                \\
                       &        &  5\,\% & No high school certificate among seniors                                    \\
                       &        &  5\,\% & Seniors in racialized groups                                                \\
                       &        &  5\,\% & Unattached seniors with disability                                          \\
                       &        &  5\,\% & Disability among persons age 65--74                                         \\
                       &        &  5\,\% & Emergency visits 2004/05 among persons age 65--74                           \\
    \end{tabularx}%
\end{document}

Output

enter image description here


Or more subtle. See also revision 2.

Code

\documentclass{article}
\usepackage{array,booktabs,tabularx,collcell}
\def\s{\hspace*{.75em}}
\begin{document}\noindent%
\footnotesize%
    \begin{tabularx}{\linewidth}{r*2{@{\s}>{\collectcell\llap}r<{\endcollectcell}}X}
        \toprule
        40\,\% &        &        & Exposure Index                                                              \\ \midrule
               & 30\,\% &        & Surface temperature                                                         \\
               & 10\,\% &        & Access to Green Space                                                       \\
               & 10\,\% &        & Tree Canopy Shading                                                         \\
               & 18\,\% &        & Dwellings in high rises ($ > 5$ storeys)                                    \\
               & 18\,\% &        & Rented dwellings in older high-rises (after 1986)                           \\
               & 15\,\% &        & Population density                                                          \\ \toprule
        60\,\% &        &        & Sensitivity Index                                                           \\ \midrule
               &  5\,\% &        & Low income persons among children (aged 0--5)                               \\
               &  5\,\% &        & Renter Household Spending $\ge 50\,\%$ of income on housing                 \\
               &  5\,\% &        & Low-income renters spending $\ge 50\,\%$ of income on housing               \\
               & 10\,\% &        & Persons not speaking English                                                \\
               &  5\,\% &        & Recent immigrants (2001--2006)                                              \\
               &  5\,\% &        & No high school certificate among adults ($ \ge 25$)                         \\
               &  5\,\% &        & Racialized groups                                                           \\
               & 10\,\% &        & Disability among persons age 25--64                                         \\
               &  5\,\% &        & Emergency visits 2004--2008 for circulatory disease (age standardized rate) \\
               &  5\,\% &        & Emergency visits 2004--2008 for respiratory disease (age standardized rate) \\
               & 15\,\% &        & Senior Sensitivity Index                                                    \\ \midrule
               &        & 10\,\% & Low income (2005, after tax LICO) and living alone among seniors ($ > 65$)  \\
               &        & 20\,\% & Low income among seniors                                                    \\
               &        & 10\,\% & Low income among seniors living alone                                       \\
               &        &  5\,\% & Senior families paying $\ge 30\,\%$ on housing                              \\
               &        &  5\,\% & Unattached seniors paying $\ge 30\,\%$ on housing                           \\
               &        & 10\,\% & Seniors not speaking English                                                \\
               &        &  5\,\% & Recent immigrants (1996--2006) among seniors                                \\
               &        &  5\,\% & No high school certificate among seniors                                    \\
               &        &  5\,\% & Seniors in racialized groups                                                \\
               &        &  5\,\% & Unattached seniors with disability                                          \\
               &        &  5\,\% & Disability among persons age 65--74                                         \\
               &        &  5\,\% & Emergency visits 2004/05 among persons age 65--74                           \\ \bottomrule
    \end{tabularx}%
\end{document}

Output

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.