[Tex/LaTex] Using adjustbox along with table footnote

tables

I'm using this code for a table and I've successfully added a footnote to it. However, when I want to adjust the table to fit in the paper using {Adjustbox} (commented lines that are lines 18 and 179) it gives me this error:

Missing \endgroup inserted.

I appreciate your help to find a way to adjust this table to the paper. Thank you very much.

\documentclass{article}
\usepackage{amssymb}
\usepackage[colorlinks,citecolor=blue]{hyperref}
\usepackage{colortbl}
\usepackage{adjustbox}
\usepackage{booktabs}
\usepackage{multirow,color}
\usepackage[Table]{xcolor}
\usepackage{rotating}
\usepackage{booktabs,caption}
\usepackage[flushleft]{threeparttable}
\begin{document}
\begin{table}[htbp]
  \begin{threeparttable}
  \centering
    \caption{List of SWAT parameters evaluated for sensitivity analysis in the ECW.}
   % \begin{adjustbox}{width=\textwidth}
       \begin{tabular}{lp{5.285em}p{38em}p{6.5em}ll}
         \toprule
          &
           Parameter &
           Description &
           Units &
           \multicolumn{1}{p{2.07em}}{LB} &
           \multicolumn{1}{p{1.855em}}{UB}
           \\
         \midrule
         1 &
           ALPHA\_BF &
           Base flow alpha factor for recession constant{${\mathrm{^{(a,b)}}}$} &
           days &
           0 &
           1
           \\
         2 &
           CANMX &
           Maximum canopy storage{${\mathrm{^{(c)}}}$} &
           mm &
           0 &
           10
           \\
         3 &
           CH\_KI &
           Fraction change in hydraulic conductivity in tributary channels{${\mathrm{^{(d)}}}$} &
            {${\mathrm{mm\,hr^{-1}}}$} &
           0 &
           300
           \\
         4 &
           CH\_KII &
           Fraction change in hydraulic conductivity in the main channel{${\mathrm{^{(d)}}}$} &
           {${\mathrm{mm\,hr^{-1}}}$} &
           -0.01 &
           500
           \\
         5 &
           CH\_NI &
           Manning’s n value for the tributary channels{${\mathrm{^{(d)}}}$} &
           - &
           0.01 &
           0.3
           \\
         6 &
           CH\_NII &
           Manning’s n value for the main channels{${\mathrm{^{(d)}}}$} &
           - &
           0.01 &
           0.3
           \\
         7 &
           CN2 &
           Initial SCS runoff curve number for moisture condition II{${\mathrm{^{(e)}}}$} &
           \% &
           -10 &
           10
           \\
         8 &
           DDRAIN &
           Depth to subsurface drain{${\mathrm{^{(f)}}}$} &
           mm &
           500 &
           1500
           \\
         9 &
           ESCO &
           Soil evaporation compensation factor{${\mathrm{^{(c)}}}$} &
           - &
           0.01 &
           1
           \\
         10 &
           GDRAIN &
           Drain tile lag time{${\mathrm{^{(f)}}}$} &
           hr &
           0 &
           48
           \\
         11 &
           GW\_DELAY &
           Groundwater delay time{${\mathrm{^{(b)}}}$} &
           day &
           0 &
           90
           \\
         12 &
           GWQMN &
           Threshold depth of water in the shallow aquifer required for return flow to occur{${\mathrm{^{(b)}}}$} &
           mm &
           0 &
           4000
           \\
         13 &
           SFTMP &
           Snow temperature{${\mathrm{^{(g)}}}$} &
           ${^\circ}$C &
           -5 &
           5
           \\
         14 &
           SMFMN &
           Minimum melt rate for snow{${\mathrm{^{(g)}}}$} &
           {${\mathrm{{mm\,{^\circ}C^{-1}day^{-1}}}}$} &
           0 &
           10
           \\
         15 &
           SMFMX &
           Maximum melt rate for snow{${\mathrm{^{(g)}}}$} &
           {${\mathrm{{mm\,{^\circ}C^{-1}day^{-1}}}}$} &
           0 &
           10
           \\
         16 &
           SMTMP &
           Snow melt base temperature{${\mathrm{^{(g)}}}$} &
           ${^\circ}$C &
           -5 &
           5
           \\
         17 &
           SNO50COV &
           Snow water equivalent that correspond to 50\% snow cover{${\mathrm{^{(g)}}}$} &
           mm &
           0 &
           0.9
           \\
         18 &
           SNOCOVMX &
           Minimum snow water content that corresponds to 100\% snow cover{${\mathrm{^{(g)}}}$} &
           mm &
           0 &
           650
           \\
         19 &
           SOL\_AWC &
           Available soil water capacity{${\mathrm{^{(h)}}}$} &
           \% &
           -10 &
           20
           \\
         20 &
           SURLAG &
           Surface runoff lag time{${\mathrm{^{(e)}}}$} &
           day &
           1 &
           12
           \\
         21 &
           TIMP &
           Snow pack temperature lag factor{${\mathrm{^(g)}}$} &
           - &
           0.01 &
           1
           \\
         \bottomrule
         \end{tabular}
       % \end{adjustbox}
    \begin{tablenotes}
      \small
      \item The process represented by the parameters are (a) baseflow, (b) groundwater, (c) evapotranspiration, (d) channel flow, (e) surface runoff, (f) water management, (g) snow and (h) soil water processes.
    \end{tablenotes}
  \end{threeparttable}
