Graphics, Figures & TablesExtra control of figure placement

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
charvey1
Posts: 7
Joined: Wed Nov 04, 2009 12:08 pm

Extra control of figure placement

Post by charvey1 »

Hi everyone,

I'm writing my PhD thesis and have been happy just to dump most of my figures at the top of their respective pages. However, my advisor really does *not* like it if that means the figure appears outside of the subsection where it is referenced.

For example, if this were a snippet of my code...

Code: Select all

\subsection{Springs}
Text about springs, see Figure \ref{fig1}.

\begin{figure}[tbp]
\includegraphics{.....}
\caption{My spring}
\label{fig1}
\end{figure}
...then LaTex might, depending on the circumstances, place the figure above the subsection heading. My advisor gets quite annoyed about this 'poor presentation' (which riles me since I consider LaTeX typeset documents to be the pinnacle of good presentation).

I guess I could just change the placement to [h!] or put it at the bottom of the page, but when I'm shuffling around subsections and restructuring bits of the document, it may no longer need to go anywhere else but the top of the page.

Is there an 'automatic' way to always have the figure at the top of the page, unless that would put it outside of its subsection, in which case I'd like it at the bottom of the page? And if it's still outside of its subsection, could I then make the figure placement [h!]?

Apologies if this has already been asked. As you can see, it's my first post on this forum, and that's usually because most questions have been asked before and can be found with the answers somewhere using Google! However, I can't find the solution to this one.

Cheers very much,

Chris

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

Extra control of figure placement

Post by localghost »

For future requests please always build a minimal working example (MWE). For now start with another combination of placement parameters.

Code: Select all

\begin{figure}[!ht]
  % figure contents
\end{figure}

Best regards and welcome to the board
Thorsten¹
Post Reply