将 MS Words 表格转换为 LaTeX 时,总是会出现 Overfull \hbox 2308.26472 太宽警告

将 MS Words 表格转换为 LaTeX 时,总是会出现 Overfull \hbox 2308.26472 太宽警告

我正在用经典论文样式模板撰写我的学士论文。我的论文有很多又大又长的用例表。我先在 MS Word 上制作表格,然后使用 latex-tables.com 生成器将其转换为 LaTeX。但表格结果对于我的页面来说太宽,导致出现 \hbox 2308.26472 过满警告。我认为这是因为单元格内容没有像我的 Word 表格那样拆分为多行。我对 LaTeX 真的很陌生,曾尝试在这里搜索不同的答案,但我仍然找不到它。

以下是代码片段:

\documentclass{paper}
\begin{document}
\frenchspacing
\raggedbottom


 \usepackage{multirow}
 \usepackage{colortbl}


\begin{table}
\centering
\arrayrulecolor{black}
\begin{tabular}{!{\color{black}\vrule}l!{\color{black}\vrule}l!{\color{black}\vrule}l!{\color{black}\vrule}} 
\hline
\multicolumn{2}{!{\color{black}\vrule}l!{\color{black}\vrule}}{Use Case Title}              & Vessel Arrival Times Prediction                                                                                                                                                                                                                                                                                                                                                                                                                                                                \\ 
\hline
\multicolumn{2}{!{\color{black}\vrule}l!{\color{black}\vrule}}{Use Case Description}        & The shipping vessel arrival times can be accurately predicted by analyzing several relevant variables ranging from the ship’s data to weather and tidal condition at the area of the terminal. The terminal can then detect delay in real-time and efficiently plan the terminal operation according to the prediction.                                                                                                                                                                        \\ 
\hline
\multirow{6}{*}{Big Data Characteristics} & Data Source                                     & AIS Data: Ship type, length, width, draught, speed, heading, port of destination. VTS data: radar, traffic signals, video surveillance, radio communication system. Sensors: weather, tidal, temperature.                                                                                                                                                                                                                                                                                      \\ 
\cline{2-3}
                                          & Volume                                          & To have a very precise prediction than a broad and large dataset is required.                                                                                                                                                                                                                                                                                                                                                                                                                  \\ 
\cline{2-3}
                                          & Velocity                                        & Depends on the data source. If it is an existing historical data like the ship type,~width, length, port of destination, then it can be batch loaded. If it is a data that need real-time processing like the data from sensors, GPS, and radar then the data need to be streamed.                                                                                                                                                                                                             \\ 
\cline{2-3}
                                          & Variety                                         & There are various data source in this use case so a data lake is required for data integration.                                                                                                                                                                                                                                                                                                                                                                                                \\ 
\cline{2-3}
                                          & Veracity and Data Quality                       & Any external data like the data from sensor needs data cleansing because the data quality is not enough to pipeline it direct to the model. The data from AIS needs to be decoded from its NMEA format first. Internal structured data from the terminal has good quality. This will of course need the existence of system that ensure good quality internal data. But to be sure the internal data should also pass a cleansing process even though it can skip some of the cleansing stage  \\ 
\cline{2-3}
                                          & Value                                           & The cargo container and ship data is highly valuable for the container terminal since it is also government data that need to be collected and safely kept for at least 10 years.                                                                                                                                                                                                                                                                                                              \\ 
\hline
\multirow{3}{*}{Big Data Science}         & Presentation and Implementation                 & A prediction of vessel arrival time and also a visualization of said ship movement pattern needs to be presented to the container terminal operator. In the event of bad weather and tidal condition around the quayside area, the system will then analyze and provide the terminal operator with the best prediction outcomes to save time and cost.                                                                                                                                         \\ 
\cline{2-3}
                                          & Data Types                                      & Existing historical data from internal system are structured data. Any external data like radar, GPS is unstructured data.                                                                                                                                                                                                                                                                                                                                                                     \\ 
