\insertshorttitle
下面的 MWE 在用作框架标题时不起作用如果 \setbeameroption{show notes on second screen}
也处于活动状态。没有它也可以正常工作。\inserttitle
没有表现出这种行为。为什么?这是 beamer 中的一个错误吗?
\documentclass[notes]{beamer}
\usepackage[utf8]{inputenc}
\usepackage{pgfpages}
\title[This is the rather long short title]{This is the title}
\setbeameroption{show notes on second screen}
\begin{document}
%\begin{frame}{\inserttitle}
\begin{frame}{\insertshorttitle}
Nono :(
\insertshorttitle within the frame works fine
\end{frame}
\end{document}
我收到的错误消息是:
! Extra }, or forgotten \endgroup.
\beamer@stend ->\egroup
答案1
不确定为什么会出现此问题,但作为一种解决方法,您可以将其放入\insertshorttitle
另一个组中:
\documentclass[
%notes % This option is obsolete
]{beamer}
\usepackage[utf8]{inputenc}
\usepackage{pgfpages}
\title[This is the rather long short title]{This is the title}
\setbeameroption{show notes on second screen}
\begin{document}
\begin{frame}
\frametitle{{\insertshorttitle}}
Nono :(
\insertshorttitle within the frame works fine
\end{frame}
\end{document}