-1

How to use subcaption package? I want to fix my subfigures in the pdf. As shown in the image below, my subfigures are going out of the page. I have listened that it could be fixed with subcaption package. These are 10 grpahs only 5 are visible Kindly help

faiza
  • 227
  • 4
  • 16
  • 4
    Please provide a minimal working example with \documentclass{...} ... essential packages, which you use ..\begin{document} ... \end{document}. Normally if you put empty line after selected number ofsubfloats, they should appear in two lines. – Zarko Aug 25 '15 at 18:01
  • are you looking for a latex code? (I don't know what lyx is) – touhami Aug 25 '15 at 18:17
  • yes... both are same i think. different versions. – faiza Aug 25 '15 at 18:27
  • @faiza please see http://meta.stackexchange.com/questions/43019/how-do-comment-replies-work – touhami Aug 25 '15 at 19:21

1 Answers1

1

Here is what you can do

\documentclass{book}
\usepackage{graphicx,subcaption}

\begin{document}

\begin{figure}
\begin{subfigure}[b]{.3\textwidth}
\centering\includegraphics[width=\textwidth]{example-image}
\caption{A subfigure}\label{fig:1a}
\end{subfigure}\hfill
\begin{subfigure}[b]{.3\textwidth}
\centering\includegraphics[width=\textwidth]{example-image}
\caption{Another subfigure}\label{fig:1b}
\end{subfigure}\hfill
\begin{subfigure}[b]{.3\textwidth}
\centering\includegraphics[width=\textwidth]{example-image}
\caption{Another subfigure}\label{fig:1c}
\end{subfigure}\hfill
\begin{subfigure}[b]{.3\textwidth}
\centering\includegraphics[width=\textwidth]{example-image}
\caption{Another subfigure}\label{fig:1d}
\end{subfigure}\hfill
\begin{subfigure}[b]{.3\textwidth}
\centering\includegraphics[width=\textwidth]{example-image}
\caption{Another subfigure}\label{fig:1e}
\end{subfigure}\hfill
\begin{subfigure}[b]{.3\textwidth}
\centering\includegraphics[width=\textwidth]{example-image}
\caption{Another subfigure}\label{fig:1f}
\end{subfigure}
\caption{A figure}\label{fig:1}
\end{figure}
\end{document}

enter image description here

touhami
  • 19,520