0

Hi I'm working on my first beamer presentation in view of my PhD defense,

I've plenty of time and started to experiment, I quite like the design and style of LaTex presentation; however, I'm not yet confident and might opt in the end for a more conventional PPT — since there is not much math in this work anyway.

That said, I'm faced with the first issue in my title slide. Essentially, I want to have my name on the left (as first author) and both my supervisors on the right in the slide. I've tried so using both tabular and tabularx (according to this post, How to make this table fit nicely into one page of beamer?), but for the sake of me I cannot have my supervisors aligned to the right of the slide...

Basically, I would like the Supervisors, xxx and yyy to be centered but pushed all the way to the right, similarly to how my name is pushed all the way to the left. Also, it would be nice to have my name vertically centered in the table, I attempted to do so with column type m but it didn't work. Below, a MWE to run the code:

Please, if you see something weird in the code or that could be optimized let me know! Thanks in advance.

P.S. There is also a warning when compiling related to

`pdfauthor' has already been used

is there a way to get rid of it? I need the \AtBeginDocument for the authors table to exist before the document and this appears to conflict with something...

\documentclass[169]{beamer}
\usepackage[utf8]{inputenc}
\usetheme{Boadilla}

\usepackage{xcolor}
\usepackage{comment}
\usepackage{graphicx}
\usepackage{tikz,etoolbox}
\usepackage{tabularx,booktabs}
\newcolumntype{C}{>{\centering\arraybackslash}X}

\definecolor{bground}{HTML}{0074c0}
\definecolor{anti-flashwhite}{rgb}{0.95, 0.95, 0.96}

\makeatletter
\setbeamertemplate{background canvas}{%
    \ifnum\c@framenumber=1%
        {\begin{tikzpicture}
        \useasboundingbox (0,0) rectangle (\paperwidth,\paperheight);
        \fill [color=bground] (0,0.66\paperheight) rectangle (\paperwidth,\paperheight);
        \end{tikzpicture}}
    \else%
        {\begin{tikzpicture}
        \useasboundingbox (0,0) rectangle (\paperwidth,\paperheight);
        \fill [color=bground] (0,0.86\paperheight) rectangle (\paperwidth,\paperheight);
        \end{tikzpicture}}
        \fi%
}
\makeatother

\makeatletter
\setbeamertemplate{headline}{%
    \ifnum\c@framenumber=1%
        {\hfill\includegraphics[width=1.25in,keepaspectratio]{example-image-a}\hspace{.05in}\vspace{-1.25in}}
    \else%
        {\hfill\includegraphics[width=.5in]{example-image-a}\hspace{.05in}\vspace{-.5in}}
    \fi%
}
\makeatother

\makeatletter
\newcommand*{\rom}[1]{\expandafter\@slowromancap\romannumeral #1@}
\makeatother

\AtBeginDocument{%
\title[Ph.D. defense]{\hspace{.15in}FIRST LINE \\ SECOND LINE \\ \hspace{.1in}THIRD LINE}
\author[Surname, Givene Name]{
\begin{tabularx}{\textwidth}{@{} lC @{}}
    \textbf{Given Name Surname} & \textbf{Supervisors} \\
         & xxx \\
         & yyy \\
    \end{tabularx}}
\institute[]{\centering Ph.D. Program in \\ Evolutionary Biology and Ecology \\ \rom{36}\textdegree cycle}
\date[\today]{Academic Years 2020/2021 – 2022/2023}
\logo{\includegraphics[height=.5in]{example-image-b}}
}

\setbeamerfont{title}{shape=\bfseries,size=\LARGE}
\setbeamercolor{title}{fg=anti-flashwhite}

\setbeamercolor{frametitle}{fg=anti-flashwhite}
\addtobeamertemplate{frametitle}{\vskip-.08in}{}

%\setbeamerfont{author}{size=\Large}
\setbeamerfont{date}{size=\tiny}

\makeatletter
\setbeamertemplate{title page}[default][left,colsep=-4bp,rounded=true,shadow=\beamer@themerounded@shadow]
\makeatother

\AtBeginSection[]
{
  \begin{frame}
    \frametitle{Table of Contents}
    \tableofcontents[currentsection]
  \end{frame}
}

\begin{document}

\begin{frame}[t]
    \vspace{-.35in}
    \titlepage
\end{frame}

\end{document}
1
  • 1
    You should clean up your preamble. A lot of these packages are not necessary in a beamer presentation. Commented Jul 8 at 14:10

1 Answer 1

1

I wouldn't mess with the content of macros like \author etc.

Instead you could either redefine the author template (and add your table there) and/or redefine the whole title page template if you need more control:

\documentclass{beamer}
\usetheme{Boadilla}

\author{Surname, Givene Name}

\usepackage{tabularray}

\setbeamertemplate{author}{%
  \begin{tblr}{
    colspec={X[valign=m]Q[halign=c,valign=m]},
    row{1}={font=\bfseries}
  }
  \SetCell[r=3]{} Given Name Surname & Supervisors\\
  & xx \\
  & yy\\
  \end{tblr}
}

\begin{document}

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

\setbeamertemplate{title page}{
  \usebeamertemplate{author}
}

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

\end{document}

enter image description here

2
  • thanks a lot for the insights! I cleaned my preamble and adopted the much more streamlined approach you suggested; however, since I could not figure out why my setbeamertemplate{author} wasn't working properly and still gave me the Warning: 'pdfauthor' has already been used; I ended up following what was recommended in this other post tex.stackexchange.com/questions/166531/… — much in line with what you said but beyond my current skills in LaTex in terms of coding. It appears to work and no Warnings are returned.
    – Matteo
    Commented Jul 8 at 18:13
  • 1
    @Matteo If you set \author in the preamble and not at the start of the document, you shouldn't get this warning. Commented Jul 8 at 18:23

You must log in to answer this question.

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