I'm trying to align the tops of two images using the subfigure environment from the subcaption package. Unless I'm misinterpreting the other questions, I believe I have read multiple questions asking the same, Align by the top borders of figures when using subcaption and How to prevent offset in subcaption / subfigure are two examples. The problem is, those answers don't seem to work as I expected, and I still can't get the tops of the images to be aligned.
example:
\documentclass{article}
\usepackage{subcaption}
\usepackage{graphicx}
\usepackage{mwe}
\begin{document}
\begin{figure}
\centering
\begin{subfigure}[t]{0.45\textwidth}
\includegraphics[width=\linewidth, height=20em]{example-image-a}
\caption{taller image}
\end{subfigure}
\begin{subfigure}[t]{0.45\textwidth}
\includegraphics[width=\linewidth, height=15em]{example-image-b}
\caption{shorter image}
\end{subfigure}
\caption{two images}
\end{figure}
\end{document}
For me this generates the following:

I would have expected it to align the tops of the images. How do I do this?
\vskip 0ptat the very beginning of eachsubfigureenvironment. – jub0bs Jul 01 '14 at 17:36subfigureenvironment is based on theminipageenvironment, so the following question and answers are relevant to your problem: http://tex.stackexchange.com/questions/34166/understanding-minipages-aligning-at-top – jub0bs Jul 01 '14 at 17:50subcaptionpackage - Submmit to @axel-sommerfeldt – skpblack Jul 01 '14 at 18:07\caption{...}before of\includegraphics{...}but caption appears above of figures. I didn't find an easy solution – skpblack Jul 01 '14 at 19:11\vspace{0pt}after of\begin{subfigure}[t]{0.45\textwidth}in bothsubfigures, and ready!!!. I don't know why, but works! – skpblack Jul 01 '14 at 22:03subfiguredirectly, as beginners don't see the connection tominipagedirectly. – Martin Scharrer Jul 02 '14 at 18:10