Graphics, Figures & Tablesgap between the figure and caption

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
dhan_latex
Posts: 6
Joined: Wed Jan 02, 2013 10:52 pm

gap between the figure and caption

Post by dhan_latex »

why there is a gap between the figure and caption?

Code: Select all

\begin{figure}[h!]
  \centering
     \includegraphics[width=5.1in,height=2.2in]{./figures/psr.jpg}\\
\caption{Current Status Program Register(CPSR)}
\end{figure}
Last edited by Stefan Kottwitz on Wed Jan 09, 2013 2:09 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

gap between the figure and caption

Post by svend_tveskaeg »

Give us a MWE to work with and $P_\textup{help} \geq 0$.
Last edited by cgnieder on Wed Jan 09, 2013 11:13 pm, edited 1 time in total.
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

gap between the figure and caption

Post by Stefan Kottwitz »

dhan_latex wrote:why there is a gap between the figure and caption?
Because the caption text should not touch the figure. There's a default gap between the figure and the caption (\abovecaptionskip, 10pt), for similar reasons there's a gap between text lines, otherwise the layout would be cramped.

Perhaps do you mean the gap is too big? You could change the skip I mentioned above. It may depend on your class (standard or KOMA-Script class), packages (caption package used?) and settings. That's why Svend already asked for a Infominimal working example, which allows to verify a problem. The small code snipped doesnt't show a problem (except that h! is not a good choice as placement option).

Stefan
LaTeX.org admin
Post Reply