1

I have the following table which I have readjusted using adjustbox. However, the font size is too small now. How to solve this issue?

\begin{table}[htbp]
  \centering
  \caption{Add caption}
  \begin{adjustbox}{width=\textwidth}
    \begin{tabular}{rrrrr}
    \toprule
    \toprule
          &       &       &       &  \\
\cmidrule{2-5}          & \multicolumn{1}{l}{Professional, Managerial, Technical} & \multicolumn{1}{l}{Clerical, Sales} & \multicolumn{1}{l}{Production, Operators} & \multicolumn{1}{l}{Service} \\
\cmidrule{2-5}    \multicolumn{1}{l}{\textit{Non-routine cognitive}} &       &       &       &  \\
    \multicolumn{1}{l}{O*NET non-routine cognitive analytic} & \multicolumn{1}{c}{1.19} & \multicolumn{1}{c}{-0.30} & \multicolumn{1}{c}{-0.38} & \multicolumn{1}{c}{-0.93} \\
          & \multicolumn{1}{c}{(0.43)} & \multicolumn{1}{c}{(0.69)} & \multicolumn{1}{c}{(0.67)} & \multicolumn{1}{c}{(0.98)} \\
    \multicolumn{1}{l}{O*NET non-routine cognitive interpersonal} & \multicolumn{1}{c}{1.03} & \multicolumn{1}{c}{-0.34} & \multicolumn{1}{c}{-0.38} & \multicolumn{1}{c}{-0.42} \\
          & \multicolumn{1}{c}{(0.87)} & \multicolumn{1}{c}{(0.65)} & \multicolumn{1}{c}{(0.82)} & \multicolumn{1}{c}{(0.75)} \\
    \multicolumn{1}{l}{\textit{Routine cognitive and manual }} &       &       &       &  \\
    \multicolumn{1}{l}{O*NET routine cognitive} & \multicolumn{1}{c}{-0.23} & \multicolumn{1}{c}{0.45} & \multicolumn{1}{c}{0.19} & \multicolumn{1}{c}{-0.52} \\
          & \multicolumn{1}{c}{(0.81)} & \multicolumn{1}{c}{(1.09)} & \multicolumn{1}{c}{(0.69)} & \multicolumn{1}{c}{(0.91)} \\
    \multicolumn{1}{l}{O*NET routine manual} & \multicolumn{1}{c}{-0.86} & \multicolumn{1}{c}{-0.48} & \multicolumn{1}{c}{0.98} & \multicolumn{1}{c}{0.05} \\
          & \multicolumn{1}{c}{(0.57)} & \multicolumn{1}{c}{(0.64)} & \multicolumn{1}{c}{(0.66)} & \multicolumn{1}{c}{(0.69)} \\
    \multicolumn{1}{l}{\textit{Non-routine manual }} &       &       &       &  \\
    \multicolumn{1}{l}{O*NET non-routine manual} & \multicolumn{1}{c}{-0.81} & \multicolumn{1}{c}{-0.59} & \multicolumn{1}{c}{0.95} & \multicolumn{1}{c}{0.14} \\
          & \multicolumn{1}{c}{(0.55)} & \multicolumn{1}{c}{(0.51)} & \multicolumn{1}{c}{(0.76)} & \multicolumn{1}{c}{(0.47)} \\
          &       &       &       &  \\
    \bottomrule
    \end{tabular}%
    \end{adjustbox}
  \label{tab:addlabel}%
\end{table}%
  • Welcome to TeX.SE. The trouble with the adjustbox-shrunk table is not just that the font size is too small. The lines are too thin as well. – Mico Jun 14 '21 at 00:05
  • Off-topic: Don't double up on \toprule or, for that matter, on any other rule of the booktabs package. – Mico Jun 14 '21 at 00:34
  • never scale tables with adjustbox, \resizebox etc, as you see it destroys any consistent font choice. – David Carlisle Jun 14 '21 at 08:12
  • also you have \multicolumn{1} in every!! cell your markup would be much easier to read if you deleted all of them (they do nothing useful) – David Carlisle Jun 14 '21 at 08:15

