2

I have

\begin{frame}{Motivation}
\begin{minipage}{0.6\textwidth}
\centering
\begin{figure}
\includegraphics[width=1\textwidth]{Dosimetry.png}
\end{figure} 
\end{minipage}\hfill
\begin{minipage}{0.4\textwidth}
\begin{itemize}
\item 1
\item 2
\item 3
\item 4
\item 5
\item 6
\end{itemize}
\end{minipage}

This positions the image on the left in the center as I desire, however it lines the first bullet points with the top of the image, whereas I want it at the top of the frame.

If I change the second begin minipage to to be \begin{minipage}[b]{0.4\textwidth} the bullet points get closer to be properly aligned, but the image moves down away from the center.

If in addition I change the first minipage to be \begin{minipage}[t]{0.6\textwidth} the bullet points are aligned correctly, however now the image is even further misaligned.

How can I have it so that the image is in the position it places with the original code shown, and the bullet points are in the position it places it with the original code changed to \begin{minipage}[t]{0.6\textwidth} and \begin{minipage}[b]{0.4\textwidth}? I do not understand why this should be difficult.

  • Welcome to TeX.SX! A tip: You can use backticks ` to mark your inline code as I did in my edit. – dexteritas Jul 24 '17 at 13:10
  • 1
    Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – dexteritas Jul 24 '17 at 13:14
  • Beamer centres the contents on one frame vertically, that's why the placement seems difficult. – Skillmon Jul 24 '17 at 13:21
2

This is just a hack, for a sophisticated solution please see Skillmon's answer

\documentclass[t]{beamer}

\begin{document}

\begin{frame}{Motivation}
    \begin{columns}[T]
        \begin{column}{0.57\textwidth}
            \vskip1.4cm
            \includegraphics[width=\textwidth]{example-image}
        \end{column}
        \begin{column}{0.37\textwidth}
            \begin{itemize}
                \item 1
                \item 2
                \item 3
                \item 4
                \item 5
                \item 6
            \end{itemize}
        \end{column}
    \end{columns}
\end{frame}

\end{document}

enter image description here

  • Thank you very much for your time and help, this does exactly what I want. – Jack Jul 24 '17 at 13:22
6

Is this the desired output:

\documentclass[]{beamer}

\begin{document}
\begin{frame}{Motivation}
    \begin{minipage}{0.6\textwidth}
        \vbox to \textheight{
            \vfill
            \centering
            \includegraphics[width=1\textwidth]{example-image}
            \vfill
        }
    \end{minipage}\hfill
    \begin{minipage}{0.4\textwidth}
        \vbox to \textheight{
            \begin{itemize}
                \item 1
                \item 2
                \item 3
                \item 4
                \item 5
                \item 6
            \end{itemize}
            \vfill
        }
    \end{minipage}
\end{frame}
\end{document}

enter image description here

You could achieve the more or less same with the optional arguments of minipage:

\documentclass[t]{beamer}

\begin{document}
\begin{frame}{Motivation}
    \begin{minipage}[c][\textheight][c]{0.6\textwidth}
            \centering
            \includegraphics[width=1\textwidth]{example-image}
    \end{minipage}\hfill
    \begin{minipage}[c][\textheight][t]{0.4\textwidth}
            \begin{itemize}
                \item 1
                \item 2
                \item 3
                \item 4
                \item 5
                \item 6
            \end{itemize}
    \end{minipage}
\end{frame}
\end{document}

enter image description here

To get better results of vertical placement, one could use the code provided in this answer to calculate the \contentheight which is the height of the frame without the title and stuff.

With this we could further automate the process (note that 0.95\contentheight gives better vertical centering of the image):

\documentclass[t]{beamer}

\newif\ifsidebartheme
\sidebarthemefalse

\newdimen\contentheight
\newdimen\contentwidth
\newdimen\contentleft
\newdimen\contentbottom
\makeatletter
\newcommand*{\calculatespace}{%
    \contentheight=\paperheight%
    \ifx\beamer@frametitle\@empty%
        \setbox\@tempboxa=\box\voidb@x%
      \else%
        \setbox\@tempboxa=\vbox{%
          \vbox{}%
          {\parskip0pt\usebeamertemplate***{frametitle}}%
        }%
        \ifsidebartheme%
          \advance\contentheight by-1em%
        \fi%
      \fi%
    \advance\contentheight by-\ht\@tempboxa%
    \advance\contentheight by-\dp\@tempboxa%
    \advance\contentheight by-\beamer@frametopskip%
    \ifbeamer@plainframe%
    \contentbottom=0pt%
    \else%
    \advance\contentheight by-\headheight%
    \advance\contentheight by\headdp%
    \advance\contentheight by-\footheight%
    \advance\contentheight by4pt%
    \contentbottom=\footheight%
    \advance\contentbottom by-4pt%
    \fi%
    \contentwidth=\paperwidth%
    \ifbeamer@plainframe%
    \contentleft=0pt%
    \else%
    \advance\contentwidth by-\beamer@rightsidebar%
    \advance\contentwidth by-\beamer@leftsidebar\relax%
    \contentleft=\beamer@leftsidebar%
    \fi%
}
\makeatother

\begin{document}
\begin{frame}
    \calculatespace%
    \begin{minipage}[c][0.95\contentheight][c]{0.6\textwidth}%
            \centering%
            \includegraphics[width=1\textwidth]{example-image}%
    \end{minipage}\hfill%
    \begin{minipage}[c][0.95\contentheight][t]{0.4\textwidth}%
            \begin{itemize}%
                \item 1%
                \item 2%
                \item 3%
                \item 4%
                \item 5%
                \item 6%
            \end{itemize}%
    \end{minipage}%
\end{frame}
\end{document}
  • Yes, this produces exactly what I want,thank you for your time and help. I'm sorry that I can't accept two answers. – Jack Jul 24 '17 at 13:24
  • @Jack then you should not use samcarters, imho. It uses a \vskip which you would have to adjust manually, mine seems more automated to me. – Skillmon Jul 24 '17 at 13:28
  • \textheight is probably a bit too height for the minipages, as this does not take into account the space for the frametitle. Maybe .9\textheight would give a better alignment. – user36296 Jul 24 '17 at 13:39
  • @samcarter you're right. I didn't consider the title. Sorry for bashing your answer but the need for a manual \vskip just doesn't seem right to me. – Skillmon Jul 24 '17 at 13:40
  • 1
    @Skillmon tex.stackexchange.com/a/44298/36296 sounds like a clean way to calculate the space. – user36296 Jul 24 '17 at 14:27

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.