长表后插入不需要的空白页

长表后插入不需要的空白页

我正在完成一份科学报告,并有一个很长的风险评估。我使用 longtable 环境将表格放在 2 页以上。然而,在表格的末尾,表格恰好放在第二页,在下一部分开始之前,有一个不需要的空白页。以下是一个例子:

 \documentclass[12pt, a4paper]{article}

\usepackage{graphicx}
\graphicspath{  {images/}   }
\usepackage[export]{adjustbox}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{dirtytalk}
\usepackage{csvsimple}
\usepackage{tabularx}
\usepackage{float}
\usepackage{hanging}
\usepackage[version=4]{mhchem}
\usepackage{longtable}
\usepackage{hyperref}
\hypersetup{
    colorlinks=true,
    linkcolor=black,
    filecolor=magenta,      
    urlcolor=cyan,
}

\urlstyle{same}

\title{Depth Study: Assessing the compliance of generic aspirin with Active Pharmaceutical Ingredient requirements}

\author{Theo Last}

\begin{document}
\sloppy
\maketitle

\pagebreak

\tableofcontents

\pagebreak

\section{Introduction}

\subsection{Aim}
This investigation aims to assess, via titration, how much the measured concentration of acetylsalicylic acid (aspirin) in a low cost Black and Gold aspirin tablet differs from the concentration stated by the manufacturer. Specifically, it aims to determine whether this difference is within the acceptable range stated by the British Pharmacopoeia. 

\pagebreak

\section{Risk Assessment}
\begin{longtable}{|p{3.5cm}|p{4cm}|p{4.5cm}|}
    \caption{Risks, Hazards and Precautions}
    \\
    \hline
    \textbf{Risk} & \textbf{Hazard} & \textbf{Precaution} \\
    \hline   
    Broken or chipped glassware & Cuts to skin  & Inspect glassware thoroughly for damage before use; Do not use if broken or chipped; Sweep up all breakages with dustpan and brush \\
    \hline
    Electronic balance & Electrical injury  & Do not use near water; Only use rated appliances – check test and tag date;  \\
    \hline                                                                                                                                               
    Hot plate & May cause burns; electrical injury & Allow to cool before touching; Treat burns immediately by placing in cool running water for at least 5 minutes; Same precautions as electronic balance for electrical injury \\
    \hline
    Heated solutions & Scalding  & Do not use laboratory stool when heating; Do not leave solutions unattended on hot plate; do not stopper any flasks containing boiling liquids; Treat burns immediately by placing in cool running water for at least 5 minutes \\
    \hline
    Hydrochloric Acid (\ce{HCl}) & Eye, skin and lung irritant & Do not use lab stool while handling; Wear safety glasses; Rinse skin in event of contact; Use in a well ventilated space; Use low concentrations and/or amounts as appropriate ;Wash hands thoroughly after use\\
    \hline
    Sodium Hydroxide (\ce{NaOH}) & Eye and skin  irritant & Do not use lab stool while handling; Wear safety glasses; Rinse skin in event of contact; Use in a well ventilated space; Use low concentrations and/or amounts as appropriate; Wash hands thoroughly after use\\
    \hline
    Aspirin (\ce{C9H8O4}) & Powder may irritate skin, eyes, lungs; It is a pharmaceutical drug and hence can be dangerous to consume large quantities & Wear safety glasses; Rinse skin in event of contact; Use in a well ventilated space; Avoid ingestion by washing hands thoroughly after use \\
    \hline
    Phenolphthalein (\ce{C20H14O4}) & Eye, skin and lung irritant & Wear safety glasses; Rinse skin in event of contact; Use in a well ventilated space; Use low concentrations and/or amounts as appropriate; Wash hands thoroughly after use\\
    \hline
    Mortar and Pestle & Heavy - blunt force trauma & Wear enclosed shoes; Keep apparatus away from edge of bench \\
    \hline
\end{longtable} 

\section{Experiment}