3 Answers3

2
  • it seems that your table is generated by some table generator, consequently it is full of clutter of multicolumn{1}{...}{...}, in MWE below are removed all of them
  • for numbers are used S column types defined in the siunitx package
  • text in the column headers are broken into more lines
  • determination of the distances between columns' is left to macro \extracolsep{\fill}:
\documentclass{article}
\usepackage{geometry}    added
\usepackage{siunitx}    % consider v3
\usepackage{booktabs, makecell}

\begin{document} \begin{table}[htbp] \centering \caption{Add caption} \label{tab:addlabel} \sisetup{ table-align-text-before=false, input-open-uncertainty =, input-close-uncertainty=, table-format={(}-1.2{)} } \setlength\tabcolsep{0pt} \begin{tabular}{\linewidth}{@{\extracolsep{\fill}} l {4}{S} } \toprule & {\makecell[b]{Professional,\ Managerial,\ Technical}} & {\makecell[b]{Clerical,\ Sales}} & {\makecell[b]{Production,\ Operators}} & {Service} \ \midrule
\textit{Non-routine cognitive} & & & & \ ONET non-routine cognitive analytic & 1.19 & -0.30 & -0.38 & -0.93 \ & (0.43) & (0.69) & (0.67) & (0.98) \ \addlinespace ONET non-routine cognitive interpersonal & 1.03 & -0.34 & -0.38 & -0.42 \ & (0.87) & (0.65) & (0.82) & (0.75) \ \textit{Routine cognitive and manual} & & & & \ ONET routine cognitive & -0.23 & 0.45 & 0.19 & -0.52 \ & (0.81) & (1.09) & (0.69) & (0.91) \ \addlinespace ONET routine manual & -0.86 & -0.48 & 0.98 & 0.05 \ & (0.57) & (0.64) & (0.66) & (0.69) \ \textit{Non-routine manual} & & & & \ ONET non-routine manual & -0.81 & -0.59 & 0.95 & 0.14 \ & (0.55) & (0.51) & (0.76) & (0.47) \ \bottomrule \end{tabular} \end{table} \end{document}

enter image description here

(red lines indicate text area borders)

Zarko
  • 296,517
1

As a first step, do get rid of the adjustbox wrapper as well as of all 84 [!] \multicolumn wrappers. Each and every one one of these wrappers is bad. The double-\toprule is also rather questionable. Then, employ a tabularx environment and allow automatic word wrapping in the four data columns. Oh, and aligning the numbers on their decimal markers would be nice.

enter image description here

