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
LaTeX forum ⇒ General ⇒ Remove space after figure and before text
- 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¹
\begin{figure}[!ht] \centering \rule{12.8cm}{7.2cm} \caption{Dummy figure}\label{fig:dummy} \end{figure}
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¹
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
- Stefan Kottwitz
- Site Admin
- Posts: 9845
- 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:
\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,
The same technique can be used for Tables. Additional switches can be found at
http://www.eng.cam.ac.uk/help/tpl/textprocessing/squeeze.html
The savetrees package http://www.ctan.org/tex-archive/macros/latex/contrib/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
The same technique can be used for Tables. Additional switches can be found at
http://www.eng.cam.ac.uk/help/tpl/textprocessing/squeeze.html
The savetrees package http://www.ctan.org/tex-archive/macros/latex/contrib/savetrees/ is another useful package, when it comes to space saving. However, this is brute force space saver so handle with care.

Who is online
Users browsing this forum: No registered users and 6 guests