diff options
Diffstat (limited to 'macros/latex/contrib/stex/tex/etc/beamerthemesTeX.sty')
-rw-r--r-- | macros/latex/contrib/stex/tex/etc/beamerthemesTeX.sty | 94 |
1 files changed, 83 insertions, 11 deletions
diff --git a/macros/latex/contrib/stex/tex/etc/beamerthemesTeX.sty b/macros/latex/contrib/stex/tex/etc/beamerthemesTeX.sty index d7b861086a..85fd253eeb 100644 --- a/macros/latex/contrib/stex/tex/etc/beamerthemesTeX.sty +++ b/macros/latex/contrib/stex/tex/etc/beamerthemesTeX.sty @@ -1,25 +1,58 @@ % Beamer sTeX slide theme; % Copyright (c) 20 Michael Kohlhase <michael.kohlhase@fau.de>. -\ProvidesPackage{beamertheme-sTeX} +\ProvidesPackage{beamerthemesTeX} \typeout{Beamer sTeX theme} \RequirePackage{xspace} +\RequirePackage{xcolor} +\RequirePackage{stex} -% General appearance of theorems, like "ams style", but without the block env. -\setbeamertemplate{theorem begin} -{% - \inserttheoremheadfont - \inserttheoremname - \inserttheoremnumber - \ifx \inserttheoremaddition \empty \else\ (\inserttheoremaddition)\fi - \inserttheorempunctuation\xspace - \inserttheorembodyfont +\ExplSyntaxOn +\protected\def\stexbeamerthm#1#2#3#4#5#6#7#8{ + \newcounter{#1} + \tl_if_empty:nF{#4}{ + \tl_set:cn{the#1}{ + \use:c{the#4}.\arabic{#1} + } + } + \tl_set:cn{#1autorefname}{#6} + + \newenvironment{#1}{ + \ifhmode\par\fi + + \tl_if_empty:nF{#5}{ + \setcounter{#1}{\value{#5}} + \stepcounter{#5} + } + \refstepcounter{#1} + \noindent#7{ + #6~\use:c{the#1} + \tl_if_empty:cF{s#2title}{ + {}~(\csname s#2title\endcsname) + }. + } + #8 + }{\par} + \csname stexpatch#2\endcsname[#3]{\begin{#1}}{\end{#1}} } -\setbeamertemplate{theorem end}{} +\ExplSyntaxOff + +\stexbeamerthm{theorem}{assertion}{theorem}{section}{}{Theorem}\textbf\itshape +\stexbeamerthm{observation}{assertion}{observation}{section}{theorem}{Observation}\textbf\itshape +\stexbeamerthm{corollary}{assertion}{corollary}{section}{theorem}{Corollary}\textbf\itshape +\stexbeamerthm{lemma}{assertion}{lemma}{section}{theorem}{Lemma}\textbf\itshape +\stexbeamerthm{axiom}{assertion}{axiom}{section}{theorem}{Axiom}\textbf\itshape +\stexbeamerthm{remark}{assertion}{remark}{section}{theorem}{Remark}\emph{} +\stexpatchparagraph[remark]{\begin{remark}}{\end{remark}} +\stexbeamerthm{example}{example}{}{section}{theorem}{Example}\textbf{} +\stexbeamerthm{definition}{definition}{}{section}{theorem}{Definition}\textbf{} + % THEME \mode <presentation> +\sffamily + \ifcsname slidelogo\endcsname\else \newsavebox\slidelogo \sbox\slidelogo{\sTeX} @@ -64,3 +97,42 @@ \setlength\leftmarginii{1em} \setlength\leftmarginiii{1em} \providecommand{\vstretch}[1]{\vspace*{\stretch{#1}}} + +%% set the colors for sTeX content highlighting + +\def\compemph#1{\ifcsname textcolor\endcsname\textcolor{SteelBlue}{#1}\else#1\fi} +\def\symrefemph#1{\ifcsname textcolor\endcsname\textcolor{SteelBlue}{#1}\else#1\fi} +\def\defemph#1{\ifcsname textcolor\endcsname\textcolor{magenta}{#1}\else\textbf{#1}\fi} +\def\varemph#1{\ifcsname textcolor\endcsname\textcolor{gray}{#1}\else#1\fi} +\def\titleemph#1{\ifcsname textcolor\endcsname\textcolor{blue}{#1}\else\textbf{#1}\fi} + +%% set PDF tooltips +\RequirePackage{pdfcomment} +\protected\def\compemph@uri#1#2{% + \pdftooltip{% + \srefsymuri{#2}{\compemph{#1}}% + }{% + URI:~\detokenize{#2}% + }% +} +\protected\def\symrefemph@uri#1#2{% + \pdftooltip{% + \srefsymuri{#2}{\symrefemph{#1}}% + }{% + URI:~\detokenize{#2}% + }% +} +\protected\def\defemph@uri#1#2{% + \pdftooltip{% + \defemph{#1}% + }{% + URI:~\detokenize{#2}% + }% +} +\protected\def\varemph@uri#1#2{% + \pdftooltip{% + \varemph{#1}% + }{% + Variable~\detokenize{#2}% + }% +}
\ No newline at end of file |