2

So I have this beamer presentation with 5 sections. Each section as a long title so the navigation bar on top is cutoff.

I do not want to change its aspect. But is there anyway I can keep the section titles unchanged but on the top navigation bar it would show up something else.

E.g. keep the section titles as:

  1. Loooooooooooooooooooooooong Section Title 1
  2. Loooooooooooooooooooooooong Section Title 2
  3. etc

But on top navigation bar show something like:

  1. LST 1
  2. LST 2
  3. LST 3

etc.

Below two pictures. One with the current output, and one with the desired output.

Current output:

enter image description here

Desired output:

enter image description here

Edited: MWE below with the full preamble:

    \documentclass[10pt]{beamer}%
    \usepackage{appendixnumberbeamer}
    \usepackage{caption}
    \usepackage{subcaption}
    \usepackage{booktabs}
    \usepackage{bbm}
    \usepackage{amsmath}
    \usepackage{arydshln}
    \usepackage{graphicx}
    \usepackage{ mathrsfs }
    \usepackage{multirow}
    \usepackage{textpos}

    \definecolor{darkblue}{RGB}{140,140,172}
    \definecolor{bluegreen}{RGB}{173,173,224}
    \definecolor{lightbluegreen}{RGB}{204,0,51}
    \definecolor{cyan}{RGB}{30,24,83}
    \usetheme{default}
    \useinnertheme {rectangles}
    \setbeamercolor{enumerate items}{fg=lightbluegreen}
    \setbeamertemplate{blocks}[rounded][shadow=true]
    \setbeamertemplate{items}[circle] %bola em todos bullets
    \setbeamertemplate{itemize subitem}[default]
    \setbeamertemplate{section in head/foot shaded}{%
    \color{darkblue}\insertsectionhead\ \ \ \ |
    }
    \setbeamertemplate{section in head/foot}{%
    \insertsectionhead\color{darkblue}\ \ \ \ |
    }
    \setbeamertemplate{headline}{%
    \begin{beamercolorbox}[wd=\paperwidth,ht=2.25ex,dp=1ex]{myheadline}
    \Tiny\hspace*{4mm} {\hspace*{2ex}\color{white}|\hspace*{-2ex}}\insertsectionnavigationhorizontal{0ex}{}{}
    \end{beamercolorbox}%
    }

    \setbeamertemplate{sidebar right}{}
    \setbeamertemplate{footline}{%
    \hfill\usebeamertemplate***{navigation symbols}
    \hspace{0cm}\color{bluegreen}\insertframenumber{}/\color{bluegreen}\inserttotalframenumber}
    \setbeamertemplate{navigation symbols}{}
    \setbeamercolor{block title}{fg = white, bg =darkblue}
    \setbeamercolor{block body}{bg = white}
    \setbeamerfont{frametitle}{size = \large}
    \setbeamercolor{alerted text}{fg=darkblue}
    \captionsetup{compatibility=false}
    \def\code#1{\texttt{#1}}
    \newcommand\Fontvi{\fontsize{6}{7.2}\selectfont}
    \setbeamersize{text margin left=10pt,text margin right=10pt}
    \captionsetup{font=scriptsize,labelfont=scriptsize}
    \newenvironment{wideitemize}{\itemize\addtolength{\itemsep}{10pt}}{\enditemize}
    \usepackage[beamer,customcolors]{hf-tikz}
    \usepackage{tikz}
    \tikzset{hl/.style={
        set fill color=black!00,
        set border color=red!80!black,
      },
    }

    \AtBeginSection[]
    {
     \begin{frame}
     \frametitle{Outline}
     \tableofcontents[currentsection]
     \addtocounter{framenumber}{-1}
     \end{frame}
    }

    \usetikzlibrary{shapes.callouts}
    \usepackage{tikz}
    \usepackage{pgf,tikz}
    \usetikzlibrary{patterns,arrows,decorations.pathreplacing}
    \usepackage[english]{babel}



    \begin{document}

    \begin{frame}{Outline}
      \tableofcontents
    \end{frame}


    \section{LST 1}{Loooooooooooooooooooooooong Section Title 1}

    \begin{frame}
      Placeholder
    \end{frame}

    \section{LST 2}{Loooooooooooooooooooooooong Section Title 2}

    \begin{frame}
      Placeholder
    \end{frame} 

\begin{frame}
  Placeholder
\end{frame}

\end{document}
1

You can use the optional argument of the section command as follows:

\section[LST 1] {Loooooooooooooooooooooooong Section Title 1}.

| improve this answer | |
  • Actually, that also changes the titles on the outline slide. Which I do not want to change. – phdstudent Mar 3 at 19:00
  • 2
    @phdstudent: Could you please edit your question and add minimal wokring example that others can use for testing? As far as I recall, the long version should be used in the table of contents. However, this might vary depending on the theme used. – leandriis Mar 3 at 19:29
  • Edited with MWE. Thanks, – phdstudent Mar 3 at 22:35
  • samcarter_is_at_topanswers.xyz on a different stackexchange question, just noted that the problem is with the syntax. Quoting from him: About your beamer problem: the syntax in your example is wrong, you want \section[LST 1]{Loooooooooooooooooooooooong Section Title 1} --- notice the square brackets – samcarter_is_at_topanswers.xyz – phdstudent Mar 3 at 23:46

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.