4

I would like to place the institution logo at the bottom of the sidebar as wide as the whole sidebar.

I was wondering if there is a command that return the width of the sidebar, somthing similar to \textwidth.

Thanks in advance for your help

Update: Yes, I am using beamer. here is an example of my code:

\documentclass{beamer}
\usepackage[latin1]{inputenc}

\usetheme{Berkeley}
\usecolortheme{seahorse}
\title{Title}
\author{My name}
\institute{My institute}
\date{\today}
\addtobeamertemplate{sidebar left}{}{
  \includegraphics[width = 0.15\textwidth]{logo}
}

\begin{document}
\begin{frame}[plain]
\titlepage
\end{frame}

\begin{frame}
Frame content
\end{frame}

\end{document}
  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. I assume, that you use beamer? – user31729 Sep 3 '14 at 13:05
  • Welcome to TeX.SX! Could you please specify at least which class are you using? Is it Beamer? I guess so, but a confirmation is definitely worth. – Claudio Fiandrino Sep 3 '14 at 13:07
  • In many document styles (probably not beamer), the lengths \PageLeftMargin+\hoffset will give a distance from the left side of the paper to the text body. – Steven B. Segletes Sep 3 '14 at 14:03
6
\makeatletter
\addtobeamertemplate{sidebar left}{}{%
  \includegraphics[width=\beamer@sidebarwidth]{logo}%
}
\makeatother

Don't forget the % to prevent trailing spaces!

  • Thanks, I tried something like this before but without the \makeatletter and \makeatother commands and it was not compiling. – Emanuele Sep 4 '14 at 10:08
  • 1
    @Emanuele Take a look at tex.stackexchange.com/a/8353/1952 to understand why do you need \makeatletter and \makeatother – Ignasi Sep 4 '14 at 12:18
1

The sidebar width can be increased or decreased using

\usetheme[width=3cm]{{Berkeley}

Code

\documentclass{beamer}
\usetheme[width=3cm]{Berkeley}
\usecolortheme{seahorse}
\title{Title}
\author{My name}
\institute{My institute}
\date{\today}
\addtobeamertemplate{sidebar left}{}{
  \includegraphics[width = 0.33\textwidth]{albt}
}

\begin{document}
\begin{frame}[plain]
\titlepage
\end{frame}

\begin{frame}
Frame content
\end{frame}

\end{document}

beamersidebar

However your first page will look ugly if you enlarge the sidebar

  • Thanks, but my purpose is not to modify the sidebar width but to get its with. In order to fit the logo size with the sidebar width. – Emanuele Sep 4 '14 at 10:03

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.