1

So I have this code where my first table keeps going to the second page and I actually want it to stay on the first page since there is enough space for it and the gap looks weird. Any idea how to fix this and why it keeps jumping down even though there should be enough space for it on the front page? Code:

\documentclass[12pt, fullpage, oneside]{article}
\usepackage[utf8]{inputenc}
\addtolength{\oddsidemargin}{-.875in}
    \addtolength{\evensidemargin}{-.875in}
    \addtolength{\textwidth}{1.75in}
\addtolength{\topmargin}{-1.7in}
\addtolength{\textheight}{3in}

\title{Assignment 1} \author{Anonymous)} \date{September 2021}

\begin{document} \maketitle

\section{Goal definition} \subsection*{Assignment A}

The purpose of the LCA is to identify any hot spots or flaws in the manufacturing stage and/or use stage of a vacuum cleaner made by large Danish manufacturer company of electric products. The intended use of the LCA is therefore to improve new vacuum cleaners. One intended user of the LCA is therefore the department that develop the product and they can then use the LCA to improve their product.

\subsection*{Assignment B}

As clarified in the first assignment the LCA was made so that changes and improvements could be made. A vacuum cleaner is a fairly small product with a very specific use so the change in its manufacturing processes and thereby environmental impact is not going to have big consequences on a large scale. Therefore the decision context must be situation A "Micro level decision support".

\begin{table}\def\arraystretch{1.5} \section{Scope definition}\subsection{Assignment C}\subsubsection{Chest freezer} \begin{tabular}{|c|c|}

\hline\textbf{Obligatory properties}&\textbf{Positioning properties}\ \hline Function as a container for food & Has light when lid is opened \ \hline Be able to freeze food & Electronic display showing temperature and more \ \hline Keep same temperature & Classical music when opened\ \hline Seal tight = No leaking & Wheels\ \hline Can be opened & Cheap\ \hline Not affect the temperature around it & Efficient \ \hline \end{tabular} \caption{This table shows the obligatory properties and positioning properties of a chest freezer} \end{table}

\begin{table} \subsubsection*{Packaging of beer bottles}

\centering \def\arraystretch{1.5} \begin{tabular}{|c|c|} \hline \textbf{Obligatory properties}&\textbf{Positioning properties}\ \hline Container for beer & Ergonomic handles for comfortable lifting \ \hline Segments for each bottle so they do not tilt & Wheels \ \hline Handles & Recyclable\ \hline Sturdy material & Green colour\ \hline

\end{tabular} \caption{This table shows the obligatory properties and positioning properties of a packaging of beer bottles} \end{table}

\end{document}

Mensch
  • 65,388

1 Answers1

2

Whatever else you do, do not place sectioning commands such as \subsection and \subsubsection inside a table or figure environment. Never. No exceptions. No way, no how.

After placing these commands outside of the floats, I suggest you change \begin{table} to \begin{table}[htbp].

The following screenshot shows the bottom of page 1 and the top of page 2 of the test document. Observe the use of \clearpage before \subsubsection*{Packaging of beer bottles}.

enter image description here

\documentclass[12pt,oneside]{article}
\usepackage[utf8]{inputenc}
\usepackage[textwidth=7.25in,textheight=10.5in]{geometry}
\title{Assignment 1}
\author{Anonymous}
\date{September 2021}

\begin{document} \maketitle

\section{Goal definition} \subsection*{Assignment A}

The purpose of the LCA is to identify any hot spots or flaws in the manufacturing stage and/or use stage of a vacuum cleaner made by large Danish manufacturer company of electric products. The intended use of the LCA is therefore to improve new vacuum cleaners. One intended user of the LCA is therefore the department that develop the product and they can then use the LCA to improve their product.

\subsection*{Assignment B} As clarified in the first assignment the LCA was made so that changes and improvements could be made. A vacuum cleaner is a fairly small product with a very specific use so the change in its manufacturing processes and thereby environmental impact is not going to have big consequences on a large scale. Therefore the decision context must be situation A "Micro level decision support".

\section{Scope definition} \subsection{Assignment C} \subsubsection{Chest freezer}

\begin{table}[htbp] % <-- note insertion of '[htbp]' \def\arraystretch{1.5} \centering \begin{tabular}{|c|c|} \hline \textbf{Obligatory properties}&\textbf{Positioning properties}\ \hline Function as a container for food & Has light when lid is opened \ \hline Be able to freeze food & Electronic display showing temperature and more \ \hline Keep same temperature & Classical music when opened\ \hline Seal tight = No leaking & Wheels\ \hline Can be opened & Cheap\ \hline Not affect the temperature around it & Efficient \ \hline \end{tabular} \caption{This table shows the obligatory properties and positioning properties of a chest freezer} \end{table}

\clearpage \subsubsection*{Packaging of beer bottles}

\begin{table}[htbp] % <-- note insertion of '[htbp]' \def\arraystretch{1.5} \centering \begin{tabular}{|c|c|} \hline \textbf{Obligatory properties}&\textbf{Positioning properties}\ \hline Container for beer & Ergonomic handles for comfortable lifting \ \hline Segments for each bottle so they do not tilt & Wheels \ \hline Handles & Recyclable\ \hline Sturdy material & Green colour\ \hline \end{tabular} \caption{This table shows the obligatory properties and positioning properties of a packaging of beer bottles} \end{table}

\end{document}

Mico
  • 506,678