Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

What is the command that I can used to remove unnecessary space between text and figure on same page?

Below command doesn't do anything

\newcommand{\squeezeup}{\vspace{-2.5mm}}
share|improve this question
2  
Welcome to TeX.SX! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  Jubobs May 21 '13 at 8:55
1  
Start by looking at your image, put a frame around it (i.e., \fbox{...}), then you will see if the image is cropped properly. Many programmes does not crop correctly and leaves lots of white space. In that case it may be best to manually trim the image using an external programme. –  daleif May 21 '13 at 9:00
    
\vspace only has an effect in certain positions. Experiment by moving it around a bit, to see if you can get it to do something. –  John Wickerson May 21 '13 at 9:31
    
If, by chance, you mean space between figure and caption, those can be changed by the lengths \abovecaptionskip and \belowcaptionskip. –  Steven B. Segletes May 21 '13 at 10:30
1  
Another way to help diagnose the problem is to turn on \raggedbottom. If the extra space moves from around your figure to the bottom of the page, then the extra space is not in your figure per se but added as glue by LaTeX. –  Steven B. Segletes May 21 '13 at 11:06
show 2 more comments

1 Answer

up vote 0 down vote accepted

This answer is in response to the user comment wishing to see an example involving \abovecaptionskip and \belowcaptionskip. No special package is required.

\documentclass{article}
\usepackage{lipsum}
\begin{document}
\lipsum[4]
\begin{figure}[ht]
\rule{2in}{1.5in}
\caption{default space around caption}
\end{figure}
\lipsum[4]
\abovecaptionskip=0ex
\belowcaptionskip=0ex
\begin{figure}[ht]
\rule{2in}{1.5in}
\caption{\textbf{Resetting captionskip parameters}}
\lipsum[4]
\end{figure}
\end{document}

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.