General ⇒ Remove space after figure and before text
Remove space after figure and before text
Hi,
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
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.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Remove space after figure and before text
Without any code it is nearly impossible to give specific help. So I can only guess. I assume that you centre your figure with the center environment. You should try another approach.
That eliminates the additional vertical space before and after the float environment. For more information about figures (and tables) refer to the document epslatex.
Best regards
Thorsten¹
Code: Select all
\begin{figure}[!ht]
\centering
\rule{12.8cm}{7.2cm}
\caption{Dummy figure}\label{fig:dummy}
\end{figure}
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
- Stefan Kottwitz
- Site Admin
- Posts: 10321
- Joined: Mon Mar 10, 2008 9:44 pm
Remove space after figure and before text
Hi std00088,
you can read some more explanation in the UK TeX FAQ: Extra vertical space in floats.
Stefan
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
This is my code:
\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 !
\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
Then you can change some lengths. Take a look at the following example and, of course, feel free to change the values according to your needs:
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}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: Remove space after figure and before text
Thanks. It works perfect!
Remove space after figure and before text
In addition, you can use the \setlength command with an appropriate switch, before the \begin{document}. For example,
\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,
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.
\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.