\end{table}
\end{document} 

Best Answer

If you accept some description spread over multiple lines, using tabularx, you can use the small font size while having the table fit a single page. I added siunitx to have a simpler code for units and an alignment of the decimal dot in the last but one column. Also I simplified typing of your table notes, since you have the \tnote{…} command, and the corresponding \item[…].

Note the hyperref package should be loaded last (with some exceptions, most notably cleveref), and you don't have to load colortbl if you load xcolor with option [table].

\documentclass[table]{article}
\usepackage[utf8]{inputenc}
\usepackage{amssymb}
\usepackage{ragged2e}
\usepackage{xcolor}
\usepackage{rotating}
\usepackage{tabularx, multirow ,booktabs,caption}
\usepackage[flushleft]{threeparttable}
\usepackage{siunitx}
\sisetup{per-mode=reciprocal}
\usepackage[colorlinks,citecolor=blue]{hyperref}

\begin{document}

\begin{table}[!htbp]
\setlength{\tabcolsep}{4pt}
\setlength{\extrarowheight}{2pt}
\small%
  \begin{threeparttable}
  \centering
    \caption{List of SWAT parameters evaluated for sensitivity analysis in the ECW.}
       \begin{tabularx}{\linewidth}{rl >{\RaggedRight\arraybackslash}Xl@{\hspace{-0.6em}}>{$}r<{$}r}
         \toprule
          &
           Parameter & Description & Units & \text{LB} & {UB} \\
         \midrule
         1 & ALPHA\_BF &
           Base flow alpha factor for recession constant\tnote{(a,b)} &
           day & 0 & 1 \\
         2 & CANMX &
           Maximum canopy storage\tnote{(c)} &
           mm & 0 & 10 \\
         3 & CH\_KI &
           Fraction change in hydraulic conductivity in tributary channels\tnote{(d)} &
            \si{\mm\per\hour} & 0 & 300 \\
         4 & CH\_KII &
           Fraction change in hydraulic conductivity in the main channel\tnote{(d)} &
             \si{\mm\per\hour} & -0.01 & 500 \\
         5 & CH\_NI &
           Manning’s n value for the tributary channels\tnote{(d)} &
          – & 0.01 & 0.3 \\
         6 & CH\_NII &
           Manning’s n value for the main channels\tnote{(d)} &
          – & 0.01 & 0.3 \\
         7 & CN2 &
           Initial SCS runoff curve number for moisture condition II\tnote{(e)} &
           \% & -10 & 10 \\
         8 & DDRAIN &
           Depth to subsurface drain\tnote{(f)} &
           mm & 500 & 1500 \\
         9 & ESCO &
           Soil evaporation compensation factor\tnote{(c)} &
          – & 0.01 & 1 \\
         10 & GDRAIN
         & Drain tile lag time\tnote{(f)} &
           h & 0 & 48 \\
         11 & GW\_DELAY &
           Groundwater delay time\tnote{(b)} &
           day & 0 & 90 \\
         12 & GWQMN &
           Threshold depth of water in the shallow aquifer required for return flow to occur\tnote{(b)} &
           mm & 0 & 4000 \\
         13 & SFTMP &
           Snow temperature\tnote{(g)} &
           \si{\celsius} & -5 & 5 \\
         14 & SMFMN &
           Minimum melt rate for snow\tnote{(g)} &
           \si{\mm\per\celsius\per\day} & 0 & 10 \\
         15 & SMFMX &
           Maximum melt rate for snow\tnote{(g)} &
           \si{\mm\per\celsius\per\day} & 0 & 10 \\
         16 & SMTMP &
           Snow melt base temperature\tnote{(g)}&
           \si{\celsius} & -5 & 5 \\
         17 & SNO50COV &
           Snow water equivalent that correspond to 50\,\% snow cover\tnote{(g)} &
           mm & 0 & 0.9 \\
         18 & SNOCOVMX &
           Minimum snow water content that corresponds to 100\,\% snow cover\tnote{(g)} &
           mm & 0 & 650 \\
         19 & SOL\_AWC &
           Available soil water capacity\tnote{(h)} &
           \% & -10 & 20 \\
         20 & SURLAG &
           Surface runoff lag time\tnote{(e)} &
           day & 1 & 12 \\
         21 & TIMP &
           Snow pack temperature lag factor\tnote{(g)} &
         – & 0.01 & 1 \\
         \bottomrule
         \end{tabularx}
\smallskip
    \begin{tablenotes}[para, online]
      The process represented by the parameters are:% \\
       \item[(a)] baseflow, \item[(b)] groundwater, \item[(c)] evapotranspiration, \item[(d)] channel flow, \item[(e)] surface runoff, \item[(f)] water management, \item[(g)] snow and \item[(h)] soil water processes.
    \end{tablenotes}
  \end{threeparttable}
\end{table}

\end{document} 

enter image description here

Related Question