\documentclass{article}
\usepackage[margin=3cm]{geometry}  % choose page parameters suitably
\usepackage[T1]{fontenc}
\usepackage{booktabs,tabularx,dcolumn}
\newcolumntype{C}{>{\centering}X}
\newcolumntype{d}[1]{D..{#1}}
\newcommand\mC[1]{\multicolumn{1}{C}{#1}}
\usepackage[skip=0.3333\baselineskip]{caption} % optional
\begin{document}

\begin{table}[htbp]

\caption{Add caption} \label{tab:3}

\begin{tabularx}{\textwidth}{@{} l {4}{d{2.2}} @{}} \toprule & \mC{Professional, Managerial, Technical} & \mC{Clerical, Sales} & \mC{Production, Operators} & \multicolumn{1}{c@{}}{Service} \ \cmidrule(l){2-5}
\textit{Non-routine cognitive} \ O
NET non-routine cognitive analytic & 1.19 & -0.30 & -0.38 & -0.93 \ & (0.43) & (0.69) & (0.67) & (0.98) \ ONET non-routine cognitive interpersonal & 1.03 & -0.34 & -0.38 & -0.42 \ & (0.87) & (0.65) & (0.82) & (0.75) \ \addlinespace \textit{Routine cognitive and manual}\ ONET routine cognitive & -0.23 & 0.45 & 0.19 & -0.52 \ & (0.81) & (1.09) & (0.69) & (0.91) \ ONET routine manual & -0.86 & -0.48 & 0.98 & 0.05 \ & (0.57) & (0.64) & (0.66) & (0.69) \ \addlinespace \textit{Non-routine manual } \ ONET non-routine manual & -0.81 & -0.59 & 0.95 & 0.14 \ & (0.55) & (0.51) & (0.76) & (0.47) \ \bottomrule \end{tabularx} \end{table} \end{document}

Mico
  • 506,678
  • If you prefer to vertically center the header entries (the default is top alignment), just issue the instruction \renewcommand\tabularxcolumn[1]{m{#1}} in the preamble, after loading the tabularx package. Or, for alignment on the bottom edges, run \renewcommand\tabularxcolumn[1]{b{#1}}. – Mico Jun 14 '21 at 04:05
0

does this help

enter image description here

    \begin{table}[htbp]
  \centering
  \caption{Add caption}
  % \begin{adjustbox}{width=\textwidth}
    \begin{tabular}{rrrrr}
    \toprule
    \toprule
          &       &       &       &  \\          
          & \makecell{Professional, \\Managerial, \\Technical} 
            & \makecell{Clerical, \\Sales\\ \phantom{Technical}} 
                & \makecell{Production, \\Operators\\ \phantom{Technical}} 
                    & \makecell{Service\\ \phantom{Technical}\\ \phantom{Technical}} \\ \cmidrule{2-5}
    \multicolumn{1}{l}{\textit{Non-routine cognitive}} &       &       &       &  \\
    \multicolumn{1}{l}{O*NET non-routine cognitive analytic} & \multicolumn{1}{c}{1.19} & \multicolumn{1}{c}{-0.30} & \multicolumn{1}{c}{-0.38} & \multicolumn{1}{c}{-0.93} \\
          & \multicolumn{1}{c}{(0.43)} & \multicolumn{1}{c}{(0.69)} & \multicolumn{1}{c}{(0.67)} & \multicolumn{1}{c}{(0.98)} \\
    \multicolumn{1}{l}{O*NET non-routine cognitive interpersonal} & \multicolumn{1}{c}{1.03} & \multicolumn{1}{c}{-0.34} & \multicolumn{1}{c}{-0.38} & \multicolumn{1}{c}{-0.42} \\
          & \multicolumn{1}{c}{(0.87)} & \multicolumn{1}{c}{(0.65)} & \multicolumn{1}{c}{(0.82)} & \multicolumn{1}{c}{(0.75)} \\
    \multicolumn{1}{l}{\textit{Routine cognitive and manual }} &       &       &       &  \\
    \multicolumn{1}{l}{O*NET routine cognitive} & \multicolumn{1}{c}{-0.23} & \multicolumn{1}{c}{0.45} & \multicolumn{1}{c}{0.19} & \multicolumn{1}{c}{-0.52} \\
          & \multicolumn{1}{c}{(0.81)} & \multicolumn{1}{c}{(1.09)} & \multicolumn{1}{c}{(0.69)} & \multicolumn{1}{c}{(0.91)} \\
    \multicolumn{1}{l}{O*NET routine manual} & \multicolumn{1}{c}{-0.86} & \multicolumn{1}{c}{-0.48} & \multicolumn{1}{c}{0.98} & \multicolumn{1}{c}{0.05} \\
          & \multicolumn{1}{c}{(0.57)} & \multicolumn{1}{c}{(0.64)} & \multicolumn{1}{c}{(0.66)} & \multicolumn{1}{c}{(0.69)} \\
    \multicolumn{1}{l}{\textit{Non-routine manual }} &       &       &       &  \\
    \multicolumn{1}{l}{O*NET non-routine manual} & \multicolumn{1}{c}{-0.81} & \multicolumn{1}{c}{-0.59} & \multicolumn{1}{c}{0.95} & \multicolumn{1}{c}{0.14} \\
          & \multicolumn{1}{c}{(0.55)} & \multicolumn{1}{c}{(0.51)} & \multicolumn{1}{c}{(0.76)} & \multicolumn{1}{c}{(0.47)} \\
          &       &       &       &  \\
    \bottomrule
    \end{tabular}%
    % \end{adjustbox}
  \label{tab:addlabel}%
\end{table}
js bibra
  • 21,280