Latex


Latex / Beamer: Change footline for Boadilla theme

Having a presentation title that was too long, we wanted to change the middle part of the footline on the Boadilla theme to replace the command for the document title (\insertshorttitle) with the command for document subtitle (\insertshortsubtitle).

To do so, we added the following right before the \begin{document} command.

\setbeamertemplate{footline}
{
  \leavevmode%
  \hbox{%
    \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
      \usebeamerfont{author in head/foot}\insertshortauthor\expandafter\ifblank\expandafter{\beamer@shortinstitute}{}{~(\insertshortinstitute)}
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
      \usebeamerfont{title in head/foot}\insertshortsubtitle%\insertshorttitle
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
      \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
      \usebeamertemplate{page number in head/foot}\hspace*{2ex} 
    \end{beamercolorbox}
  }%
  \vskip0pt%
}

When compiling the PDF, the result was as expected but we were getting a lot of errors for Undefined Control Sequence in various objects like the \begin{document} and \end{frame} commands. After modifying the following line (for the author name and institution) from this:

\usebeamerfont{author in head/foot}\insertshortauthor\expandafter\ifblank\expandafter{\beamer@shortinstitute}{}{~~(\insertshortinstitute)}

to this:

\usebeamerfont{author in head/foot}\insertshortauthor~~(\insertshortinstitute)

The errors were gone and the results were again the same. The final block that was properly working with no additional errors is the following:

\setbeamertemplate{footline}
{
  \leavevmode%
  \hbox{%
    \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
      \usebeamerfont{author in head/foot}\insertshortauthor~~(\insertshortinstitute)
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
      \usebeamerfont{title in head/foot}\insertshortsubtitle
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
      \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
      \usebeamertemplate{page number in head/foot}\hspace*{2ex} 
    \end{beamercolorbox}
  }%
  \vskip0pt%
}

IEEETran Latex Template – Add Copyrights on left bottom of first page of Conference class 2

Using the conference class in the IEEETran Latex template, it blocks you from using the IEEEpubid command that can be used to add the copyright note on the bottom of the screen.

Attempt 1 – Enable overrides only

We added the IEEEoverridecommandlockouts command right after the documentclass directive, that allows us to use functionality in IEEETran that should be blocked depending on the document class.
Then we used the IEEEpubid command right after the documentclass directive to create and print the copyright note:

\IEEEpubid{978-1-5386-2880-5/17/\$31.00~\copyright~2017 IEEE}

Doing so, resulted in printing the copyright note in the bottom middle of the first page. The conference class is a two column style, the left column got pushed up a bit to make space, while the right did not. In the end, half of the copyright note was overlapping with the second column.

Attempt 2 – Solution – Customize IEEEpubid as well

After documentclass we added the IEEEoverridecommandlockouts command to enable functionality that is blocked for the conference class.
Then we created our own IEEEpudid command that places itself in a column and not a page as follows:

\documentclass[conference]{IEEEtran}
%Enabled blocked functionality
\IEEEoverridecommandlockouts
%Define custom IEEEpubid that will place it self in a column and not a page, suitable from conference class
\IEEEpubid{\makebox[\columnwidth]{978-1-5386-2880-5/17/\$31.00~\copyright~2017 IEEE \hfill} \hspace{\columnsep}\makebox[\columnwidth]{ }}

Finally after the maketitle command we added IEEEpubidadjcol to give more space between the copyright note and the body of first column.

\maketitle
%Add space between copyright and text
\IEEEpubidadjcol