Adjust the Distance between Figure and Main Text in LaTeX Using \vspace* Command
When writing document in LaTeX, sometimes we may want to adjust, usually slightly, the distance between figures and main text; we can use \vspace* command to realize it. For example,
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
\documentclass[a4paper]{article}
\usepackage[margin=1in]{geometry}
\usepackage{lipsum}
\usepackage[x11names]{xcolor}
\pagecolor{AntiqueWhite1}
\usepackage{graphicx,subfig}
\begin{document}
\thispagestyle{empty}
\lipsum[1]
\begin{figure*}[h]
\centering
\vspace*{3em}
\includegraphics[width=0.33\linewidth]{ctan_lion.png}
\caption{CTAN lion}
\vspace*{-3em}
\end{figure*}
\lipsum[1]
\begin{figure*}[h]
\centering
\vspace*{3em}
\subfloat[]{\includegraphics[width=0.33\linewidth]{ctan_lion.png}}\hfill
\subfloat[]{\includegraphics[width=0.33\linewidth]{ctan_lion.png}}\hfill
\subfloat[]{\includegraphics[width=0.33\linewidth]{ctan_lion.png}}\hfill
\caption{CTAN lion}
\vspace*{-3em}
\end{figure*}
\lipsum[1]
\end{document}

By the way, the \vspace* command, instead of \vspace, is preferred, because sometimes \vspace command would be discarded — although it works well in above case, I encountered a case where it didn’t work (but I can’t reproduce it now here … weird 😔). There are some references talking about the difference between \vspace and \vspace*:
The command \vspace is used to add vertical space between lines, paragraphs, or sections. It works well in the middle of a page, but at the start or end of a page, LaTeX may ignore it.
The command \vspace* is a stronger version. Unlike \vspace, it does not get ignored at the top or bottom of a page. This makes it perfect when you must ensure extra space stays visible in all positions.1
I don’t think the sign of the argument matters, Without the * the skip is always discarded at the start of the page, and with the * it is not discarded.2
and I also reported a same phenomenon in my another blog3.
References