0

I am trying to show a set of pictures using subfigure. The first line seems OK, but the second line has a different alignment than the first line, even though the two lines are exactly the same. How can I fix it?

Code:

\begin{figure*}
    \centering
        \begin{subfigure}
                \centering
                \includegraphics[width=\imagewidth,height=\imageheigth]{image1}
        \end{subfigure}
        ~
        \begin{subfigure}
                \centering
                \includegraphics[width=\imagewidth,height=\imageheigth]{image2}
        \end{subfigure}


    ..............
    ..............
    ~
    \begin{subfigure}
            \centering
            \includegraphics[width=\imagewidth,height=\imageheigth]{imageN}
    \end{subfigure} \\
    ~
    \begin{subfigure}
            \centering
            \includegraphics[width=\imagewidth,height=\imageheigth]{image(N+1)}
    \end{subfigure}
    ..............
    ..............
    ~
     \begin{subfigure}
            \centering
            \includegraphics[width=\imagewidth,height=\imageheigth]{image(2N)}
    \end{subfigure}
    \caption{some stuff her} 
    \label{fig:stuff}
     \end{figure*}
3
  • Do the imageN and image1 figures have the same size?
    – percusse
    Jul 31, 2012 at 11:33
  • Yes, figure sizes are exactly the same.
    – rooter
    Jul 31, 2012 at 11:36
  • Your code is just a fragment not showing relevant detail but the line starting \\ ~ has white space to the left of the leftmost figure so will be out of line. I would delete all the ~ (use \hspace{1cm} where you need space, it is clearer. and delete the \\ just use a blank line paragraph break. Jul 31, 2012 at 12:09

1 Answer 1

1

Ok, I solved it finally. The reason was a misplaced ~. Thanks for your support.

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