\subsection{Materials}
\begin{table}[H]
    \centering
    \caption{Apparatus and Justifications}

    \begin{tabular}{|p{3cm}|p{6cm}|}
        \hline
        \textbf{Apparatus}             & \textbf{Justification}                                                                \\ \hline
        Electronic balance             & To accurately measure mass of aspirin                                         \\ \hline
        Mortar and pestle              & To powder aspirin tablets                                                             \\ \hline
        Hot plate                      & To heat aspirin/\ce{NaOH} solution and ensure completion                              \\ \hline
        Conical flasks                 & To provide a reaction vessel for the titration and for the aspirin/\ce{NaOH} solution \\ \hline
        Black and Gold aspirin tablets & To test for compliance with pharmacopoeial standards (analyte)                                  \\ \hline
        Pipette/Pipette Filler         & To transfer aliquots of various solutions                                             \\ \hline
        Phenolphthalein indicator      & To indicate the endpoint of the back titration                          \\ \hline
        Burette                        & To controllably and precisely add \ce{HCl} solution in titrations                     \\ \hline
        Deionised water                & To rinse receiving vessels; To perform dilutions                                      \\ \hline
        Spatula                        & To transfer powdered aspirin                                                          \\ \hline
        Weighboat                      & To facilitate the weighing of powdered aspirin                                        \\ \hline
        Retort Stand                   & To hold burette                                                                       \\ \hline
        Burette clamp                  & To hold burette                                                                       \\ \hline
        Funnel                         & To add \ce{HCl} solution to burette                                                   \\ \hline
        Standardised \ce{HCl} solution (see appendices)             & To test concentration as a titrant                                                    \\ \hline
        Standardised \ce{NaOH} solution (see appendices)           & To react with aspirin                                                                 \\ \hline
        Measuring cylinder  & To add approximate volumes when high precision is not required                                                             \\ \hline
    \end{tabular}
\end{table}
\end{document}

很抱歉,我无法创建一个更简单的示例。如果您能提供任何关于如何纠正此问题的想法,我将不胜感激。

答案1

这里的问题是不是 longtable,它是以下tabletabular

