2

I'm writing my master thesis and I need to place a large number of images and tables, as in the following way:

\paragraph{name 1}

...long list of images and tables..

\paragraph{name 2}

...long list of images and tables..

in the way that the images are in their right position and don't change their position with respect to their own title, I choose to create non-floating images and tables. Besides, the totality of my figures are a combination of little images. For example, a piece of my code is:

\paragraph{name paragraph}

\begin{center}
\includegraphics[width=0.45\textwidth]{name figure 1}  \quad
\captionof*{figure}{partial caption figure 1} 
\includegraphics[width=0.45\textwidth]{name figure 2} 
\captionof*{figure}{partial caption figure 2}   
\captionof{figure}{Total caption }
\label{name_label}
\end{center}

In this way, I have a result where the images are not tiled horizontally, as I show in the figure attached:

in the top the result of my code

I want that the images are tiled horizontally, and this happens if I don't insert the partial caption at each image, as I show in the bottom of the image attached.

So, is there any solution of my problem? Is there another way to insert multiple images in a non-floating environment?

1
5

You can use minipages around the figures:

\documentclass{article}
\usepackage{caption}
\usepackage{graphicx}

\begin{document}

\paragraph{name paragraph}

\begin{center}
\begin{minipage}{0.45\textwidth}
\includegraphics[width=\linewidth]{example-image-a}
\captionof*{figure}{partial caption figure 1}
\end{minipage}\hfill
\begin{minipage}{0.45\textwidth}
\includegraphics[width=\linewidth]{example-image-b} 
\captionof*{figure}{partial caption figure 2}   
\end{minipage}
\captionof{figure}{Total caption }
\label{name_label}
\end{center}

\end{document}

enter image description here

In fact, I'd suggest you to use another minipage to surround the entire construct; otherwise, in some cases the general caption could land in a different page from the images:

\noindent\begin{minipage}{\textwidth}
\begin{center}
\begin{minipage}{0.45\textwidth}
\includegraphics[width=\linewidth]{example-image-a}
\captionof*{figure}{partial caption figure 1}
\end{minipage}\hfill
\begin{minipage}{0.45\textwidth}
\includegraphics[width=\linewidth]{example-image-b} 
\captionof*{figure}{partial caption figure 2}   
\end{minipage}
\captionof{figure}{Total caption }
\label{name_label}
\end{center}
\end{minipage}
5
  • @MicheleCisternino You're welcome! I just did an edit to my answer with another suggestion that you might find useful. Feb 3 '15 at 15:59
  • @barbarabeeton Ah, a leftover from the original code in which I didn't use the \hfill. I removed it. Thanks. Feb 3 '15 at 17:02
  • If i use this way to insert figures in my thesis, sometimes there is the possibility that there isn't enought space to insert entirely the figure with his caption at the bottom of the page.Is there any method to oblige all object to go in the next page?! Feb 3 '15 at 22:16
  • @MicheleCisternino that's the price you have to pay if flotation is suppressed; you could perhaps try to use the afterpage package. Feb 3 '15 at 23:04
  • I konw...I hope to be lucky with afterpage package. Feb 4 '15 at 6:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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