I am trying to align my images in a grid like format within LaTeX and have done so like this:
\documentclass[a4paper,11pt,fleqn,titlepage]{article}
\usepackage[margin=2.5cm]{geometry} % See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper} % ... or a4paper or a5paper or ...
%\geometry{landscape} % Activate for for rotated page geometry
\usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent
\usepackage{graphicx}
\usepackage{ulem}
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{epstopdf}
\usepackage{longtable}
\usepackage{color}
\usepackage{showframe}
\usepackage{subfigure}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
\begin{document}
\newpage
\begin{figure}[!ht]
\centering
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-4.eps}}}
\hspace{0cm}
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-5.eps}}}
\hspace{0cm}
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-6.eps}}}
\hspace{0cm}
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-7.eps}}}
\hspace{0cm}
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-8.eps}}}
\vspace{1cm}
\centering
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-9.eps}}}
\hspace{0cm}
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-10.eps}}}
\hspace{0cm}
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-11.eps}}}
\hspace{0cm}
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-12.eps}}}
\hspace{0cm}
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-13.eps}}}
\vspace{1cm}
\centering
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-14.eps}}}
\hspace{0cm}
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-15.eps}}}
\hspace{0cm}
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-16.eps}}}
\hspace{0cm}
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-17.eps}}}
\hspace{0cm}
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-18.eps}}}
\vspace{1cm}
\centering
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-19.eps}}}
\hspace{0cm}
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-20.eps}}}
\hspace{0cm}
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-21.eps}}}
\hspace{0cm}
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-22.eps}}}
\hspace{0cm}
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-23.eps}}}
\vspace{1cm}
\centering
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-24.eps}}}
\hspace{0cm}
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-25.eps}}}
\hspace{0cm}
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-26.eps}}}
\hspace{0cm}
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-27.eps}}}
\hspace{0cm}
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-28.eps}}}
\vspace{1cm}
\centering
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-29.eps}}}
\hspace{0cm}
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-30.eps}}}
\hspace{0cm}
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-31.eps}}}
\hspace{0cm}
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-32.eps}}}
\hspace{0cm}
\subfigure{\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=5cm 8cm 6cm 8cm, clip=true, scale=0.25]{Polyhedra/Polyhedron-33.eps}}}
\end{figure}
\newpage
\end{document}
This works fine for me for the first two lines of images (I have five on each line) however when it gets to the third line of images the vertical space between the images increases and I don't know why.
Is there a way to make my images align so that:
The entire figure is top aligned vertically and centrally aligned horizontally to a new page.
The
subfigureshave five on each line.The
subfiguresare aligned centrally horizontally within the figure.The
subfiguresare aligned by the top vertically on each line.The spacing between all
subfiguresis equal both between them on the same line and from one line to the next.
If you imaging a piece of paper with a grid draw in the centre and an image in the centre of each square in the grid, that's what I want. I get the feeling I am either really close or just doing something horrendously wrong! Any help would be greatly appreciated.
Note: I have only put the boxes in to see where the images begin and end, these shall be removed.
