My figure ended up on a new page by itself, but for some reason there is a lot of white space above it.
Is there some way to fix this? I am using the \centering command, which I assumed only centers horizontally, but maybe in this case it is centering vertically as well? The figure looks like it is either centered vertically also or maybe aligned bottom even though I gave the option t before b for alignment ( I would prefer top in this case).
Is there some way I can control the white space above the figure?
General ⇒ White space above figures
NEW: TikZ book now 40% off at Amazon.com for a short time.
Re: White space above figures
Did you use the following parameters for your figure?
\begin{figure}[!ht]
...
\end{figure}
\centering centers on the line only.
B.A.
\begin{figure}[!ht]
...
\end{figure}
\centering centers on the line only.
B.A.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
White space above figures
A minimal working example (MWE) would do a better job than this fuzzy description. It would let us see better what's going wrong and we may do some corrections to the provided code.dmt wrote:[…] I am using the \centering command, which I assumed only centers horizontally, but maybe in this case it is centering vertically as well? The figure looks like it is either centered vertically also or maybe aligned bottom even though I gave the option t before b for alignment ( I would prefer top in this case).
[…]
Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
White space above figures
MWE:
And I tried with [!ht] instead of [ht] and it made no difference.
Code: Select all
\begin{figure}[ht]
\centering
\includegraphics[trim=1cm 1.5cm 3cm 1.3cm, clip=true]{newclock}
\caption{Klockan från problem \ref{clock}}
\includegraphics{newclock12-1}
\caption{Första 3 trianglar från problem \ref{clock}}
\end{figure}
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
White space above figures
Hi dmt,
this may help: Vertical layout of float pages from the UK TeX FAQ.
Your code snipped ist not a complete minimal working example, because ist is not working. Just look at Thorsten's link above for a description of mwe. Even if my hint is working, for the next time.
Stefan
this may help: Vertical layout of float pages from the UK TeX FAQ.
Your code snipped ist not a complete minimal working example, because ist is not working. Just look at Thorsten's link above for a description of mwe. Even if my hint is working, for the next time.

Stefan
Re: White space above figures
Thanks, that page was great. Exactly what I needed.