Bhavneet sharma
Bhavneet sharma

Reputation: 427

How to remove authors name from the sidebar in latex?

I am writing my presentation in latex (in overleaf.com). I don't want to add the authors name in the vertical bar on right side of the beamer given below,

Title Page

I am also providing the latex code of that title page, given below:

\documentclass[14pt,aspectratio=169]{beamer}
\usetheme{Marburg}
\graphicspath{{Arquivos/}}
\usepackage[utf8]{inputenc}
\usepackage[portuguese]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}

\title{Image and Audio Hybrid Watermarking against Synchronization Attacks}
\author{Bhavneet Sharma (31703102)\\[\baselineskip] \small{{Supervised By}
  \and\\Prof. Dr. Mayank Dave}}
%\setbeamercovered{transparent} 
\institute{\includegraphics[width=2cm, height=1cm]{NITKKR_logo.png}
\\National Institute of Technology, Kurukshetra
}
\date{September 22, 2019} 
%\subject{} 
\begin{document}

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

I the vertical bar, only title of the first page required then starts with Introduction.

Required Output

I don't know how to do so. Help in this problem for solving.

Upvotes: 6

Views: 7607

Answers (2)

Unfortunately the sidebar theme does not test if the author name is empty and will insert it anyway. This will add an unnecessary empty line to the sidebar.

To truly get rid of the author name in the sidebar, on can redefine the sidebar template a bit:

\documentclass[14pt,aspectratio=169]{beamer}
\usetheme{Marburg}
\graphicspath{{Arquivos/}}
\usepackage[utf8]{inputenc}
\usepackage[portuguese]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
%\usepackage{graphicx}

\title{Image and Audio Hybrid Watermarking against Synchronization Attacks}
\author[]{Bhavneet Sharma (31703102)\\[\baselineskip] {\small {Supervised By}
  \and\\Prof. Dr. Mayank Dave}}
%\setbeamercovered{transparent} 
\institute{\includegraphics[width=2cm, height=1cm,keepaspectratio]{example-image-duck}
\\National Institute of Technology, Kurukshetra
}
\date{September 22, 2019} 
%\subject{} 

\makeatletter
\setbeamertemplate{sidebar right}
  {
    \beamer@tempdim=\beamer@sidebarwidth%
    \advance\beamer@tempdim by -6pt%
    {\usebeamerfont{title in sidebar}%
      \vskip1.5em%
      \hskip3pt%
      \usebeamercolor[fg]{title in sidebar}%
      \insertshorttitle[width=\beamer@tempdim,center,respectlinebreaks]\par%
      \vskip1.25em%
    }%
%    {%
%      \hskip3pt%
%      \usebeamercolor[fg]{author in sidebar}%
%      \usebeamerfont{author in sidebar}%
%      \insertshortauthor[width=\beamer@tempdim,center,respectlinebreaks]\par%
%      \vskip1.25em%
%    }%
    \insertverticalnavigation{\beamer@sidebarwidth}%
    \vfill
    \ifx\beamer@sidebarside\beamer@lefttext%
    \else%
      \usebeamercolor{normal text}%
      \llap{\usebeamertemplate***{navigation symbols}\hskip0.1cm}%
      \vskip2pt%
    \fi%
  }%
\makeatother

\begin{document}

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

\section{Introduction}

\begin{frame}
content...
\end{frame}


\end{document}

enter image description here

Off-topic:

  • you don't need to load the graphicx package with beamer, beamer already loads it

  • the syntax \small{...} is wrong. Font size commands are switches and don't take an argument, it should be {\small ...}

  • if you specify both the height and width of an image, it will most likely be distorted. Better only specify the height or the width or add the keepaspectratio option

Upvotes: 2

Alain Merigot
Alain Merigot

Reputation: 11547

In beamer, you can use an alternate shorter author name (ditto for the presentation title or institution).

\author[Short name]{Author loooong name}

If doing so, the short name will be used in the side (or bottom depending on your theme) bar. So, to solve your problem, it is sufficient to declare an empty short name.

\documentclass[14pt,aspectratio=169]{beamer}
\usetheme{Marburg}
\graphicspath{{Arquivos/}}
\usepackage[utf8]{inputenc}
\usepackage[portuguese]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}

\title{Image and Audio Hybrid Watermarking against Synchronization Attacks}
\author[]{Bhavneet Sharma (31703102)\\[\baselineskip] \small{{Supervised By}
  \and\\Prof. Dr. Mayank Dave}}
%\setbeamercovered{transparent} 
\institute{%\includegraphics[width=2cm, height=1cm]{NITKKR_logo.png}\\
  National Institute of Technology, Kurukshetra
}
\date{September 22, 2019} 
%\subject{} 
\begin{document}

\begin{frame}
\titlepage
\end{frame}
\begin{frame}
\section{This is section 1}
\end{frame}
\begin{frame}
\section{and this is section 2}
\titlepage
\end{frame}
\end{document}

enter image description here

Upvotes: 3

Related Questions