\cline{2-3}
                                          & Data Analytics                                  & A predictive analytical model is required to accurately predict the vessel arrival times. A classification and regression tree model can be trained in order to make a precise prediction of the ship arrival. The model needs to also take various relevant variables and parameters into account and train themselves based on these parameters. A modified framework of case based reasoning could be utilized to detect ship’s delay early by processing satellite AIS data in real-time.  \\ 
\hline
\multirow{3}{*}{Privacy and Security}     & Specific Personal Data (SPD) used               & No                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             \\ 
\cline{2-3}
                                          & Highly sensitive data used                      & Some of classified government data could be used in this Use Case                                                                                                                                                                                                                                                                                                                                                                                                                              \\ 
\cline{2-3}
                                          & Governance, Compliance and Audit                & Indonesia classify export and import by using the Harmonized System of nomenclature and codification of goods.                                                                                                                                                                                                                                                                                                                                                                                 \\ 
\hline
Organizational Requirements               & External Cooperation Partners                   & The manufacturer of the sensor and radar system. External data provider and external shipping company. Indonesia Directorate General of Customs excise for the custom inspection.                                                                                                                                                                                                                                                                                                              \\ 
\hline
\multicolumn{2}{!{\color{black}\vrule}l!{\color{black}\vrule}}{Other Big Data Challenges}   & Because there are so many input variables and parameter, it requires a long time to train the predictive model. The lack of reliable information and forecasting cause uncertainties and disruption on the terminal operation.                                                                                                                                                                                                                                                                 \\
\hline
\end{tabular}
\arrayrulecolor{black}
\end{table}

\end{document}

很抱歉问了这么一个基本的问题,因为我对 LaTex 表格制作还很陌生。还有一个我想问的问题是,我的 Word 表格有时需要两页才能显示,LaTeX 会自动将我的表格扩展到以下页面吗?

我衷心感谢你们的帮助和回答。

答案1

我将使用三个独立的table环境,有四个独立的表,按字幕分组。

\documentclass[
  openright,
  titlepage,
  numbers=noenddot,
  headinclude,
  %twoside,
  %1headlines,
  footinclude=true,
  cleardoublepage=empty,
  %abstractoff, % <--- obsolete, remove (todo)
  BCOR=5mm,
  paper=a4,
  fontsize=11pt
  ngerman,
  american,
]{scrbook}
\usepackage{babel}

\usepackage{tabularx,booktabs,caption}

\captionsetup[table]{position=top,belowskip=\bigskipamount}

\frenchspacing
\raggedbottom

\begin{document}

\mainmatter

\begin{table}[htp]

\caption[Vessel arrival times prediction.]{%
  Vessel arrival times prediction. 
  The shipping vessel arrival times can be accurately predicted by analyzing
  several relevant variables ranging from the ship’s data to weather and tidal
  condition at the area of the terminal. The terminal can then detect delay in
  real-time and efficiently plan the terminal operation according to the prediction.}

\begin{tabularx}{\textwidth}{
  @{}
  >{\raggedright\hsize=0.5\hsize}X
  >{\hsize=1.5\hsize}X
  @{}
}
\toprule
\multicolumn{2}{c}{\itshape Big Data Characteristics} \\
\midrule
Use Case Title & Vessel Arrival Times Prediction \\ 
\midrule
Data Source &
  AIS Data: Ship type, length, width, draught, speed, heading, port of destination. 
  VTS data: radar, traffic signals, video surveillance, radio communication system.
  Sensors: weather, tidal, temperature.
\\ 
\addlinespace
Volume &
  To have a very precise prediction than a broad and large dataset is required.
\\ 
\addlinespace
Velocity &
  Depends on the data source. If it is an existing historical data like the ship type,
  width, length, port of destination, then it can be batch loaded. If it is a data that
  need real-time processing like the data from sensors, GPS, and radar then the data
  need to be streamed.
\\ 
\addlinespace
Variety &
  There are various data source in this use case so a data lake is required for data 
  integration.
