开始第二页后格式奇怪

开始第二页后格式奇怪

我在一个文档中有一些表格。如果表格中的内容适合一页,则行距和表格排列正常。但是,如果内容较长,则两个表格会交换位置,其他行之间的间距会变宽。

请在此处检查代码https://github.com/kychanbp/HSF-Forms-Generation

在模板-->表格b下。

普通的一页文档 普通的一页文档

两页文档:表格顺序已更改。有时间距也会更改。

餐桌顺序错误

我该如何修复它?

答案1

您正在使用table具有浮动功能的环境。如果表格不适合剩余的空闲页面,它就会浮动到下一页。

为了避免这种情况,只需这样做不是使用table

如果表格长度超过一页,请记得手动将其分成两部分...

为了使文档的行间间距相同,请\raggedbottom在序言中添加命令。

因此,有了以下完整的 MWE(请参阅标记<======以了解重要的代码更改):

\documentclass[11pt]{book}

\usepackage[%
  a4paper,
  top=25mm,
  bottom=10mm,
  left=32mm,
  right=32mm,
  marginparwidth=1.75cm,
  showframe % <============================ to visualize the typing area and margins
]{geometry}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[english]{babel}
\usepackage{soul}
%\usepackage{epsfig} % <=======================================================
\usepackage{epstopdf}
\epstopdfsetup{update}
\usepackage[demo]{graphicx}
\usepackage{float}
\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}m{#1}}

\usepackage{amsmath,amssymb,amstext}

\usepackage{titlesec}
\setcounter{secnumdepth}{0}
\titleformat{\section}
{\normalfont\fontsize{11pt}{12pt}\selectfont
\bfseries\filright}{}{0em}{}
%
\titlespacing{\section}
{0pc}{*3.2}{*1.0}[0pc]

\titleformat{\subsection}
{\normalfont\fontsize{11pt}{12pt}\selectfont
\bfseries\filright}{}{0.5em}{}
%
\titlespacing{\subsection}
{0pc}{*3.2}{*0.2}[0pc]

\usepackage{pifont}
\newcommand{\cmark}{\ding{51}}%
\newcommand{\xmark}{\ding{55}}
\usepackage{makecell}
\usepackage{arydshln}
\usepackage{enumitem}
\setlist[itemize]{%
  labelindent=*, 
  leftmargin=*, 
  itemsep=-3pt,
  label={\makebox[0pt][l]{$\square$}\raisebox{.15ex}{\hspace{0.1em}$\checkmark$}}%
}

\newcommand{\nocheck}{\mbox{\makebox[0pt][l]{$\square$}\raisebox{.15ex}{\hspace{0.1em}{$\phantom{\checkmark}$}}}}
\parindent=0mm
\pagestyle{empty}

\raggedbottom % <=======================================================
%\flushbottom


\begin{document}

Form B

\section{Expansion of Hong Kong International Airport into a Three-Runway System}

Marine Travel Routes and Management Plan for High Speed Ferries of SkyPier

\subsection{\ul{Case Audit and Checking Record}}

{\renewcommand{\arraystretch}{1.4}
%\begin{table}[htb] % <=======================================================
\fontsize{11pt}{15pt}\selectfont
\begin{tabular}{|>{\raggedright}p{38mm}|
p{99mm}<{\raggedright}|}\hline
%%%
Reference Plan: & Marine Travel Routes and Management Plan for High Speed Ferries of SkyPier (The Plan) (EP Condition 2.10)
\\ \hline
Monitoring Data: & Ferry movement data collected in the period between
\newline
\ul{4 October 2017 to 5 October 2017}
\\[1.0mm]\hline
Information and Data Checked: &
\begin{minipage}[t]{110mm}
\begin{itemize}
\item Automatic Identification System (AIS)
\item Data Daily SkyPier HSF movements
  \item Record of potential deviations
\item Response provided by the ferry operators
\end{itemize}\vspace*{-1.5ex}
\end{minipage}
\\\hline
Case No: & \textit{SPNC-874}
\\ \hline
Date: & \textit{4 October 2017}
\\ \hline
Ferry Details: & Ferry Number: 3A167
\newline Average Speed: 13.5 knots\newline Range of Instantaneous Speed: 13 -- 14 knots\newline Duration of Instantaneous Speeding: 2
\\ \hline
Comments and Observations \newline From ET: & Insufficient AIS data was recorded. The AIS signals could not be received which might due to interference effect. Based on available AIS data, the speed and route of vessel could not be analyzed whether it had any deviation within the Speed Control Zone (SCZ). Vessel captain has provided the AIS plots which indicated the vessel entered the SCZ though the gate access point and no speeding in the SCZ was observed. Ferry operator should investigate the reason for the AIS failure and check the AIS system to ensure that sufficient data points can be received. \\ \hline
Comments and Observations\newline From IEC Marine Advisor: & FUXk
\\ \hline
Reason(s) valid\\ according to \\ The Plan? &
\begin{minipage}[t]{95mm}
\begin{itemize}
\item Yes (case closed)
\item[\nocheck] No (The ET to confirm with AA MCDD on the required follow up actions)
\end{itemize}\vspace*{-1.5ex}
\end{minipage}
\\\hline
\end{tabular}
%\end{table} % <=======================================================
}


{\fontsize{10pt}{12pt}\selectfont
\begin{tabular}{:L{23mm}:L{35mm}:L{35mm}:L{35mm}:}
\hdashline
\Gape[14pt]{}& \makecell[l]{ET Leader /\\[2mm]
ET's Representative} &
\makecell[l]{IEC/ \\[2mm]
IEC's Representative} &
\makecell[l]{PM /\\[2mm]
PM's Representative} \\ \hline
Signature &\includegraphics[scale=1.0]{sig1.pdf}
&  &  \\ \hdashline
Name & Terence Kong &  &
\Gape[10pt]{}
\\\hdashline
\end{tabular}
}


\end{document}

你得到:

第一页

和:

第二页

相关内容