1

I am completing a scientific report, and have a long risk asessment. I have used the longtable environment to put the table over 2 pages. However, at the end of the table, which fits comfortably on its second page, there is an unwanted blank page, before the next section starts. Here is an example:

 \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}

My apologies that I could not create a more minimal example. Any ideas on how to rectify this issue would be greatly appreciated.

  • Welcome to TeX.SE! – Mensch Jun 23 at 2:32
1

The issue here is not longtable, it is the following table with tabular.

This table is simply too long to fit on one page together with section and subsection (add \usepackage{showframe} in your preamble to proof that, it visualizes the typing area and margins.

Now simply change the line

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

to

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

and you get rid of that blank page after longtable or better before tabular because now the table is shorter because the rows have more place to set the text ...

Please see the reduced 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}

and the resulting pdf:

resulting pdf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.