我正在处理以下问题。基本上,我想从标题幻灯片中删除页码。我的代码如下所示(MWE):
\documentclass{beamer}
\mode<presentation>
{
\usetheme{default} % nebo zkuste Darmstadt, Madrid, Warsaw,...
\usecolortheme{default} % nebo zkuste albatross, beaver, crane, ...
\usefonttheme{default} % nebo zkuste serif, structurebold, ...
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{caption}[numbered]
}
\newenvironment{squareenv}{\only{\setbeamertemplate{items}[square]}}{}
\usepackage{amsthm}
\setbeamertemplate{theorems}[numbered] % to number
\usepackage{verbatim}
\usepackage{times}
\usepackage[most]{tcolorbox}
\usepackage{lmodern}
\newtcbox{\mybox}{blank, on line, opacitytext=0.5}
\usepackage{subfig}
\usepackage{arydshln}
\usepackage{amsmath}
\usepackage[edges]{forest}
\usepackage{tcolorbox}
\theoremstyle{plain} % insert bellow all blocks you want in italic
\usepackage{tikz}
\usetikzlibrary{positioning,shadows,trees,overlay-beamer-styles}
\tikzset{
every node/.style={draw,text width=2cm,drop shadow},
style1/.style= {rectangle, rounded corners=2pt, thin,align=center,fill=green!30},
style2/.style= {rectangle, rounded corners=6pt, thin,align=center,fill=green!60},
style3/.style= {rectangle,thin,align=left,fill=pink!60},
style4/.style= {fill=#1, minimum height=9ex, anchor=base},
svisible on/.style={alt=#1{}{opacity=0,every shadow/.style={opacity=0}}}
}
\usepackage{xcolor}
\newcommand{\highlightred}[1]{%
\colorbox{red!50}{$\displaystyle#1$}}
\newcommand{\highlightyellow}[1]{%
\colorbox{yellow!50}{$\displaystyle#1$}}
\newcommand{\highlightgreen}[1]{%
\colorbox{green!50}{$\displaystyle#1$}}
\newcommand{\highlightblue}[1]{%
\colorbox{blue!50}{$\displaystyle#1$}}
\newcommand{\highlightpink}[1]{%
\colorbox{pink!40}{$\displaystyle#1$}}
\newcommand{\highlightorange}[1]{%
\colorbox{orange!40}{$\displaystyle#1$}}
\newcommand{\highlightcyan}[1]{%
\colorbox{cyan!40}{$\displaystyle#1$}}
\newcommand{\highlightbrown}[1]{%
\colorbox{brown!40}{$\displaystyle#1$}}
\usetikzlibrary{arrows.meta, calc, quotes, tikzmark,shapes}
\tikzstyle{every picture}+=[remember picture]
\tikzstyle{na} = [baseline=-.5ex]
\usepackage{graphicx}
\usepackage{tcolorbox}
%%% PAGE NUMBERING
\defbeamertemplate{footline}{page number appendix}
{%
\hfill%
\usebeamercolor[fg]{page number in head/foot}%
\usebeamerfont{page number in head/foot}%
\insertpagenumber\kern1em\vskip2pt%
}
\makeatletter
\g@addto@macro\appendix{%
\setbeamertemplate{footline}[page number appendix]%
\renewcommand*{\insertpagenumber}{%
\Roman{framenumber}%
}%
}
\makeatother
\usepackage{appendixnumberbeamer}
%%%%%%%%%%%%%%%%%%%
\usepackage[english]{babel}
\newcommand{\indep}{\perp \!\!\! \perp}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{mathtools}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
%definice matematických prostředí
\newtheorem{veta}{Věta}
\newtheorem{lema}[veta]{Lemma}
\title{At the intersection between Machine Learning and Econometrics: theory and applications}
\author{\underline{Nutarelli Federico}}
\institute{IMT for Advanced Studies Lucca}
\date{}
\titlegraphic{
\includegraphics[width=4cm]{Logo_eng.png}
}
\begin{document}
\setbeamertemplate{footline}{}
\begin{frame}[noframenumbering,plain]
\titlepage
\end{frame}
\setbeamertemplate{footline}{}
\begin{frame}[noframenumbering,plain]{Overview}
\tableofcontents
\end{frame}
\end{document}
现在这里的关键是%%% 页码
\addtobeamertemplate{navigation symbols}{}{ \hspace{1em} \usebeamerfont{footline}%
\insertframenumber / \inserttotalframenumber }
我认为有些东西是相反的,因为输出实际上看起来没有主幻灯片的页码和附录的罗马数字编号(这是想要的)。我如何才能为主要部分生成编号,但不为标题页编号?
答案1
尝试以此为例:
1)
\begin{frame}[noframenumbering]
\titlepage
\end{frame}
2)
\documentclass{beamer}
\setbeamertemplate{footline}[frame number]
\AtBeginSection[]{%
\begin{frame}[plain]
\addtocounter{framenumber}{-1}
\tableofcontents[currentsection]
\end{frame}
}
\begin{document}
\section{title}
\begin{frame}
\end{frame}
\end{document}