- How do I get the "Age" columns to center vertically and have the numbers in brackets go to the next line? They don't seem to want to wrap.
- Is there a macro I can use to center the "Numbers" column?
Code: Select all
Code, edit and compile here:
\documentclass{article}\usepackage{array}\usepackage{booktabs}\usepackage{multicol}\usepackage{multirow}\usepackage{rotating}\begin{document}\begin{sidewaystable}[htbp]\centering\caption{Add caption}\begin{tabular}{p{0.5in} | p{1.25in} | p{0.5in} | p{0.5in} | p{1.25in} | p{0.5in} | p{1.25in} | p{0.5in}}\topruleAge & Marital Status & Number & Age & Education Level & Number & Income & Number \\\midrule\multirow{4}[8]{*}{20-34 [17]} & Nvr Married & 9 & \multirow{4}[8]{*}{18-24 [6]} & HS or less & 3 & less than \$15,000 & 4 \\ \hline& Married & 7 & & BA (some college) & 2 & \$15k -- \$35k & 21 \\ \hline& Divorced/Separated & 1 & & Graduate & 1 & \$35k -- \$65k & 17 \\ \hline& Widowed & & & & & More than \$65k & 8 \\ \hline\multirow{4}[8]{*}{35-44 [12]} & Nvr Married & 2 & \multirow{4}[8]{*}{25-34 [11]} & HS or (some college) & 7 & & \\ \hline& Married & 8 & & BA & 3 & & \\ \hline& Divorced/Separated & 2 & & Graduate & 1 & Race & Number \\ \hline& Widowed & & & & & White & 37 \\ \hline\multirow{4}[8]{*}{45-54 [12]} & Nvr Married & 1 & \multirow{4}[8]{*}{35-44 [12]} & HS (some college) & 8 & Black/African American & 6 \\ \hline& Married & 8 & & BA & 3 & American indian or Alaskan native & \\ \hline& Divorced/Separated & 3 & & Graduate & 1 & Asian & 2 \\ \hline& Widowed & & & & & Native Hawaiian and Pacific Islander & \\ \hline\multirow{4}[8]{*}{55-64 [9]} & Nvr Married & 0 & \multirow{4}[8]{*}{45-64 [21]} & Some college HS or less & 15 & Hispanic or Latino & 1 \\ \hline& Married & 6 & & BA or higher & 6 & Other & 4 \\ \hline& Divorced/Separated & 2 & & & & & \\ \hline& Widowed & 1 & & & & & \\ \hline\bottomrule\end{tabular}\label{tab:sample50}\end{sidewaystable}\end{document}