\\ 
\addlinespace
Veracity and Data Quality &
  Any external data like the data from sensor needs data cleansing because the data
  quality is not enough to pipeline it direct to the model. The data from AIS needs
  to be decoded from its NMEA format first. Internal structured data from the terminal
  has good quality. This will of course need the existence of system that ensure good
  quality internal data. But to be sure the internal data should also pass a cleansing
  process even though it can skip some of the cleansing stage
\\ 
\addlinespace
Value &
  The cargo container and ship data is highly valuable for the container terminal since
  it is also government data that need to be collected and safely kept for at least
  10~years.
\\ 
\bottomrule
\end{tabularx}

\end{table}

\begin{table}[htp]
\ContinuedFloat

\caption{Vessel arrival times prediction.}

\begin{tabularx}{\textwidth}{
  @{}
  >{\raggedright\hsize=0.5\hsize}X
  >{\hsize=1.5\hsize}X
  @{}
}
\toprule
\multicolumn{2}{c}{\itshape Big Data Science} \\
\midrule     
Use Case Title & Vessel Arrival Times Prediction \\
\midrule
Presentation and Implementation &
  A prediction of vessel arrival time and also a visualization of said ship movement
  pattern needs to be presented to the container terminal operator. In the event of
  bad weather and tidal condition around the quayside area, the system will then
  analyze and provide the terminal operator with the best prediction outcomes to save
  time and cost.
\\ 
\addlinespace
Data Types &
  Existing historical data from internal system are structured data. Any external data
  like radar, GPS is unstructured data.
\\ 
\addlinespace
Data Analytics &
  A predictive analytical model is required to accurately predict the vessel arrival
  times. A classification and regression tree model can be trained in order to make a
  precise prediction of the ship arrival. The model needs to also take various relevant
  variables and parameters into account and train themselves based on these parameters.
  A modified framework of case based reasoning could be utilized to detect ship’s delay
  early by processing satellite AIS data in real-time.
\\ 
\bottomrule
\end{tabularx}

\end{table}

\begin{table}[htp]
\ContinuedFloat

\caption{Vessel arrival times prediction.}

\begin{tabularx}{\textwidth}{
  @{}
  >{\raggedright\hsize=0.5\hsize}X
  >{\hsize=1.5\hsize}X
  @{}
}
\toprule
\multicolumn{2}{c}{\itshape Privacy and Security} \\
\midrule
Use Case Title & Vessel Arrival Times Prediction \\
\midrule
\addlinespace
Specific Personal Data (SPD) used  &
  No
\\ 
\addlinespace
Highly sensitive data used &
  Some of classified government data could be used in this Use Case
\\ 
\addlinespace
Governance, Compliance and Audit &
  Indonesia classify export and import by using the Harmonized System of nomenclature
  and codification of goods.
\\
\bottomrule
\end{tabularx}

\bigskip

\begin{tabularx}{\textwidth}{
  @{}
  >{\raggedright\hsize=0.5\hsize}X
  >{\hsize=1.5\hsize}X
  @{}
}
\toprule
\multicolumn{2}{c}{\itshape Organizational Requirements} \\
\midrule
Use Case Title & Vessel Arrival Times Prediction \\
\midrule
External Cooperation Partners &
  The manufacturer of the sensor and radar system. External data provider and external
  shipping company. Indonesia Directorate General of Customs excise for the custom inspection.
\\
\midrule
Other Big Data Challenges &
  Because there are so many input variables and parameter, it requires a long time
  to train the predictive model. The lack of reliable information and forecasting
  cause uncertainties and disruption on the terminal operation.
\\
\bottomrule
\end{tabularx}

\end{table}

\end{document}

在此处输入图片描述

答案2

如果您希望在一个表中显示所有信息,则可以使用landscape如下xltabular方法:

在此处输入图片描述

\documentclass{paper}

\frenchspacing
\raggedbottom
\usepackage{booktabs}
\usepackage{xltabular}
\usepackage{ragged2e}
\usepackage{pdflscape}

\begin{document}

