Beamer 中缺少页码

Beamer 中缺少页码

在这个 MWE 中,我想在第一帧中显示错过的页码:

%% BEAMER THEME SAKLY 2014: Main tex file for compiling
%$ Compile this file (XeLateX)
%% Copyright 2014 by SAKLY Hamdi

%%%%%%%%%%%%%%%%
%=====Preambule========%
%%%%%%%%%%%%%%%%
\documentclass[10 pt]{beamer}
\usepackage{etex}
\usetheme{default}
\usepackage{amsmath}%loads amsmath that should go before unicode-math
\setbeamertemplate{navigation symbols}{} 
%%%%%%%%%%%%%%%%%%%%%%%%
% =======Usual LaTeX Packages======== %
%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{graphicx}
%\usepackage{stackrel}
%\usepackage{mathrsfs}
%\usepackage{bbm}  
%\usepackage{pifont}
\usepackage{multicol}
%\usepackage{bbding}
\usepackage{enumitem}
%\usepackage{wasysym}

%%%%%%%%%%%%%%%%%%%%%%%%%
%========Frame Number Customization=====%
%%%%%%%%%%%%%%%%%%%%%%%%%%
\defbeamertemplate{footline}{centered page number}
{%
  \hspace*{\fill}%
  \usebeamercolor[brown]{page number in head/foot}%
  \usebeamerfont{page number in head/foot}%
  \insertframenumber%
  \hspace*{\fill}\vskip2pt%
}
\setbeamertemplate{footline}[centered page number]
%=================LaTeXDraw==========
\usepackage{wrapfig}
\usepackage[usenames,dvipsnames]{pstricks}
\usepackage{epsfig}
\usepackage{pst-grad} % For gradients
\usepackage{pst-plot} % For axes
\usepackage{pst-3dplot}
\usepackage{pst-solides3d}
%=====Tikz=======================================%
\usepackage{tikz}
%\usetikzlibrary{decorations}
%\usetikzlibrary{shapes.symbols}
%\usetikzlibrary{shapes.callouts}
\usepackage{xparse}
%========================================%
\begin{document}
\tikzstyle{every picture}+=[remember picture] 
%---------------------------------------------------------------
% FRAME
%---------------------------------------------------------------
\begin{frame}[c]{Diffraction des ondes \'electromagn\'etiques par un objet p\'en\'etrable}

\begin{columns}
\column{.35\textwidth}
\begin{figure}[ht]
\centering
\psscalebox{.4 .4} % Change this value to rescale the drawing.
{
\begin{pspicture}(0,-4.321954)(8.656472,4.321954)
\psbezier[linecolor=brown, linewidth=0.08, fillstyle=solid,fillcolor=brown](2.3564725,4.178046)(3.1458247,4.791987)(5.6229916,1.9758314)(5.5564723,0.97804624)(5.4899535,-0.019738894)(2.6635792,-2.5290606)(1.9564724,-1.8219538)(1.2493657,-1.114847)(1.5671202,3.5641057)(2.3564725,4.178046)
 \onslide<2->{\psline[linecolor=brown, linewidth=0.06, arrowsize=0.04cm 2.0,arrowlength=2.1,arrowinset=0.0]{->}(1.5964724,1.3380463)(-0.16352756,1.5380462)}
\end{pspicture}
}
\end{figure}
\column{.7\textwidth}
\begin{itemize}
\item[$\bullet$]$\Omega\subset R^3$: domaine born\'e \`a bord Lipschitzien
\item<2->[$\bullet$]$n$ : vecteur normal unitaire sortant
\end{itemize}
\end{columns}

\begin{tikzpicture}[overlay]

        \node at (0.17,3.8) {$\Gamma$};
        \node at (0.8,5) {$\Omega$};
        \onslide<2->\node at (-0.1,5.45) {$n$};

\end{tikzpicture}
\end{frame}
\end{document}

答案1

问题出tikzpicture在非最小工作示例的末尾。尝试使用如下语法:

\documentclass{beamer}
\usepackage{tikz}

\setbeamertemplate{footline}{\insertframenumber{}}
\usepackage{tikz}

\begin{document}

    \begin{frame}[b]{test}
        \begin{tikzpicture}[overlay]
            \node at (0,1) {all slides};
            \onslide<2->{
                \node at (0.17,5.45) {slide 2};
            }
        \end{tikzpicture}
    \end{frame}

\end{document}

特别使用括号\onslide<2->{ ... }


整个例子:

\usepackage{enumitem}
%\usepackage{wasysym}

%%%%%%%%%%%%%%%%%%%%%%%%%
%========Frame Number Customization=====%
%%%%%%%%%%%%%%%%%%%%%%%%%%
\defbeamertemplate{footline}{centered page number}
{%
    \hspace*{\fill}%
    \usebeamercolor[brown]{page number in head/foot}%
    \usebeamerfont{page number in head/foot}%
    \insertframenumber%
    \hspace*{\fill}\vskip2pt%
}
\setbeamertemplate{footline}[centered page number]
%=================LaTeXDraw==========
\usepackage{wrapfig}
\usepackage[usenames,dvipsnames]{pstricks}
\usepackage{epsfig}
\usepackage{pst-grad} % For gradients
\usepackage{pst-plot} % For axes
\usepackage{pst-3dplot}
\usepackage{pst-solides3d}
%=====Tikz=======================================%
\usepackage{tikz}
%\usetikzlibrary{decorations}
%\usetikzlibrary{shapes.symbols}
%\usetikzlibrary{shapes.callouts}
\usepackage{xparse}
%========================================%
\begin{document}
    \tikzstyle{every picture}+=[remember picture] 
    %---------------------------------------------------------------
    % FRAME
    %---------------------------------------------------------------
    \begin{frame}[c]{Diffraction des ondes \'electromagn\'etiques par un objet p\'en\'etrable}

        \begin{columns}
            \column{.35\textwidth}
            \begin{figure}[ht]
                \centering
                \psscalebox{.4 .4} % Change this value to rescale the drawing.
                {
                    \begin{pspicture}(0,-4.321954)(8.656472,4.321954)
                    \psbezier[linecolor=brown, linewidth=0.08, fillstyle=solid,fillcolor=brown](2.3564725,4.178046)(3.1458247,4.791987)(5.6229916,1.9758314)(5.5564723,0.97804624)(5.4899535,-0.019738894)(2.6635792,-2.5290606)(1.9564724,-1.8219538)(1.2493657,-1.114847)(1.5671202,3.5641057)(2.3564725,4.178046)
                    \onslide<2->{\psline[linecolor=brown, linewidth=0.06, arrowsize=0.04cm 2.0,arrowlength=2.1,arrowinset=0.0]{->}(1.5964724,1.3380463)(-0.16352756,1.5380462)}
                    \end{pspicture}
                }
            \end{figure}
            \column{.7\textwidth}
            \begin{itemize}
                \item[$\bullet$]$\Omega\subset R^3$: domaine born\'e \`a bord Lipschitzien
                \item<2->[$\bullet$]$n$ : vecteur normal unitaire sortant
            \end{itemize}
        \end{columns}

        \begin{tikzpicture}[overlay]

        \node at (0.17,3.8) {$\Gamma$};
        \node at (0.8,5) {$\Omega$};
        \onslide<2->{
            \node at (-0.1,5.45) {$n$};
        }
        \end{tikzpicture}
    \end{frame}
\end{document}

在此处输入图片描述

相关内容