I want to align horizontally two images, but I am not able to this in this case:

    \subfigure[][Areas used to evaluate the interpolant parameter function.]{
    \label{fig.:PolyElem} \qquad
    \subfigure[][Triangulation on the reference polygon and integration points.]{
    \label{Polygonal element shape function.} \qquad
    \caption{Polygonal element shape function.}

I get the following result:

Wrong alignment

Does anyone know how I can get the alignment I want? I must use the subfigure, because of the document class I must use.

  • Please provide an example we can compile by completing your code to make a minimal document. What are you trying to align exactly? Those look aligned to me. Try putting an \fbox around them to check.
    – cfr
    Jul 17, 2018 at 3:13
  • Please note that the subfigure package is deprecated and the linked CTAN page recommends the use of the subcaption package. Regarding your question: Since the two images are constructed with different bounding boxes (the first with $p_i$ at the bottom and the second with $s$ on top), the solution would be either to edit your raw images to get their center at the same height, or to manually adjust their heights when imported. Jul 17, 2018 at 3:15

1 Answer 1


I'm taking a guess that you want the hexagons to align vertically; your figures already seem aligned horizontally. If this is the case, you may need to rephrase your question. Here is an answer using raisebox, as well as some minor changes to your code, and an MWE.

Note, I created the images by cutting the individual figures from your image to two new images, and called them n_one and n_two.

Applying raisebox to your second figure shifts it vertically. There is also some \hspace applied between the figures.

    \subfigure[Areas used to evaluate the interpolant parameter function.]
    \subfigure[Triangulation on the reference polygon and integration points.]
        \label{Polygonal element shape function.}\raisebox{2.2ex}{\includegraphics{n_two.pdf}}
    \caption{Polygonal element shape function.}

This gives: enter image description here

  • Thanks @Dunk the Lunk! I works, although I must find the distance used in \raiseboxby trial and error.
    – AXL
    Jul 17, 2018 at 20:37
  • @AndréXavier, it's still fairly easy and quick to do, even though its manual. Another option is to use an identical white rectangle in the background for each figure in your drawing app. Then align your figures within their respective rectangles. When you export your separate figures (including the white background rectangle), they should be aligned with respect to that background rectangle. When you import them to latex they should be aligned as long as you don't resize individual figures. Jul 18, 2018 at 3:11
  • I have tried that as well! But in some cases, the way you have shown is the easiest one. So, thanks for your help again!
    – AXL
    Jul 18, 2018 at 12:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .