線上偵測到未滿的 \vbox(壞度 10000)

線上偵測到未滿的 \vbox(壞度 10000)

我有一個不太複雜的表,如下所示,但我總是收到錯誤“在第 127 行檢測到 Underfull \vbox (badness 10000)”,希望您可以重現它。有人知道原因以及如何解決嗎?這只是一個例子,我可能在一個文件中有大約 100 個表,我想在一開始就修復它。

\documentclass{article}
\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\usepackage{geometry}
\usepackage[parfill]{parskip}  
\geometry{letterpaper} 
\usepackage{graphicx}   
\usepackage{longtable}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{colortbl, xcolor}
\usepackage{amssymb}
\usepackage{enumitem}
\usepackage{float}
\usepackage{color}
\usepackage{multirow}
\usepackage{epstopdf}
   \hfuzz=\maxdimen
   \tolerance=10000
   \hbadness=10000


\begin{document}
\begin{longtable}{rL{2cm}L{3.5cm}L{2cm}L{4cm}L{1.8cm}}
  \hline
 & Variable & Description & Type & Values & Missing \\ 
  \hline
1 & sid & child id & string &  &  \\ 
   \rowcolor[gray]{0.8}2 & specnum & specimen number  & string &  &  \\ 
  3 & specseq & specimen sequence & string &  &  \\ 
   \rowcolor[gray]{0.8}4 & spectype & specimen type  & string &  &  \\ 
  5 & vstnum & visit number & integer &  &  \\ 
   \rowcolor[gray]{0.8}6 & vstwk & visit week & string &  &  \\ 
  7 & vstdetail & visit details  & string &  &  \\ 
   \rowcolor[gray]{0.8}8 & lps & α lps gmu/ml (endocab) & integer &  -9= missing & -9 \\ 
  9 & rept & do you need to repeat sample? & categorical & 1 = yes, 2 = no &  \\ 
   \rowcolor[gray]{0.8}10 & resn & reason for repeating & categorical & 3=sample out of range, 4 = assay failed, -9 = not applicable & -9 \\ 
  11 & comnt & comment & string &  &  \\ 
   \rowcolor[gray]{0.8}12 & specdt & date of specimen collection dd/mm/yy & date &  & 1999-09-09 \\ 
  13 & assydt & date assay performed dd/mm/yy & date &  & 1999-09-09 \\ 
   \rowcolor[gray]{0.8}14 & dedt & date entered & date &  & 1999-09-09 \\ 
  15 & qcdt & date checked & date &  & 1999-09-09 \\ 
   \rowcolor[gray]{0.8}16 & batch & assay batch \# & integer &  &  \\ 
  17 & version & batch version & string &  &  \\ 
   \rowcolor[gray]{0.8} \hline
\hline
\end{longtable}
\end{document}

答案1

未滿框警告只是警告,而不是錯誤。

\documentclass[landscape]{article}



\usepackage{longtable}

\addtolength\textwidth{120pt}


\usepackage[T1]{fontenc}


\usepackage{array}

\showoutput
\newcolumntype{L}[1]{>{\raggedright\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash\hspace{0pt}}m{#1}}



\begin{document}

\begin{longtable}{rL{2cm}L{3.5cm}L{2cm}L{4cm}L{1.8cm}}
\hline
1 & sid & child id & string &  &  
\end{longtable}


\end{document}

上圖顯示未滿的框框是一個空行,試圖將基線跳高,但僅包含來自 的 0.4pt 高規則\hline

這顯然是 longtable 包的一個未記錄的功能。我會責怪這個包的作者。

答案2

根據 David Carlisle 的範例,將頂部/底部線設為頭/腳可以避免未滿警告:

\begin{longtable}{rL{2cm}L{3.5cm}L{2cm}L{4cm}L{1.8cm}}
\hline
\endhead
\hline
\endfoot
1 & sid & child id & string &  &  
\end{longtable}

就我而言,很奇怪的是,我將精確的表匯入到四個文件中,但只有一個產生了未滿訊息。必須與表格如何與周圍(每個文件中不同)文字填充頁面有關。

相關內容