LaTeX forum ⇒ Page LayoutBig gap in at the end of the page - what am I doing wrong? Topic is solved

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
lukaszskowron96
Posts: 36
Joined: Tue Oct 09, 2018 1:01 pm

Big gap in at the end of the page - what am I doing wrong?

Postby lukaszskowron96 » Thu Feb 21, 2019 5:36 pm

Hi,

I encoutered this strange problem. For some reason LATEX decided to leave a big gap at the end of that page and I REALLY need to put this circled text into that gap as it distorts the layout of my next pages and ultimately almost whole document. Please, can you help me fix this?

latexforumbiggap.png
latexforumbiggap.png (48.29 KiB) Viewed 550 times


This is the part of code that generates those pages:

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \begin{table}[!ht]
  2. \begin{center}
  3. \centering
  4. \vspace{5mm}
  5. \begin{tabular}{|c|C{0.26\textwidth}|C{0.26\textwidth}|C{0.26\textwidth}|}
  6. \hline
  7. & \multirow{2}{*}{\(\frac{kB}{s_{um}}=0\)} & \multirow{2}{*}{\(\frac{kB}{s_{um}}=2\)} & \multirow{2}{*}{\(\frac{kB}{s_{um}}=5\)} \\
  8. & & & \\ \hline
  9. \(N_{P}=1\) &\begin{center} \includegraphics[width=0.26\textwidth]{placeholder3} \end{center} & \begin{center}\includegraphics[width=0.26\textwidth]{placeholder3}\end{center} & \begin{center}\includegraphics[width=0.26\textwidth]{placeholder3}\end{center}\\ \hline
  10. \(N_{P}=4\) & \begin{center}\includegraphics[width=0.26\textwidth]{placeholder3}\end{center} & \begin{center}\includegraphics[width=0.26\textwidth]{placeholder3}\end{center} & \begin{center}\includegraphics[width=0.26\textwidth]{placeholder3}\end{center}\\
  11. \hline
  12. \end{tabular}
  13. \end{center}
  14. \caption{\label{tab:table-name}Side views of failure mechanisms}
  15. \end{table}
  16. \subsection{3.5 Circular Foundations with Central Square Perforation}
  17. Another interesting case is a combination between two previous cases - a ring foundation with central square perforation.
  18. No signs of this foundation analyses have been found in the literature - one of the reasons why it has been decided to look at it. The basic notation for and maximal theoretical perforation ratio is as shown below. The imposed soil-foundation interface is rough.


Where I defined C as:

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}

lukaszskowron96
Posts: 36
Joined: Tue Oct 09, 2018 1:01 pm

Postby lukaszskowron96 » Thu Feb 21, 2019 5:39 pm

OK, I sorted this out... Just got rid of \vspace{5mm}. ;)

User avatar
Stefan Kottwitz
Site Admin
Posts: 9496
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Thu Feb 21, 2019 6:56 pm

You could remove further additional space by replacing \begin{center} ... \end{center} by a simple \centering command, within the table environment.

Stefan
Site admin

lukaszskowron96
Posts: 36
Joined: Tue Oct 09, 2018 1:01 pm

Postby lukaszskowron96 » Thu Feb 21, 2019 10:54 pm

Stefan,

It doesn't seem to work, where exactly I need to put /centering ?

User avatar
Stefan Kottwitz
Site Admin
Posts: 9496
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Thu Feb 21, 2019 11:33 pm

Directly after \begin{table}[!ht], so:

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \begin{table}[!ht]
  2. \centering
  3. \begin{tabular}{...}
  4. ...
  5. \end{tabular}
  6. \caption{...}
  7. \end{table}


The reason is, that \begin{center} … \end{center} is for "displayed" centered text, that comes with a whitespace before and after it. \centering does it without additional spacing. The effect of \centering is limited by the table environment anyway, so no \end is needed.

Stefan
Site admin


Return to “Page Layout”

Who is online

Users browsing this forum: No registered users and 8 guests