summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/stex/tex/etc/beamerthemesTeX.sty
blob: 85fd253eebe4675b350828f3077d57a17cf5b089 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
% Beamer sTeX slide theme;
% Copyright (c) 20 Michael Kohlhase <michael.kohlhase@fau.de>.
\ProvidesPackage{beamerthemesTeX}
\typeout{Beamer sTeX theme}
\RequirePackage{xspace}
\RequirePackage{xcolor}
\RequirePackage{stex}

\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}}
}
\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}
\fi

%% Logo images
\pgfdeclareimage[height=2ex]{instlogo}{sTeX-logo}
\pgfdeclareimage[height=2ex]{cclogo}{stex-cc_somerights}

%% A simple frame title with a long rule under it. 
\setbeamertemplate{frametitle}{%
    \usebeamerfont{frametitle}\insertframetitle\strut%
    \vskip-.1\baselineskip%
    \leaders\vrule width \paperwidth\vskip0.4pt%
    \vskip0pt%
    \nointerlineskip
}

%% A Footer line with a Institution and CC logos
\setbeamertemplate{footline}[text line]{%
  \usebeamercolor[fg]{titlelike}
  \usebox\slidelogo\hspace*{1cm}\insertshortauthor: \insertshorttitle\hfill{}%
  \insertframenumber\hfill\insertshortdate\hspace*{1cm}\pgfuseimage{cclogo}%
  }

%% Turn off the navigation symbols
\setbeamertemplate{navigation symbols}{}

%% Inner theme
\useinnertheme{default}
%\setbeamertemplate{enumerate item}{(\alph{enumi})}
%\setbeamertemplate{enumerate subitem}{(\roman{enumii})}

\mode
<all>

%% Redefine various margin sizes 
\setbeamersize{text margin left=3mm}
\setbeamersize{text margin right=3mm}
\setbeamersize{description width=0.57cm}
\setlength\leftmargini{1em}
\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}%
  }%
}