LaTeX: automatic subfigures

Using the figsize package for sub figures within a thesis. The package is very simple to use, just tell it what layout in the format \SetFigLayout{number of figures high}{number of figures wide}, then load the figures with \subfigure. Figures will be resized with aspect ratio kept as default, but there are many options to play around with in the manual, including rotation, skewing aspect ratios, making some subfigures bigger than others etc..

\documentclass{article}
\usepackage{graphicx}
\usepackage{figsize}

\begin{document}

\begin{figure}
\centering
\SetFigLayout{3}{2}
  \subfigure[subfigure caption]{\includegraphics{example-image-a}}
  \hfill
  \subfigure[subfigure caption]{\includegraphics{example-image-b}}
  \hfill
  \subfigure[subfigure caption]{\includegraphics{example-image-c}}
  \hfill
  \subfigure[subfigure caption]{\includegraphics{example-image-a}}
  \hfill
  \subfigure[subfigure caption]{\includegraphics{example-image-b}}
  \hfill  
  \subfigure[subfigure caption]{\includegraphics{example-image-c}}
  \hfill
\caption{This is a caption}
\end{figure}

\end{document}

Output:
Screenshot from 2015-01-12 15:00:54

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s