避免表格单元格有多行

避免表格单元格有多行

我有这张表格,这是我在朋友的帮助下得到的。我想确保这张表格中的任何单元格(特别是“描述”列的单元格)都不会有多行(它们只覆盖一行文本)。非常感谢您的帮助。谢谢。

\documentclass{article}
\usepackage{amssymb}
\usepackage{adjustbox}
\usepackage[table]{xcolor}
\usepackage{rotating}
\usepackage{array, booktabs, multirow,}
\usepackage[flushleft]{threeparttable}
\usepackage{ragged2e}
\usepackage{caption}
\usepackage{siunitx}
\usepackage[colorlinks,citecolor=blue]{hyperref}% had to be last in preamble
\begin{document}
\begin{table}[htbp]
  \begin{threeparttable}
  \centering
  \small
  \setlength\tabcolsep{0pt}
    \caption{List of SWAT parameters evaluated for sensitivity analysis in the ECW.}
       \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
                                    ll
                                    >{\RaggedRight}p{15em}
                                    lll
                                    @{}}
         \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\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{tabular*}
    \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} 

答案1

避免所有列中的所有换行符的唯一现实方法是将表切换为横向模式,例如,使用环境sidewaystable

话虽如此,我真的不明白为了让表格适合纵向页面方向而让“描述”列中的文本分成两行或更多行有什么不好。

在此处输入图片描述

\documentclass{article}
\usepackage{array, booktabs, multirow}
\usepackage{amssymb, adjustbox, siunitx, rotating}
\usepackage[table]{xcolor}
\usepackage[flushleft,para]{threeparttable}
\usepackage[colorlinks,citecolor=blue]{hyperref}

\begin{document}

\begin{sidewaystable}
\begin{threeparttable}
  \centering
  \small
  \caption{List of SWAT parameters evaluated for sensitivity analysis in the ECW.}
  \begin{tabular}{@{} llll >{$}r<{$} r @{}}
  \toprule
  & Parameter & Description & Units 
  & \multicolumn{1}{r}{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{tabular}     

     \footnotesize
     \smallskip

     The processes represented by the parameters are: 
      \textsuperscript{(a)}\,baseflow, 
      \textsuperscript{(b)}\,groundwater, 
      \textsuperscript{(c)}\,evapo\-transpiration, 
      \textsuperscript{(d)}\,channel flow, 
      \textsuperscript{(e)}\,surface runoff, 
      \textsuperscript{(f)}\,water management, 
      \textsuperscript{(g)}\,snow, and 
      \textsuperscript{(h)}\,soil water processes.

\end{threeparttable}
\end{sidewaystable}
\end{document} 

相关内容