diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/beamer/beamerbasetheorems.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/beamer/beamerbasetheorems.sty | 139 |
1 files changed, 62 insertions, 77 deletions
diff --git a/Master/texmf-dist/tex/latex/beamer/beamerbasetheorems.sty b/Master/texmf-dist/tex/latex/beamer/beamerbasetheorems.sty index 71354e88382..f7703558c6d 100644 --- a/Master/texmf-dist/tex/latex/beamer/beamerbasetheorems.sty +++ b/Master/texmf-dist/tex/latex/beamer/beamerbasetheorems.sty @@ -1,4 +1,5 @@ -% Copyright 2007 by Till Tantau +% Copyright 2003--2007 by Till Tantau +% Copyright 2010 by Vedran Mileti\'c % % This file may be distributed and/or modified % @@ -7,77 +8,67 @@ % % See the file doc/licenses/LICENSE for more details. -\ProvidesPackageRCS $Header: /cvsroot/latex-beamer/latex-beamer/base/beamerbasetheorems.sty,v 1.10 2007/01/28 20:48:21 tantau Exp $ - -\mode -<all> - -\IfFileExists{translator.sty}{ - \RequirePackage{translator} - \usedictionary{translator-theorem-dictionary} -}{} - -\providecommand\translate[2][]{#2} +\ProvidesPackageRCS $Header: /home/vedran/bitbucket/beamer/base/beamerbasetheorems.sty,v 7e7cc5e53e9d 2010/06/06 14:18:42 rivanvx $ \mode <presentation> \ifbeamer@ams -\RequirePackage{amsmath} -\RequirePackage{amsthm} - -% For old versions of amsthm -\providecommand\thm@space@setup{} -\providecommand\pushQED[1]{\def\beamer@qed{#1}} -\providecommand\popQED{\beamer@qed} -\providecommand\qedhere{\qed} - -% Redfine certain amsthm internals: -\def\@thm#1#2#3{% - \ifhmode\unskip\unskip\par\fi - \normalfont - \let\thmheadnl\relax - \let\thm@swap\@gobble - \thm@headpunct{.}% add period after heading - \thm@space@setup - #1% style overrides - \def\inserttheoremname{#3} - \def\inserttheorempunctuation{\the\thm@headpunct} - \def\@tempa{#2}% - \ifx\@empty\@tempa - \def\inserttheoremnumber{} - \else - \refstepcounter{#2}% - \expandafter\def\expandafter\inserttheoremnumber\expandafter{ \csname the#2\endcsname} - \fi - \beamer@begintheorem% -} - -\let\beamer@origxthm=\@xthm -\def\@xthm#1{\resetcounteronoverlays{#1}\beamer@origxthm{#1}} - -\def\inserttheoremheadfont{\the\thm@headfont} -\def\inserttheoremblockenv{block} - -\def\th@example{% - \normalfont % body font - \def\inserttheoremblockenv{exampleblock} -} - -\newcommand<>\beamer@begintheorem[1][]{% - \beamer@ifempty{#1} - {\def\inserttheoremaddition{}} - {\def\inserttheoremaddition{#1}} - \usebeamertemplate{theorem begin}#2} -\def\@endtheorem{\usebeamertemplate{theorem end}} - -\renewenvironment<>{proof}[1][\proofname]{% - \par - \def\insertproofname{#1\@addpunct{.}}% - \pushQED{\qed} - \usebeamertemplate{proof begin}#2} -{\popQED\usebeamertemplate{proof end}} + \RequirePackage{amsmath} + \RequirePackage{amsthm} + + % For old versions of amsthm + \providecommand\thm@space@setup{} + \providecommand\pushQED[1]{\def\beamer@qed{#1}} + \providecommand\popQED{\beamer@qed} + \providecommand\qedhere{\qed} + + % Redfine certain amsthm internals: + \def\@thm#1#2#3{% + \ifhmode\unskip\unskip\par\fi + \normalfont + \let\thmheadnl\relax + \let\thm@swap\@gobble + \thm@headpunct{.}% add period after heading + \thm@space@setup + #1% style overrides + \def\inserttheoremname{#3} + \def\inserttheorempunctuation{\the\thm@headpunct} + \def\@tempa{#2}% + \ifx\@empty\@tempa + \def\inserttheoremnumber{} + \else + \refstepcounter{#2}% + \expandafter\def\expandafter\inserttheoremnumber\expandafter{ \csname the#2\endcsname} + \fi + \beamer@begintheorem% + } + + \let\beamer@origxthm=\@xthm + \def\@xthm#1{\resetcounteronoverlays{#1}\beamer@origxthm{#1}} + + \def\inserttheoremheadfont{\the\thm@headfont} + \def\inserttheoremblockenv{block} + + \def\th@example{% + \normalfont % body font + \def\inserttheoremblockenv{exampleblock} + } + + \newcommand<>\beamer@begintheorem[1][]{% + \beamer@ifempty{#1} + {\def\inserttheoremaddition{}} + {\def\inserttheoremaddition{#1}} + \usebeamertemplate{theorem begin}#2} + \def\@endtheorem{\usebeamertemplate{theorem end}} + + \renewenvironment<>{proof}[1][\proofname]{% + \par + \def\insertproofname{#1\@addpunct{.}}% + \pushQED{\qed} + \usebeamertemplate{proof begin}#2} + {\popQED\usebeamertemplate{proof end}} \fi @@ -92,13 +83,14 @@ \RequirePackage{amsthm} \renewenvironment<>{proof}[1][\proofname] - {\begin{actionenv}#2\begin{originalproof}[#1]}{\end{originalproof}\end{actionenv}} + {\begin{actionenv}#2\begin{originalproof}[{#1}]}{\end{originalproof}\end{actionenv}} % Make new theorem overlay-specification-aware \let\beamer@origthm=\@thm \def\@thm#1#2#3{\def\beamer@store{{#1}{#2}{#3}}\beamer@readspec} + \def\beamer@storeaction{\begin{actionenv}} \newcommand<>\beamer@readspec[1][]{\def\beamer@storeaction{\begin{actionenv}#2}% - \expandafter\beamer@origthm\beamer@store[#1]} + \expandafter\beamer@origthm\beamer@store[{#1}]} \let\beamer@origbegintheorem=\@begintheorem \def\@begintheorem{\beamer@storeaction\beamer@origbegintheorem} @@ -133,12 +125,12 @@ \theoremstyle{definition} \newtheorem{definition}[theorem]{\translate{Definition}} \newtheorem{definitions}[theorem]{\translate{Definitions}} - + \theoremstyle{example} \newtheorem{example}[theorem]{\translate{Example}} \newtheorem{examples}[theorem]{\translate{Examples}} - + % Compatibility \newtheorem{Beispiel}[theorem]{Beispiel} \newtheorem{Beispiele}[theorem]{Beispiele} @@ -161,10 +153,3 @@ \mode <all> -% End in common mode - - -%%% Local Variables: -%%% mode: latex -%%% TeX-master: "~/texmf/tex/latex/beamer/examples/beamerexample1.tex" -%%% End: |