GeneralWhite space above figures

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
dmt
Posts: 82
Joined: Sat Mar 15, 2008 8:13 pm

White space above figures

Post by dmt »

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?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

balf
Posts: 158
Joined: Sat Jan 12, 2008 1:11 am

Re: White space above figures

Post by balf »

Did you use the following parameters for your figure?
\begin{figure}[!ht]
...
\end{figure}

\centering centers on the line only.

B.A.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

White space above figures

Post by localghost »

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).
[…]
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.


Best regards
Thorsten¹
dmt
Posts: 82
Joined: Sat Mar 15, 2008 8:13 pm

White space above figures

Post by dmt »

MWE:

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}
And I tried with [!ht] instead of [ht] and it made no difference.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

White space above figures

Post by Stefan Kottwitz »

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
dmt
Posts: 82
Joined: Sat Mar 15, 2008 8:13 pm

Re: White space above figures

Post by dmt »

Thanks, that page was great. Exactly what I needed.
Post Reply