Beamer 非法计量单位(插入 pt)。 \frame{\titlepage}

Beamer 非法计量单位(插入 pt)。 \frame{\titlepage}

我遇到了以下错误:非法度量单位(插入 pt)。 \frame{\titlepage}。代码如下:

有人知道如何解决这个错误吗?

\documentclass[11pt]{beamer}%blackandwhite
\usepackage[spanish,portuguese,english]{babel}
\usepackage{amsmath,amssymb,amsthm}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}%gráficas
\usepackage{graphics}%gráficas
\usepackage{hyperref}%hypervinculo
%\usepackage{beamerarticle}
\usepackage{beamerprosper}
\usepackage{multicol}%varias columnas
\newtheorem*{ejem}{Ejemplo} 
\newtheorem*{prop}{Proposición}
\newtheorem*{teor}{Teorema}
\newtheorem*{defin}{Definición}
\newtheorem*{lema}{Lema}
\newtheorem*{algoritmo}{Algoritmo}
\newtheorem*{cor}{Corolario}

 \mode<presentation> {
  \usetheme{Hannover}
  \usefonttheme{serif}
  \usecolortheme{beaver}
}
\setbeamercovered{dynamic}
%\logo{\includegraphics[height=1.5cm]{img.eps}}
\setbeamertemplate{enumerate items}[default]
\setbeamertemplate{theorems}[ams style]

\setbeamercolor{alerted text}{fg=blue}

\expandafter\def\expandafter\insertshorttitle\expandafter{%
   \insertshorttitle\hfill\insertframenumber\,/\,\inserttotalframenumber}  

\title[\textsc{ }]{\textrm{ABBB}} 
\author[\textsc{}]{\textsc{SSSS}}   
\institute[]{ \textsc{s\\ SSSSS}\\ \vspace{0.3cm}}  
\date{}

%\AtBeginSection[]{\frame{\frametitle{Index}\tableofcontents[current]}}

\begin{document}
%\bibliographystyle{amsplain}%Estilo de bibliografia
\frame{\titlepage}
%\part{Talk}
%\frame{\frametitle{Index}\tableofcontents[part=1]}

\section{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Slide 1 
\begin{frame}{Contents} 
    \begin{enumerate}[<+->]
        \item A
        \item Ac
        \item Dc
        \item Fcn
        \item Hc
        \item Hc
        \item Gc
    \end{enumerate}

\pause 

\end{frame}
\part{Talk}
\section{Overview}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Slide 2 
\begin{frame}{Overview}
\end{frame}
\subsection{Introduction}
\begin{frame}
    asbdf
\end{frame}

\end{document}

答案1

谢谢 Mico。

最小代码:

\documentclass{beamer}

\usetheme{Hannover}% OR \usetheme{Berkeley}
\usefonttheme{serif}
\usecolortheme{beaver}

\expandafter\def\expandafter\insertshorttitle\expandafter{% 
\insertshorttitle\hfill\insertframenumber\,/\,\inserttotalframenumber}

\begin{document} 

\begin{frame}{title}
   text
\end{frame}

\end{document}

错误:

! Illegal unit of measure (pt inserted).<to be read again> cl.15 \end{frame}

注意:如果你写华沙主题,上面的代码没有错误。

编写以下命令来计数幻灯片:

\setbeamertemplate{page number in head/foot}[totalframenumber]
\setbeamertemplate{navigation symbols}{\footnotesize\usebeamertemplate{page number in head/foot}}

编辑您的文件:

\documentclass[11pt]{beamer}%blackandwhite
\usepackage[spanish,portuguese,english]{babel}
\usepackage{amsmath,amssymb,amsthm}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}%gráficas
\usepackage{graphics}%gráficas
\usepackage{hyperref}%hypervinculo
%\usepackage{beamerarticle}
\usepackage{beamerprosper}
\usepackage{multicol}%varias columnas
\newtheorem*{ejem}{Ejemplo} 
\newtheorem*{prop}{Proposición}
\newtheorem*{teor}{Teorema}
\newtheorem*{defin}{Definición}
\newtheorem*{lema}{Lema}
\newtheorem*{algoritmo}{Algoritmo}
\newtheorem*{cor}{Corolario}

 \mode<presentation> {
  \usetheme{Hannover}
  \usefonttheme{serif}
  \usecolortheme{beaver}
}
\setbeamercovered{dynamic}
%\logo{\includegraphics[height=1.5cm]{img.eps}}
\setbeamertemplate{enumerate items}[default]
\setbeamertemplate{theorems}[ams style]

\setbeamercolor{alerted text}{fg=blue}

%\expandafter\def\expandafter\insertshorttitle\expandafter{%
%   \insertshorttitle\hfill\insertframenumber\,/\,\inserttotalframenumber}  


\setbeamertemplate{page number in head/foot}[totalframenumber]
\setbeamertemplate{navigation symbols}{\footnotesize\usebeamertemplate{page number in head/foot}}

\title[\textsc{ }]{\textrm{ABBB}} 
\author[\textsc{}]{\textsc{SSSS}}   
\institute[]{ \textsc{s\\ SSSSS}\\ \vspace{0.3cm}}  
\date{}

%\AtBeginSection[]{\frame{\frametitle{Index}\tableofcontents[current]}}

\begin{document}
%\bibliographystyle{amsplain}%Estilo de bibliografia
\frame{\titlepage}
%\part{Talk}
%\frame{\frametitle{Index}\tableofcontents[part=1]}

\section{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Slide 1 
\begin{frame}{Contents} 
    \begin{enumerate}[<+->]
        \item A
        \item Ac
        \item Dc
        \item Fcn
        \item Hc
        \item Hc
        \item Gc
    \end{enumerate}

\pause 

\end{frame}
\part{Talk}
\section{Overview}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Slide 2 
\begin{frame}{Overview}
\end{frame}
\subsection{Introduction}
\begin{frame}
    asbdf
\end{frame}

\end{document}

输出:

在此处输入图片描述

建议:参见答案1答案2问题和Beamer 主题画廊

编辑:在汉诺威主题 \useoutertheme[height=0pt,left]{sidebar}使用。

\expandafter\def\expandafter\insertshorttitle\expandafter{% 
\insertshorttitle\hfill\insertframenumber\,/\,\inserttotalframenumber}

造成了问题!确实\hfill\insertframenumber\,/\,\inserttotalframenumber

編輯結尾: 改变汉诺威主题 \useoutertheme[height=0pt,left]{sidebar}

\useoutertheme[height=0pt,width=0pt,left]{sidebar}

没有错误最少的代码。

相关内容