1

I have to write a presentation for my thesis. I am using beamer. Here is the code:

%!TEX TS-program = xelatex
\documentclass[slidescentered]{beamer}
\usepackage{color}
\usetheme{Berkeley}
\usecolortheme{whale}

\title{Orbite periodiche di flussi Hamiltoniani su ipersuperfici convesse}
\author[Michele Gorini]{\begin{multicols}{2} Candidato \\ Michele Gorini \\\columnbreak Relatore \\ prof. Roberto Paoletti \end{multicols}}
\institute[Unimib]{Università degli studi di Milano-Bicocca}
\date{26 Novembre 2015}
\logo{\includegraphics{Logo.jpg}}

\begin{document}
\frame{\titlepage}
\end{document}

Result:

Use of \begin doesn't match its definition.
\beamer@andstripped ->\begin {
                          multicols}{2} Candidato \\ Michele Gorini \\\c...
l.8 ... \\ prof. Roberto Paoletti \end{multicols}}

Desired result:

enter image description here

Or something similar. Pic obtained with code:

%!TEX TS-program = xelatex
\documentclass[slidescentered]{beamer}
\usepackage{color}
\usetheme{Berkeley}
\usecolortheme{whale}

\title{Orbite periodiche di flussi Hamiltoniani su ipersuperfici convesse}
\author[Michele Gorini]{\hspace{.5cm} Candidato \hspace{3.5cm} Relatore \\ \hspace{1cm} Michele Gorini \hspace{2cm} prof. Roberto Paoletti}
\institute[Unimib]{Università degli studi di Milano-Bicocca}
\date{26 Novembre 2015}
\logo{\includegraphics{Logo.jpg}}

\begin{document}
\frame{\titlepage}
\end{document}

What is going wrong in the other code and why? And is there a smarter way than random \hspaces to get the desired result?

And PS, trying a tabular gives more or less the same error, which is why this is tagged too.

Edit

I only just realized that the logo is too wide, so I resized it with [width=1.5cm]. Anyway you do not have the image, so just use \rule{5cm}{3cm} instead of the \includegraphics.

And PS I am asking this to avoid ruling the spacing by hand, so I refused my friend's \quad \qquad\qquad … solution and would like a solution without spacing commands. Apparently switching to \twocolumns, \begin{multicols}{2}, \begin{columns} or using a tabular does not work as seen above.

1 Answer 1

2

Use a box to insert the authors. Inside this box, you may use minipages or tabulars or native columns and \column etc. I have used minipages.

%!TEX TS-program = xelatex
\documentclass[slidescentered]{beamer}
\usepackage{color}
\usetheme{Berkeley}
\usecolortheme{whale}

\newsavebox{\authbox}
\sbox{\authbox}{%
\centering
\begin{minipage}{0.45\linewidth}
\centering\normalsize
Candidato \par
Michele Gorini
\end{minipage}
\hfill
\begin{minipage}{0.45\linewidth}
\centering\normalsize
Relatore \par
prof. Roberto Paoletti
\end{minipage}
}

\title{Orbite periodiche di flussi Hamiltoniani su ipersuperfici convesse}
\author[Michele Gorini]{%
\usebox{\authbox}
}
\institute[Unimib]{Università degli studi di Milano-Bicocca}
\date{26 Novembre 2015}
\logo{\includegraphics[width=1cm]{logo}}

\begin{document}
\begin{frame}
\titlepage
\end{frame}
\end{document}

enter image description here

1
  • Time for me to learn what a minipage is :).
    – MickG
    Oct 6, 2015 at 15:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .