投影仪导航栏中的章节和小节中是否可以包含换行符?

投影仪导航栏中的章节和小节中是否可以包含换行符?

我想允许在 Beamer 演示文稿的导航栏中长章节和小节标题中换行。例如,在以下幻灯片中:

在此处输入图片描述

我想允许 Ubication、contact 和 transport 子部分换行。此外,最好允许子部分第二行的条目左对齐。我附上了演示代码:

\documentclass{beamer}
%\usetheme{Dresden}
\usetheme{Berlin}
%\useoutertheme{smoothbars}

\setbeamerfont{section in sidebar}{size=normalsize}
\setbeamerfont{subsection in sidebar}{size=normalsize}
\setbeamertemplate{footline}[frame number]{}

\usepackage{tcolorbox}
\definecolor{mycolor}{rgb}{0.122, 0.435, 0.698}
\newcommand{\mainTitle}{School of Sociology and Politics}
\newtcolorbox{titulo}{colback=red!5!white,colframe=red!5!white}
\newtcolorbox{menu2}{colback=gray!5!white,colframe=gray!25!blue}


\makeatother

% change definition of section and subsection navigation bars

\makeatletter
\def\insertsectionnavigationhorizontal#1#2#3{%
  \hbox to #1{{%
    \def\slideentry##1##2##3##4##5##6{}%
    #2\hskip.3cm%
    \newdimen\tmp@parbox%
    \setlength\tmp@parbox{#1}%
    \addtolength\tmp@parbox{-.6cm}%
    \parbox{\tmp@parbox}{\raggedright%
      \usebeamerfont{section in head/foot}\usebeamercolor[fg]{section in head/foot}%
      \setbox\beamer@sectionbox=\hbox{}%
      \ht\beamer@sectionbox=1.875ex%
      \dp\beamer@sectionbox=0.75ex%
      \hskip-1.875ex plus-1fill\dohead%
      \box\beamer@sectionbox}\hfil\hskip.3cm%
      #3
}}}

\def\insertsubsectionnavigationhorizontal#1#2#3{%
  \hbox to #1{{%
  \newdimen\tmp@parbox%
      \setlength\tmp@parbox{#1}%
      \addtolength\tmp@parbox{-.6cm}%
      \parbox{\tmp@parbox}{\raggedright%
    \usebeamerfont{subsection in head/foot}\usebeamercolor[fg]{subsection in head/foot}%
    \beamer@currentsubsection=0%
    \def\sectionentry##1##2##3##4##5{}%
    \def\slideentry##1##2##3##4##5##6{\ifnum##6=\c@part\ifnum##1=\c@section%
      \ifnum##2>\beamer@currentsubsection%
      \beamer@currentsubsection=##2%
      \box\beamer@sectionbox\hskip1.875ex plus1fill%
      \setbox\beamer@sectionbox=
      \hbox{\def\insertsubsectionhead{##5}%
         \def\insertsectionheadnumber{##1}%
         \def\insertsubsectionheadnumber{##2}%
         \def\insertpartheadnumber{##6}%
         \ifnum\c@subsection=##2%
        \beamer@link(##4){{\usebeamertemplate{subsection in head/foot}}}\else%
        \beamer@link(##4){{\usebeamertemplate{subsection in head/foot shaded}}}\fi}%
      \ht\beamer@sectionbox=1.875ex%
      \dp\beamer@sectionbox=0.75ex%
      \fi\fi\fi\ignorespaces}%
    #2\hskip.3cm\setbox\beamer@sectionbox=\hbox{}%
    \hskip-1.875ex plus-1fill\dohead%
    \box\beamer@sectionbox}\hfil\hskip.3cm%
    #3}}}
\makeatother

\setbeamertemplate{headline}
{%
      \hspace{0.5cm}
      \begin{titulo}
      {\Large{\mainTitle}}
      \end{titulo}
      \hspace{1cm}
      \newline
      {\small
      \begin{beamercolorbox}[ht=4.25ex,dp=2.75ex]{section in head/foot}
      \insertsectionnavigationhorizontal{\paperwidth}{}{\hfill\hfill}
      \end{beamercolorbox}%
      }

      {\small
      \begin{beamercolorbox}[ht=4.9ex,dp=3.75ex,%
      leftskip=0.2cm, rightskip=.3cm plus1fil]{subsection in head/foot}
      %\usebeamerfont{subsection in head/foot}
      %\raggedleft
      \insertsubsectionnavigationhorizontal{\paperwidth}{}{\hfill}
      \end{beamercolorbox}%
      }
}

%\newmdenv[innerlinewidth=0.5pt, roundcorner=4pt,linecolor=mycolor,innerleftmargin=6pt,
%innerrightmargin=6pt,innertopmargin=6pt,innerbottommargin=6pt]{menu1}


\title[]{School of Sociology and Politics}

\begin{document}

\section{School}

\subsection{Presentation}

\begin{frame}

\end{frame}

\subsection{Structure}

\begin{frame}

\end{frame}

\subsection{Staff}

\begin{frame}

\end{frame}

\subsection{Ubication, contact \newline and transport}

\begin{frame}\frametitle{\mainTitle}

\end{frame}

\subsection{Documents}

\begin{frame}\frametitle{\mainTitle}

\end{frame}

\subsection{Strategy  and quality}

\begin{frame}\frametitle{\mainTitle}

\end{frame}

\subsection{News}

\begin{frame}\frametitle{\mainTitle}

\end{frame}

\section{Teaching}

\subsection{Degrees}

\begin{frame}\frametitle{\mainTitle}

\end{frame}

\subsection{Masters}

\begin{frame}\frametitle{\mainTitle}

\end{frame}

\subsection{Departments}

\begin{frame}\frametitle{\mainTitle}

\end{frame}

\subsection{Teachers}
\begin{frame}\frametitle{\mainTitle}

\end{frame}

\subsection{External practices \newline and employment}

\begin{frame}\frametitle{\mainTitle}

\end{frame}

\subsection{Final degree work}

\begin{frame}\frametitle{\mainTitle}

\end{frame}

\subsection{Open education}

\begin{frame}\frametitle{\mainTitle}

\end{frame}

\subsection{Teaching innovation}

\begin{frame}\frametitle{\mainTitle}

\end{frame}

\section{Students}

\subsection{Relevant information}

\begin{frame}\frametitle{\mainTitle}

\end{frame}

\subsection{Representation and associations}

\begin{frame}\frametitle{\mainTitle}

\end{frame}

\subsection{Tutorial actions}

\begin{frame}\frametitle{\mainTitle}

\end{frame}

\subsection{Participation}

\begin{frame}\frametitle{\mainTitle}

\end{frame}

\section{Movility}

\subsection{International}

\begin{frame}\frametitle{\mainTitle}

\end{frame}

\subsection{National - SICUE}

\begin{frame}\frametitle{\mainTitle}

\end{frame}

\section{Research}

\subsection{Polisocio - LAB}

\begin{frame}\frametitle{\mainTitle}

\end{frame}

\subsection{Research groups}

\begin{frame}\frametitle{\mainTitle}

\end{frame}

\subsection{Transference}

\begin{frame}\frametitle{\mainTitle}

\end{frame}

\end{document}

提前致谢

曼努埃尔·戈麦斯-奥尔梅多

相关内容