1

I am trying to centrally align text and an image. I tried using minipage, but nothing is working. (I cant use sidecaption as the text is a part of \only environment in actual problem)

\documentclass{beamer}
\usepackage{graphicx}
\begin{document}
\begin{frame}
  \begin{minipage}[t]{.3\textwidth}
    Single site scattering
  \end{minipage}
  \begin{minipage}[t]{.6\textwidth}
    \includegraphics[draft]{../../Preambles/thanks.png}
  \end{minipage}
\end{frame}
\end{document}

NB. I tried to put picture with draft graphicx package, but its clashing with beamer. Kindly allow a hardcoded pic.

  • 1
  • 2
    What do you mean by "nothing is working"? If you remove the [t] option in both minipages, then the text and the image get vertically centered relative to each other. Is that the desired result? (what do you mean by "centrally align"?) – magula Sep 29 '17 at 12:48
1

Taking the lead from the answer cited in my comment and centering the text minipage:

\documentclass{beamer}
\usepackage{graphicx}
\newcommand\Includegraphics[2][]{%
  \raisebox{-.5\dimexpr\height-\ht\strutbox+\dp\strutbox}{\includegraphics[#1]{#2}}}
\begin{document}
\begin{frame}
  \begin{minipage}[c]{.3\textwidth}
    Single site scattering
  \end{minipage}
    \Includegraphics[draft]{../../Preambles/thanks.png}
\end{frame}
\end{document}

enter image description here

|improve this answer|||||

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.