I am learning how to use Latex and currently I am trying to get an understanding of how to place 3 figures all in one line across the page.
Here is my efforts which has sent one figure to the next page and seems to repeat the caption.
% Sample file: math.tex
\documentclass{sample}
\usepackage{xcolor}
\usepackage{setspace}
\usepackage[margin=.7in]{geometry}
\usepackage{parskip}
\setlength{\parindent}{15pt}
\leftskip 0.1in
\parindent -0.1in
\usepackage{graphicx}
\usepackage{mathtools}
\usepackage{enumerate}
\usepackage{verbatim}
\usepackage{fancyvrb}
\usepackage[bottom]{footmisc}
\VerbatimFootnotes
\begin{document}
\begin{figure}[h!]
\centering\includegraphics[scale=.5]{Rachel&Bob}
\caption{Rachel and Bob's basis vectors}\label{Fi:001}
\end{figure}
\begin{figure}[h!]
\includegraphics{Poincare disk model.pdf}
\end{figure}
\end{document}
I got the centering to work on the first figure and the Caption and Label were just fine.
The second figure was sent to the next page and I removed the Caption and Label in order to understand why I had:
"disk.model.pdf"
to the left of the fig which has been placed about two inches to the left of the left hand margin.
Removing both the Caption and Label has had no impact on the text I refer to in the last paragraph.
Any suggestions or pointers where I can research some more on placement of figures.
Best Answer
To keep the images and associated captions together, it's best to place the
\includegraphics
-\caption
-\label
triplets inside separateminipage
environments. For three side-by-side images, I suggest you allocate a width of0.3\textwidth
to eachminipage
. That way,0.05\textwidth
can be set aside as whitespace between each pair of images. (0.3+0.05+0.3+0.05+0.3=?.)