2

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: enter image description here

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}

enter image description here

5
  • 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
  • @samcarter_is_at_topanswers.xyz added MWE
    – seldon
    Dec 1, 2022 at 12:53
  • The code in your question is very misleading: it does not even mention the \href! Dec 1, 2022 at 13:04
  • 2
    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
  • 1
    I completed your document fragment but it does not show the alignment issue you ask about, please edit it further. (Your MWE link is not world readable) Dec 1, 2022 at 13:50

3 Answers 3

5

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}

enter image description here

2
5

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.

enter image description here

\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.

enter image description here

\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}
5

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}

enter image description here

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

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.