Minipage environments are misaligned

I'm trying to have two minipage side by side. Here's the code (also: MWE):

\begin{frame}[t]%
\fbox{\begin{minipage}[t][\textheight][t]{.48\textwidth}
All the previous questions are as relevant for cybernetic systems as they are for simple' systems.

A principled mathematical framework for the ontology and phenomenology of systems is given by \textbf{categorical system theory} (CST):
\end{minipage}}
\begin{minipage}[t][\textheight][t]{.48\textwidth}
\begin{center}
\fbox{
\includegraphics[height=.85\textheight]{CST.png}
}\\
\cite{myers2021book}
\end{center}
\end{minipage}
\end{frame}


I can't understand why this happens:

I use the same code in the previous slide to align two minipages of text and it works without problems. Any hints?

\documentclass{beamer}

\begin{document}

\begin{frame}[t]%
\fbox{\begin{minipage}[t][\textheight][t]{.48\textwidth}
All the previous questions are as relevant for cybernetic systems as they are for simple' systems.

A principled mathematical framework for the ontology and phenomenology of systems is given by \textbf{categorical system theory} (CST):
\end{minipage}}
\begin{minipage}[t][\textheight][t]{.48\textwidth}
\begin{center}
\fbox{
\includegraphics[height=.85\textheight,width=\linewidth]{example-image}
}\\
...[example]...
\end{center}
\end{minipage}
\end{frame}
\end{document}


• Can you please make a compilable minimal working example? That's not the layout I get if I guess enough code to make this compilable... Dec 1, 2022 at 12:49
• The code in your question is very misleading: it does not even mention the \href! Dec 1, 2022 at 13:04
• Please do not use an external link for an example, just edit the code block to be a self-contained document Dec 1, 2022 at 13:38

I would use beamer columns:

% !TeX TS-program = lualatex

\documentclass[14pt]{beamer}

% Presento style file
\usepackage{config/presento}

% custom command and packages
\input{config/custom-command}

\begin{document}

\begin{frame}[t]%
\begin{columns}[onlytextwidth,T]
\begin{column}{.48\textwidth}
\fbox{\parbox{\textwidth}{
\centering
All the previous questions are as relevant for cybernetic systems as they are for simple' systems.

A principled mathematical framework for the ontology and phenomenology of systems is given by \textbf{categorical system theory} (CST):
}}
\end{column}
\begin{column}{.48\textwidth}
\centering
\fbox{\href{http://davidjaz.com/Papers/DynamicalBook.pdf}{\includegraphics[width=.9\textwidth]{images/skeleton.jpg}}}

\cite{myers2021book}
\end{column}
\end{columns}
\end{frame}

\end{document}


• Thanks, this looks like the right way to do these things. Dec 2, 2022 at 10:23
• @seldon You're welcome! Dec 2, 2022 at 10:26

The image you show has the baseline of the first line of text on the left aligned with the basline of the image on the right.

This means that both minipage are top aligned and have text and image as first item.

\documentclass{beamer}

\begin{document}

\begin{frame}[t]%
\fbox{\begin{minipage}[t][\textheight][t]{.48\textwidth}
All the previous questions are as relevant for cybernetic systems as they are for simple' systems.

A principled mathematical framework for the ontology and phenomenology of systems is given by \textbf{categorical system theory} (CST):
\end{minipage}}
\begin{minipage}[t][\textheight][t]{.48\textwidth}
\fbox{
\includegraphics[height=.85\textheight,width=\linewidth]{example-image}
}\\
...[example]...
\end{minipage}
\end{frame}
\end{document}


If you add a \vspace at the top of the 2nd minipage, the reference point will move to that first item so the left column text will move higher. A center environment (as you have in your code fragment) adds such vspace node.

\documentclass{beamer}

\begin{document}

\begin{frame}[t]%
\fbox{\begin{minipage}[t][\textheight][t]{.48\textwidth}
All the previous questions are as relevant for cybernetic systems as they are for simple' systems.

A principled mathematical framework for the ontology and phenomenology of systems is given by \textbf{categorical system theory} (CST):
\end{minipage}}
\begin{minipage}[t][\textheight][t]{.48\textwidth}
\begin{center}
\fbox{
\includegraphics[height=.85\textheight,width=\linewidth]{example-image}
}\\
...[example]...
\end{center}
\end{minipage}
\end{frame}
\end{document}


The reference point of the minipage on the right is the bottom of the picture.

You can add \vspace*{...} to set a different reference point. In the first minipage it should be 0pt, in the second one you have to back up by \fboxrule and \fboxsep.

\documentclass{beamer}

\begin{document}

\begin{frame}[t]
\frametitle{Cybernetic systems}

\fbox{\begin{minipage}[t][0.7\textheight][t]{.48\textwidth}
\vspace*{0pt}
All the previous questions are as relevant for cybernetic systems as they
are for simple' systems.

A principled mathematical framework for the ontology and phenomenology of
systems is given by \textbf{categorical system theory} (CST):
\end{minipage}}
\begin{minipage}[t][\textheight][t]{.48\textwidth}
\centering
\vspace*{-\fboxsep}\vspace*{-\fboxrule}
\fbox{%
\includegraphics[height=.65\textheight,width=0.9\textwidth]{example-image-9x16}%
}

\cite{myers2021book}
\end{minipage}

\end{frame}

\end{document}


• Thanks, this quickly fixed it! Dec 2, 2022 at 10:23