1
\documentclass[11pt]{article}

\usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=1.5cm,right=1.5cm]{geometry}

\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc}

\usepackage{graphicx}

\begin{document}

\begin{minipage}[t]{\textwidth}
    \begin{minipage}[t]{.2\textwidth}
        Text
    \end{minipage}%
    \begin{minipage}[t]{.8\textwidth}
        A
    \end{minipage}%
    \llap{\begin{minipage}[t]{.25\textwidth}
        \includegraphics[draft]{Bild1.jpg}
    \end{minipage}}
    \par\vspace*{8pt}
    \begin{minipage}[t]{.2\textwidth}
        Text
    \end{minipage}%
    \begin{minipage}[t]{.8\textwidth}
        B
    \end{minipage}
\end{minipage}

\end{document}

Can someone please explain to me why the minipage with Text A and Text B are not aligned to the top of the outer minipage?

Misaligned text inside minipage

High Ball
  • 121
  • If you prefer visual explanations, I drew some pictures in http://tex.stackexchange.com/questions/241707/strange-alignment-problems-in-longtable/241868#241868. And I drew even more pictures in http://tex.stackexchange.com/questions/257145/why-wont-m-vertically-center-my-contents/257148#257148. – cfr Jan 21 '17 at 01:59
  • I'm not really understanding why includegraphics sets the baseline to the bottom of the image. But I get why the minipages behave as they do. I now fixed it by adding \vspace{0pt} before the graphic. I don't know a better way. – High Ball Jan 21 '17 at 17:08
  • The t and b options actually use the baselines of the first or last line of text (respectively). \includegraphics is treated as a single line of text, making it both the first and last line. – John Kormylo Jan 21 '17 at 17:16
  • For changing the position of an image on the baseline, you could have a look at the adjustbox package, see e.g. http://tex.stackexchange.com/questions/30079/how-to-align-picture-top-left-in-a-table – Torbjørn T. Mar 05 '17 at 10:12

0 Answers0