4

I have three minipages next to each other. They all work as expected, with the top alignment I ask for:

Minipages

However, when I change the contents of the first minipage to {\resizebox{1cm}{!}{foo}}, things go wrong (red box added for clarity):

Minipages

How can I remedy this? Here's the MWE:

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{minipage}[t][5cm][t]{34.5pt}{\resizebox{1cm}{!}{foo}}
\end{minipage}
%
\begin{minipage}[t][5cm][t]{187pt}bar\\bar\\bar
\end{minipage}
\begin{minipage}[t][5cm][t]{34.5pt}bat\\bat\\bat
%
\end{minipage}
\end{document}
  • t means the alignment is on the baseline of the first row, which is what your image shows: the baseline of foo matches that of the first bar. What output do you want? perhaps add \vspace{0pt} as the first thing in each minipage, so they all align on that? – David Carlisle Mar 22 '17 at 14:14
  • That works! Please feel free to make it into an answer! – Kristian Nordestgaard Mar 22 '17 at 19:40
5

t means the alignment is on the baseline of the first row, which is what your image shows: the baseline of foo matches that of the first bar.

You could add \vspace{0pt} as the first thing in each minipage, so they all align on that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.