长表环境中的 badboxes

长表环境中的 badboxes

我正在为论文做设计,在命名方面遇到了一个小问题。我为此使用了 longtable,但由于我调整了页面几何形状和边距,它产生了一些 badboxes。当我重现未调整格式的 longtable 时,badboxed 不会出现。但是我无法找出问题到底是什么。

有人知道吗?

请参见下面的 MWE 和图像。

提前致谢!

\documentclass[10pt,showtrim,openright]{scrreprt} 

\usepackage[
includemp,
                  showframe,
                  reversemp,
            paperwidth=20.10cm,
            paperheight=25.80cm,
            top=2.30cm,
            bottom=3.4cm,
            inner=2.7cm,
            outer=2.7cm,
            marginparwidth=1.6cm, % Fixed for now
            marginparsep=0.4cm
            ]{geometry}


\usepackage{booktabs} % for tabular lines
\usepackage{longtable} % allows long table for nomenclature
\usepackage{floatrow}               % Set up captions of floats
\usepackage{changepage}              % to adjust the width 
\usepackage[footwidth=textwithmarginpar]{scrlayer-scrpage} % page styl

%-------------------- FIGURES ---------------------------

% Figure captions with no indentation
\setcapindent{0pt}

% to set the marginpar on the left side in showframe
\makeatletter          
\let\Gm@vrules@mpi\Gm@vrules@mpii
\makeatother

\setlength{\tabcolsep}{4pt} 


\begin{document}

\addtolength{\tabcolsep}{-4pt}
\begin{longtable}{p{2.95cm} p{2cm} p{7.75cm}}

  Symbol & Units & Description \\
  \hline
  \endfirsthead
  Symbol & Units & Description \hfill (continued)\\
  \hline
  \endhead
  $\alpha$ & - & Factor to convert from wind velocity to shear velocity. \\
  $\beta$ & - & Ratio between drag coefficients of bare surface and 
  roughness elements.\\
  $\theta_u$ & - & Wind direction. \\
  $\Gamma$ & - & Implicitness parameter. \\
  $\gamma$ & - & Maximum wave height over depth ratio. \\
  $\zeta$ & - & Bed interaction factor. \\
  $\eta$ & m+MSL & Still water level. \\
  $\hat{\eta}$ & m+MSL & Local water level. \\
  $\kappa$ & - & Von K{\'a}rm{\'a}n constant. \\
  $\lambda$ & - & Roughness density. \\
  $\xi$ & - & Surf similarity parameter. \\
  $\rho_{\mathrm{a}}$ & $\mathrm{kg/m^3}$ & Air density. \\
  $\rho_{\mathrm{p}}$ & $\mathrm{kg/m^3}$ & Grain density. \\
  $\rho_{\mathrm{w}}$ & $\mathrm{kg/m^3}$ & Water density. \\
  $\sigma$ & - & Ratio between surface area and frontal area of roughness 
  elements. \\
  $\Phi$ & kg/m/s & Space-integrated entrainment function. \\
  $\phi$ & $\mathrm{kg/m^2/s}$ & Entrainment function. \\
  $\Psi$ & kg/s & Sediment transport potential. \\
  \end{longtable}

  \end{document}

在此处输入图片描述

答案1

我建议您稍微修改一下表格设计:

\documentclass[10pt,openright]{scrreprt}

\usepackage[    includemp,
                showframe,
                reversemp,
            paperwidth=20.10cm,
            paperheight=25.80cm,
            top=2.30cm,
            bottom=3.4cm,
            inner=2.7cm,
            outer=2.7cm,
            marginparwidth=1.6cm, % Fixed for now
            marginparsep=0.4cm
            ]{geometry}


\usepackage{booktabs, longtable}
\usepackage{siunitx}                % added, for units
\usepackage{changepage}             % to adjust the width
\usepackage{floatrow}               % Set up captions of floats
\usepackage[footwidth=textwithmarginpar]{scrlayer-scrpage} % page style

% Figure captions with no indentation
\setcapindent{0pt}
% to set the marginpar on the left side in showframe
\makeatletter
\let\Gm@vrules@mpi\Gm@vrules@mpii
\makeatother



\begin{document}

{\setlength{\tabcolsep}{0pt}% moved here
\begin{longtable}{>{$}p{0.24\linewidth}<{$} % changed, column is now in "math" mode
                      p{0.16\linewidth} 
                      p{0.6\linewidth}}% changed, now columns are relative to \textwidth
\text{Symbol}   &   Units   &   Description                         \\
    \midrule
\endfirsthead
\text{Symbol}   &   Units   &   Description     \hfill (continued)  \\
    \midrule
\endhead
%    \midrule
%\multicolumn{3}{r}{\footnotesize\textit{continue on the next page}}
%\endfoot
%    \bottomrule
%\endlastfoot
\alpha      & --                    & Factor to convert from wind velocity
                                      to shear velocity.                        \\
\beta       & --                    & Ratio between drag coefficients
                                      of bare surface and roughness elements.   \\
\theta_u    & --                    & Wind direction.                           \\
\Gamma      & --                    & Implicitness parameter.                   \\
\gamma      & --                    & Maximum wave height over depth ratio.     \\
\zeta       & --                    & Bed interaction factor.                   \\
\eta        & m+MSL                 & Still water level.                        \\
\hat{\eta}  & m+MSL                 & Local water level.                        \\
\kappa      & --                    & Von K{\'a}rm{\'a}n constant.              \\
\lambda     & --                    & Roughness density.                        \\
\xi         & --                    & Surf similarity parameter.                \\
\rho_{\mathrm{a}}   & \si{kg/m^3}   & Air density.                              \\
\rho_{\mathrm{p}}   & \si{kg/m^3}   & Grain density.                            \\
\rho_{\mathrm{w}}   & \si{kg/m^3}   & Water density.                            \\
\sigma      & --                    & Ratio between surface area and frontal
                                      area of roughness elements.               \\
\Phi        & \si{kg/m/s}           & Space-integrated entrainment function.    \\
\phi        & \si{kg/m^2/s}         & Entrainment function.                     \\
\Psi        & \si{kg/s}             & Sediment transport potential.             \\
  \end{longtable}
}
\end{document}

以上编译姆韦我没有遇到任何错误、警告和坏框。

在此处输入图片描述

相关内容