GeneralAny way to get floats ontop of page?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
SwedeNiklas
Posts: 2
Joined: Wed Oct 31, 2007 1:03 am

Any way to get floats ontop of page?

Post by SwedeNiklas »

Is there a way to make a float object appear at the top of an empty page? I have tried alot of combinations of \vfill \eject \clearpage \newpage without any success.

I have found many topics trying to solve the same problem but I havent found any real solution. I'm ok with the fact that float objects gets flushed downwards but why must they appear at the center of a page? I don't like the layout that way.

This has already been too time consuming, please help!

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Any way to get floats ontop of page?

Post by localghost »

Try filling the space between a float and a fixed blank space represented by the tilde.

Code: Select all

\begin{figure}[!ht]
  …
\end[figure}

\vfill
~
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Any way to get floats ontop of page?

Post by gmedina »

Please post a minimal working example showing how you include the floating objects that appear not at the top nor at the bottom of the page.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
SwedeNiklas
Posts: 2
Joined: Wed Oct 31, 2007 1:03 am

Re: Any way to get floats ontop of page?

Post by SwedeNiklas »

I created a minimal working example to post here but while editing my .tex file the problem disappeared. I guess this is a strategy I'm going to use in the future when a problem needs to be solved.

My solution: (the tilde, ~, advice wasn't needed this time but may be in the future)

I moved the \begin{figure}[!th] part to the page were latex thought it should be placed and added a \clearpage before it and a \newpage after it. I guess this way there isn't a problem with the float object as it fits the way I want it to.

This is perhaps not the nicest solution and I imagine that the problem will bother me again in a not so distand future.

This is my first contact with this community, I'm very thankful for your rapid response, thanks alot.
Post Reply