\begin{landscape}
\begin{xltabular}{\linewidth}{>{\RaggedRight}p{2cm}>{\RaggedRight}p{3cm}X} 
\toprule
\multicolumn{2}{l}{Use Case Title}              & Vessel Arrival Times Prediction                                                                                                                                                                                                                                                                                                                                                                                                                                                                \\ 
\midrule
\multicolumn{2}{l}{Use Case Description}        & The shipping vessel arrival times can be accurately predicted by analyzing several relevant variables ranging from the ship’s data to weather and tidal condition at the area of the terminal. The terminal can then detect delay in real-time and efficiently plan the terminal operation according to the prediction.                                                                                                                                                                        \\ 
\midrule
Big Data Characteristics & Data Source                                     & AIS Data: Ship type, length, width, draught, speed, heading, port of destination. VTS data: radar, traffic signals, video surveillance, radio communication system. Sensors: weather, tidal, temperature.                                                                                                                                                                                                                                                                                      \\ 
\addlinespace
                                          & Volume                                          & To have a very precise prediction than a broad and large dataset is required.                                                                                                                                                                                                                                                                                                                                                                                                                  \\ 
\addlinespace
                                          & Velocity                                        & Depends on the data source. If it is an existing historical data like the ship type,~width, length, port of destination, then it can be batch loaded. If it is a data that need real-time processing like the data from sensors, GPS, and radar then the data need to be streamed.                                                                                                                                                                                                             \\ 
\addlinespace
                                          & Variety                                         & There are various data source in this use case so a data lake is required for data integration.                                                                                                                                                                                                                                                                                                                                                                                                \\ 
\addlinespace
                                          & Veracity and Data Quality                       & Any external data like the data from sensor needs data cleansing because the data quality is not enough to pipeline it direct to the model. The data from AIS needs to be decoded from its NMEA format first. Internal structured data from the terminal has good quality. This will of course need the existence of system that ensure good quality internal data. But to be sure the internal data should also pass a cleansing process even though it can skip some of the cleansing stage  \\ 
\addlinespace
                                          & Value                                           & The cargo container and ship data is highly valuable for the container terminal since it is also government data that need to be collected and safely kept for at least 10 years.                                                                                                                                                                                                                                                                                                              \\ 
\midrule
Big Data Science         & Presentation and Implementation                 & A prediction of vessel arrival time and also a visualization of said ship movement pattern needs to be presented to the container terminal operator. In the event of bad weather and tidal condition around the quayside area, the system will then analyze and provide the terminal operator with the best prediction outcomes to save time and cost.                                                                                                                                         \\ 
\addlinespace
                                          & Data Types                                      & Existing historical data from internal system are structured data. Any external data like radar, GPS is unstructured data.                                                                                                                                                                                                                                                                                                                                                                     \\ 
\addlinespace
                                          & Data Analytics                                  & A predictive analytical model is required to accurately predict the vessel arrival times. A classification and regression tree model can be trained in order to make a precise prediction of the ship arrival. The model needs to also take various relevant variables and parameters into account and train themselves based on these parameters. A modified framework of case based reasoning could be utilized to detect ship’s delay early by processing satellite AIS data in real-time.  \\ 
\midrule
Privacy and Security     & Specific Personal Data (SPD) used               & No                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             \\ 
\addlinespace
                                          & Highly sensitive data used                      & Some of classified government data could be used in this Use Case                                                                                                                                                                                                                                                                                                                                                                                                                              \\ 
\addlinespace
                                          & Governance, Compliance and Audit                & Indonesia classify export and import by using the Harmonized System of nomenclature and codification of goods.                                                                                                                                                                                                                                                                                                                                                                                 \\ 
\midrule
Organi\-zational Requirements               & External Cooperation Partners                   & The manufacturer of the sensor and radar system. External data provider and external shipping company. Indonesia Directorate General of Customs excise for the custom inspection.                                                                                                                                                                                                                                                                                                              \\ 
\midrule
\multicolumn{2}{l}{Other Big Data Challenges}   & Because there are so many input variables and parameter, it requires a long time to train the predictive model. The lack of reliable information and forecasting cause uncertainties and disruption on the terminal operation.                                                                                                                                                                                                                                                                 \\
\bottomrule
\end{xltabular}
\end{landscape}

\end{document}

相关内容