beamer 文档中的长节名:标题和节过渡

beamer 文档中的长节名:标题和节过渡

我在beamer文档中为各个部分设置了长标题,它们占据了索引所在的页眉的长尺寸。我给它们取了一个短名称和一个长名称。在页眉和每个章节的过渡中,它们都显示短标题,但是我希望页眉中使用短版本,而每个部分的过渡中使用长版本。

\documentclass[xcolor={dvipsnames},10pt]{beamer}

\setbeamercovered{transparent}

\usetheme{Darmstadt}

%---------------------------------------------------------------------------------%
    % Transition with the name of the section
\AtBeginSection[]{
  \begin{frame}
  \vfill
  \centering
  \begin{beamercolorbox}[sep=8pt,center,shadow=true,rounded=true]{title}
    \usebeamerfont{title}\insertsectionhead\par%
  \end{beamercolorbox}
  \vfill
  \end{frame}
}
%----------------------------------------------------------------------------------%



% For colors
\usepackage[dvipsnames]{xcolor}
\usepackage{amsmath}
\usepackage{xfrac}
% For columns
\usepackage{multicol}
\usepackage{biblatex}

%---------------------------------------------------------------------------%
%--------------------------%
% To add enumeration index
%--------------------------%
\addtobeamertemplate{navigation symbols}{}{%
    \usebeamerfont{footline}%
    \usebeamercolor[fg]{footline}%
    \hspace{1em}%
    \insertframenumber / \inserttotalframenumber 
}
\setbeamercolor{footline}{fg=black}
\setbeamerfont{footline}{series=\bfseries}

%----------------------------------------------------------------------------%

%------------------------------------------------------------------------------------%
% PREAMBLE: dots for each slide of a section
    %------------------------------------------------------------------------------------%

\usepackage{remreset}% tiny package containing just the \@removefromreset command
\makeatletter
\@removefromreset{subsection}{section}
\makeatother
\setcounter{subsection}{1}

%------------------------------------------------------------------------------------%

\usepackage[font=scriptsize]{caption}

% Images vertically aligned
%\usepackage[margin=1in]{geometry}
\usepackage[most]{tcolorbox}
\usepackage{lipsum}

\setbeamercovered{dynamic}
\setbeamerfont{author}{size=\small} %Reduce the size of Authors

\title{\large\textbf{Title}}

\vspace{5cm}

\author{\textbf{Author 1}}
\vspace{0.15cm}


\date{November 19, 2018}


\begin{document}


\renewcommand{\tablename}{Tabla} 

%% GENERAR PORTADA %%

\frame[plain]{\titlepage}




%---------------------------------------------------------------------------------%


\section[Section 1]{This is the long title for the Section 1}

\section[Section 2]{This is the long title for the Section 2}

\section[Section 3]{This is the long title for the Section 3}

\end{document}

答案1

\insertsectionhead将为您提供标题中的部分名称。要获取长版本,请使用\insertsection

关于您的代码的一些评论:

  • \setbeamercovered{transparent}如果你稍后用以下方式覆盖它,那么使用 use 就没有意义了\setbeamercovered{dynamic}

  • 除非你另有说明,否则 beamer 框架默认垂直居中,因此你可以\vfill从你的部分页面中删除 s

  • \usepackage[dvipsnames]{xcolor}已经由 beamer 加载

  • \usepackage{multicol}是不必要的,beamer有自己的柱状机制

  • \usepackage{remreset}已经过时

  • 不要在作者或标题等宏的参数中弄乱格式指令,\setbeamerfont{title}{size=\large, series=\bfseries}\setbeamerfont{author}{series=\bfseries}应使用

  • 手动间距说明\vspace{5cm}在序言中没有意义


\documentclass[xcolor={dvipsnames},10pt]{beamer}


%\setbeamercovered{transparent} useless as it is overwritten by dynamic
\setbeamercovered{dynamic}

\usetheme{Darmstadt}

% Transition with the name of the section
\AtBeginSection[]{
  \begin{frame}
  %\vfill
  \centering
  \begin{beamercolorbox}[sep=8pt,center,shadow=true,rounded=true]{title}
    \usebeamerfont{title}\insertsection\par%
  \end{beamercolorbox}
  %\vfill
  \end{frame}
}

%\usepackage[dvipsnames]{xcolor} % already laoded by beamer
%\usepackage{multicol} % unnecessary
%\usepackage{remreset} % obsolet

\setbeamerfont{title}{size=\large, series=\bfseries}
\title{Title}

%\vspace{5cm} %Makes no sense in preamble

\setbeamerfont{author}{series=\bfseries}
\author{Author 1}

%\vspace{0.15cm} %Makes no sense in preamble

\begin{document}

\section[Section 1]{This is the long title for the Section 1}
\section[Section 2]{This is the long title for the Section 2}
\section[Section 3]{This is the long title for the Section 3}

\end{document}

在此处输入图片描述

相关内容