这个表格实在太长了,无法与章节和小节一起放在一页上(添加\usepackage{showframe}您的序言来证明,它可视化了打字区域和边距。

现在只需改变行

    \begin{tabular}{|p{3cm}|p{6cm}|}

    \begin{tabular}{|p{3cm}|p{8cm}|} % <================================ p{6cm}

longtable然后你就可以摆脱那个空白页了,tabular因为现在表格更短了,因为行中有更多的空间来设置文本......

请参阅减少的 mwe:

\documentclass[12pt, a4paper]{article}

\usepackage{showframe}

\usepackage{tabularx}
\usepackage{float}

 \usepackage[version=4]{mhchem}
\usepackage{longtable}

\usepackage{hyperref}
\hypersetup{
    colorlinks=true,
    linkcolor=black,
    filecolor=magenta,      
    urlcolor=cyan,
}

\urlstyle{same}

\title{Depth Study: Assessing the compliance of generic aspirin with Active Pharmaceutical Ingredient requirements}

\author{Theo Last}


\begin{document}
\sloppy
\maketitle

\pagebreak

\tableofcontents

\pagebreak

\section{Introduction}

\subsection{Aim}
This investigation aims to assess, via titration, how much the measured concentration of acetylsalicylic acid (aspirin) in a low cost Black and Gold aspirin tablet differs from the concentration stated by the manufacturer. Specifically, it aims to determine whether this difference is within the acceptable range stated by the British Pharmacopoeia. 

\pagebreak

\section{Risk Assessment}
\begin{longtable}{|p{3.5cm}|p{4cm}|p{4.5cm}|}
    \caption{Risks, Hazards and Precautions}\\
    \hline
    \textbf{Risk} & \textbf{Hazard} & \textbf{Precaution} \\
    \hline   
    Broken or chipped glassware & Cuts to skin  & Inspect glassware thoroughly for damage before use; Do not use if broken or chipped; Sweep up all breakages with dustpan and brush \\
    \hline
    Electronic balance & Electrical injury  & Do not use near water; Only use rated appliances – check test and tag date;  \\
    \hline
    Hot plate & May cause burns; electrical injury & Allow to cool before touching; Treat burns immediately by placing in cool running water for at least 5 minutes; Same precautions as electronic balance for electrical injury \\
    \hline
    Heated solutions & Scalding  & Do not use laboratory stool when heating; Do not leave solutions unattended on hot plate; do not stopper any flasks containing boiling liquids; Treat burns immediately by placing in cool running water for at least 5 minutes \\
    \hline
    Hydrochloric Acid (\ce{HCl}) & Eye, skin and lung irritant & Do not use lab stool while handling; Wear safety glasses; Rinse skin in event of contact; Use in a well ventilated space; Use low concentrations and/or amounts as appropriate ;Wash hands thoroughly after use\\
    \hline
    Sodium Hydroxide (\ce{NaOH}) & Eye and skin  irritant & Do not use lab stool while handling; Wear safety glasses; Rinse skin in event of contact; Use in a well ventilated space; Use low concentrations and/or amounts as appropriate; Wash hands thoroughly after use\\
    \hline
    Aspirin (\ce{C9H8O4}) & Powder may irritate skin, eyes, lungs; It is a pharmaceutical drug and hence can be dangerous to consume large quantities & Wear safety glasses; Rinse skin in event of contact; Use in a well ventilated space; Avoid ingestion by washing hands thoroughly after use \\
    \hline
    Phenolphthalein (\ce{C20H14O4}) & Eye, skin and lung irritant & Wear safety glasses; Rinse skin in event of contact; Use in a well ventilated space; Use low concentrations and/or amounts as appropriate; Wash hands thoroughly after use\\
    \hline
    Mortar and Pestle & Heavy - blunt force trauma & Wear enclosed shoes; Keep apparatus away from edge of bench \\
    \hline
\end{longtable} 

\section{Experiment}
\subsection{Materials}
\begin{table}[H]
    \centering
    \caption{Apparatus and Justifications}

    \begin{tabular}{|p{3cm}|p{8cm}|} % <================================ p{6cm}
        \hline
        \textbf{Apparatus}             & \textbf{Justification}                                                                \\ \hline
        Electronic balance             & To accurately measure mass of aspirin                                         \\ \hline
        Mortar and pestle              & To powder aspirin tablets                                                             \\ \hline
        Hot plate                      & To heat aspirin/\ce{NaOH} solution and ensure completion                              \\ \hline
        Conical flasks                 & To provide a reaction vessel for the titration and for the aspirin/\ce{NaOH} solution \\ \hline
        Black and Gold aspirin tablets & To test for compliance with pharmacopoeial standards (analyte)                                  \\ \hline
        Pipette/Pipette Filler         & To transfer aliquots of various solutions                                             \\ \hline
        Phenolphthalein indicator      & To indicate the endpoint of the back titration                          \\ \hline
        Burette                        & To controllably and precisely add \ce{HCl} solution in titrations                     \\ \hline
        Deionised water                & To rinse receiving vessels; To perform dilutions                                      \\ \hline
        Spatula                        & To transfer powdered aspirin                                                          \\ \hline
        Weighboat                      & To facilitate the weighing of powdered aspirin                                        \\ \hline
        Retort Stand                   & To hold burette                                                                       \\ \hline
        Burette clamp                  & To hold burette                                                                       \\ \hline
        Funnel                         & To add \ce{HCl} solution to burette                                                   \\ \hline
        Standardised \ce{HCl} solution (see appendices)             & To test concentration as a titrant                                                    \\ \hline
        Standardised \ce{NaOH} solution (see appendices)           & To react with aspirin                                                                 \\ \hline
        Measuring cylinder  & To add approximate volumes when high precision is not required                                                             \\ \hline
    \end{tabular}
\end{table}

\end{document}

以及生成的pdf:

生成的 pdf

相关内容