diff options
author | Karl Berry <karl@freefriends.org> | 2017-07-14 22:16:30 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-07-14 22:16:30 +0000 |
commit | 46e95f178cfedc9839460ee35880698050f7644a (patch) | |
tree | 730f540a21d7047a243e929c74e4158674675814 /Master/texmf-dist/tex/latex/beamer/beamerbasesection.sty | |
parent | 44af1a53bf28c922f525bd635c417b22f3b99b39 (diff) |
beamer (14jul17)
git-svn-id: svn://tug.org/texlive/trunk@44798 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/beamer/beamerbasesection.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/beamer/beamerbasesection.sty | 100 |
1 files changed, 48 insertions, 52 deletions
diff --git a/Master/texmf-dist/tex/latex/beamer/beamerbasesection.sty b/Master/texmf-dist/tex/latex/beamer/beamerbasesection.sty index 3dbe99247de..01ceaf4bff1 100644 --- a/Master/texmf-dist/tex/latex/beamer/beamerbasesection.sty +++ b/Master/texmf-dist/tex/latex/beamer/beamerbasesection.sty @@ -1,6 +1,7 @@ % Copyright 2003--2007 by Till Tantau % Copyright 2010 by Vedran Mileti\'c % Copyright 2012,2013,2015 by Vedran Mileti\'c, Joseph Wright +% Copyright 2017 by Joseph Wright % % This file may be distributed and/or modified % @@ -23,7 +24,6 @@ \mode <presentation> - % % Lecture Definitions % @@ -44,35 +44,34 @@ \newcounter{lecture} \renewcommand\thelecture{\@arabic\c@lecture} \let\insertlecturenumber=\thelecture -\newcommand\lecture{\@dblarg\beamer@lecture} -\long\def\beamer@lecture[#1]#2#3{ +\newrobustcmd*\lecture{\@dblarg\beamer@lecture} +\long\def\beamer@lecture[#1]#2#3{% \beamer@savemode - \mode<all> - \refstepcounter{lecture} - \def\beamer@currentlecturelabel{#3} + \mode<all>% + \refstepcounter{lecture}% + \def\beamer@currentlecturelabel{#3}% \@onelevel@sanitize\beamer@currentlecturelabel - \def\beamer@lecturename{#2} - \def\beamer@shortlecturename{#1} + \def\beamer@lecturename{#2}% + \def\beamer@shortlecturename{#1}% \ifx\beamer@onlylecture\@empty \else \expandafter\beamer@if@in@clist@TF\expandafter\beamer@onlylecture \expandafter{\beamer@currentlecturelabel}% - {\beamer@inlecturetrue} - {\beamer@inlecturefalse} + {\beamer@inlecturetrue}% + {\beamer@inlecturefalse}% \fi \beamer@atbeginlecture \beamer@resumemode } - \mode <all> { - \long\def\AtBeginLecture#1{% + \newrobustcmd\AtBeginLecture[1]{% \def\beamer@atbeginlecture{#1}} \AtBeginLecture{} - \newcommand\includeonlylecture[1]{% + \newrobustcmd*\includeonlylecture[1]{% \def\beamer@onlylecture{#1}% \@onelevel@sanitize\beamer@onlylecture } @@ -80,20 +79,19 @@ \includeonlylecture{} } -\newcommand\insertlecture{\beamer@lecturename} -\newcommand\insertshortlecture[1][]{% - {% +\newrobustcmd*\insertlecture{\beamer@lecturename} +\newrobustcmd*\insertshortlecture[1][]{% + \begingroup \beamer@setupshort{#1}% \beamer@insertshort{\beamer@shortlecturename}% - }} + \endgroup} \mode <article> { - \newcommand\lecture[3][]{\def\insertlecture{#2}\def\insertshortlecture{#1}} + \newrobustcmd*\lecture[3][]{\def\insertlecture{#2}\def\insertshortlecture{#1}} } - % % Part Definitions % @@ -103,9 +101,9 @@ \newcommand<>{\part}{\alt#1{\@dblarg\beamer@part}{\beamer@gobbleoptional}} \long\def\beamer@part[#1]#2{% - \beamer@savemode% + \beamer@savemode \mode<all>% - \ifbeamer@inlecture% + \ifbeamer@inlecture \refstepcounter{part}% \def\beamer@partname{#2}% \def\beamer@partnameshort{#1}% @@ -119,44 +117,43 @@ \protect\beamer@sectionpages{\the\beamer@sectionstartpage}{\the\beamer@tempcount}}}% \addtocontents{nav}{\protect\headcommand{% \protect\beamer@subsectionpages{\the\beamer@subsectionstartpage}{\the\beamer@tempcount}}}% - \beamer@partstartpage=\c@page% - \beamer@sectionstartpage=\c@page% - \beamer@subsectionstartpage=\c@page% + \beamer@partstartpage=\c@page + \beamer@sectionstartpage=\c@page + \beamer@subsectionstartpage=\c@page \setcounter{subsection}{0}% - \def\insertsection{}% - \def\insertsubsection{}% - \def\insertsubsubsection{}% - \def\insertsectionhead{}% - \def\insertsubsectionhead{}% - \def\insertsubsubsectionhead{}% + \protected\def\insertsection{}% + \protected\def\insertsubsection{}% + \protected\def\insertsubsubsection{}% + \protected\def\insertsectionhead{}% + \protected\def\insertsubsectionhead{}% + \protected\def\insertsubsubsectionhead{}% \def\lastsubsection{}% - \def\insertpart{\expandafter\hyperlink\partlink}% + \protected\def\insertpart{\expandafter\hyperlink\partlink}% \Hy@writebookmark{\the\c@section}{#1}{Outline\the\c@part}{1}{toc}% - \hyper@anchorstart{Outline\the\c@part}\hyper@anchorend% - \beamer@atbeginpart% + \hyper@anchorstart{Outline\the\c@part}\hyper@anchorend + \beamer@atbeginpart \fi% \beamer@resumemode}% \def\insertpart{} \def\partlinkshort{{Navigation1}{}} -\def\insertromanpartnumber{\@Roman\c@part} -\def\insertpartnumber{\@arabic\c@part} +\newrobustcmd*\insertromanpartnumber{\@Roman\c@part} +\newrobustcmd*\insertpartnumber{\@arabic\c@part} -\newcommand\insertshortpart[1][]{% - {% +\newrobustcmd*\insertshortpart[1][]{% + \begingroup \beamer@setupshort{#1}% \beamer@insertshort{\expandafter\hyperlink\partlinkshort}% - }} + \endgroup} \mode <all> { - \long\def\AtBeginPart#1{% + \newrobustcmd\AtBeginPart[1]{% \def\beamer@atbeginpart{#1}} \AtBeginPart{} } - \mode <article> { @@ -166,7 +163,6 @@ \fi } - % % Section Definitions % @@ -186,7 +182,7 @@ \mode<all>% \ifbeamer@inlecture \refstepcounter{section}% - \beamer@ifempty{#2}% + \ifblank{#2}% {\long\def\secname{#1}\long\def\lastsection{#1}}% {\global\advance\beamer@tocsectionnumber by 1\relax% \long\def\secname{#2}% @@ -195,7 +191,7 @@ {\the\beamer@tocsectionnumber}}}% {\let\\=\relax\xdef\sectionlink{{Navigation\the\c@page}{\noexpand\secname}}}% \beamer@tempcount=\c@page\advance\beamer@tempcount by -1% - \beamer@ifempty{#1}{}{% + \ifblank{#1}{}{% \addtocontents{nav}{\protect\headcommand{\protect\sectionentry{\the\c@section}{#1}{\the\c@page}{\secname}{\the\c@part}}}% \addtocontents{nav}{\protect\headcommand{\protect\beamer@sectionpages{\the\beamer@sectionstartpage}{\the\beamer@tempcount}}}% \addtocontents{nav}{\protect\headcommand{\protect\beamer@subsectionpages{\the\beamer@subsectionstartpage}{\the\beamer@tempcount}}}% @@ -213,7 +209,7 @@ \def\lastsubsection{}% \Hy@writebookmark{\the\c@section}{\secname}{Outline\the\c@part.\the\c@section}{2}{toc}% \hyper@anchorstart{Outline\the\c@part.\the\c@section}\hyper@anchorend% - \beamer@ifempty{#2}{\beamer@atbeginsections}{\beamer@atbeginsection}% + \ifblank{#2}{\beamer@atbeginsections}{\beamer@atbeginsection}% \fi% \beamer@resumemode}% \def\insertsection{} @@ -230,7 +226,7 @@ \mode <all> { - \def\AtBeginSection{\@ifnextchar[{\beamer@AtBeginSection}{\beamer@@AtBeginSection}} + \newrobustcmd*\AtBeginSection{\@ifnextchar[{\beamer@AtBeginSection}{\beamer@@AtBeginSection}} \long\def\beamer@@AtBeginSection#1{\beamer@AtBeginSection[{#1}]{#1}} \long\def\beamer@AtBeginSection[#1]#2{% \def\beamer@atbeginsection{#2}% @@ -260,14 +256,14 @@ \def\beamer@@subsection{\@ifnextchar*\beamer@@ssubsection\beamer@@@subsection} \long\def\beamer@@ssubsection*#1{\beamer@subsection[{#1}]{}} %\long\def\beamer@@ssubsection*#1{% -% \beamer@ifempty{#1}{\beamer@untitledsubsection}{\beamer@subsection[{#1}]{}}} +% \ifblank{#1}{\beamer@untitledsubsection}{\beamer@subsection[{#1}]{}}} \def\beamer@@@subsection#1{\beamer@subsection[{#1}]{#1}} \def\beamer@subsection[#1]#2{% \beamer@savemode% \mode<all>% \ifbeamer@inlecture% \refstepcounter{subsection}% - \beamer@ifempty{#2}{\long\def\subsecname{#1}\long\def\lastsubsection{#1}} + \ifblank{#2}{\long\def\subsecname{#1}\long\def\lastsubsection{#1}} {% \long\def\subsecname{#2}% \long\def\lastsubsection{#1}% @@ -288,7 +284,7 @@ \def\insertsubsubsectionhead{}% \Hy@writebookmark{\the\c@subsection}{#2}{Outline\the\c@part.\the\c@section.\the\c@subsection.\the\c@page}{3}{toc}% \hyper@anchorstart{Outline\the\c@part.\the\c@section.\the\c@subsection.\the\c@page}\hyper@anchorend% - \beamer@ifempty{#2}{\beamer@atbeginsubsections}{\beamer@atbeginsubsection}% + \ifblank{#2}{\beamer@atbeginsubsections}{\beamer@atbeginsubsection}% \fi% \beamer@resumemode} \def\insertsubsection{} @@ -304,7 +300,7 @@ \mode <all> { - \def\AtBeginSubsection{\@ifnextchar[{\beamer@AtBeginSubsection}{\beamer@@AtBeginSubsection}} + \newrobustcmd*\AtBeginSubsection{\@ifnextchar[{\beamer@AtBeginSubsection}{\beamer@@AtBeginSubsection}} \long\def\beamer@@AtBeginSubsection#1{\beamer@AtBeginSubsection[{#1}]{#1}} \long\def\beamer@AtBeginSubsection[#1]#2{% \def\beamer@atbeginsubsection{#2}% @@ -337,7 +333,7 @@ \mode<all>% \ifbeamer@inlecture% \refstepcounter{subsubsection}% - \beamer@ifempty{#2}{\long\def\subsubsecname{#1}\long\def\lastsubsubsection{#1}} + \ifblank{#2}{\long\def\subsubsecname{#1}\long\def\lastsubsubsection{#1}} {% \long\def\subsubsecname{#2}% \long\def\lastsubsubsection{#1}% @@ -351,7 +347,7 @@ \def\insertsubsubsectionhead{#1}% \Hy@writebookmark{\the\c@subsubsection}{#2}{Outline\the\c@part.\the\c@section.\the\c@subsection.\the\c@subsubsection.\the\c@page}{4}{toc}% \hyper@anchorstart{Outline\the\c@part.\the\c@section.\the\c@subsection.\the\c@subsubsection.\the\c@page}\hyper@anchorend% - \beamer@ifempty{#2}{\beamer@atbeginsubsubsections}{\beamer@atbeginsubsubsection}% + \ifblank{#2}{\beamer@atbeginsubsubsections}{\beamer@atbeginsubsubsection}% \fi% \beamer@resumemode} \def\insertsubsubsection{} @@ -360,7 +356,7 @@ \mode <all> { - \def\AtBeginSubsubsection{\@ifnextchar[{\beamer@AtBeginSubsubsection}{\beamer@@AtBeginSubsubsection}} + \newrobustcmd*\AtBeginSubsubsection{\@ifnextchar[{\beamer@AtBeginSubsubsection}{\beamer@@AtBeginSubsubsection}} \long\def\beamer@@AtBeginSubsubsection#1{\beamer@AtBeginSubsubsection[{#1}]{#1}} \long\def\beamer@AtBeginSubsubsection[#1]#2{% \def\beamer@atbeginsubsubsection{#2}% |