General ⇒ Remove space after figure and before text
Remove space after figure and before text
I have a figure in my latex paper (I am using IEEE tran package). After this figure there exists a space between the figure and the text. How can I reduce the size of this white space. To be specific the space is between the caption of the figure and the text of my paper. Any suggestions ?
Thanks
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
Remove space after figure and before text
Code: Select all
\begin{figure}[!ht]\centering\rule{12.8cm}{7.2cm}\caption{Dummy figure}\label{fig:dummy}\end{figure}
Best regards
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Remove space after figure and before text
you can read some more explanation in the UK TeX FAQ: Extra vertical space in floats.
Stefan
Re: Remove space after figure and before text
\begin{figure}[!t]
\centering
\includegraphics[scale=0.25]{.....}
\caption{\footnotesize ....}
\label{fig_....}
\end{figure}
I need to reduce the space after whole the figure, not between figure and caption. Between figure/caption and following text !
Remove space after figure and before text
Code: Select all
\documentclass{article}\usepackage[belowskip=-15pt,aboveskip=0pt]{caption}\setlength{\intextsep}{10pt plus 2pt minus 2pt}\begin{document}text text text text text text text text text text text text text text text text text text text text text text text text text text\begin{figure}[!ht]\centering\fbox{Test figure 1}\caption{test figure 1}\label{fig:testfig1}\end{figure}text text text text text text text text text text text text text text text text text text text text text text text text text text\begin{figure}[!ht]\centering\fbox{Test figure 2}\caption{test figure 2}\label{fig:testfig2}\end{figure}text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text\end{document}
Re: Remove space after figure and before text
Remove space after figure and before text
\setlength{\intextsep}{1ex} % set space above and below in-line float
or
\setlength{\intextsep}{-1ex} % remove extra space above and below in-line float
Some useful switches are,
- \floatsep - Space between floats. \dblfloatsep for 2 column format
- \intextsep - Space above and below in-line text floats
- \abovecaptionskip - Space above float caption
- \belowcaptionskip - Space below float caption
http://www.eng.cam.ac.uk/help/tpl/textp ... ueeze.html
The savetrees package http://www.ctan.org/tex-archive/macros/ ... savetrees/ is another useful package, when it comes to space saving. However, this is brute force space saver so handle with care.
