Debian Codegraph @

texmf-dist/source/latex/bithesis/bithesis-beamer.dtx

raw
1 % \subsection{bitbeamer.cls 文档类}
2 %
3 % \subsubsection{l3keys 接口键值对定义}
4 %
5 % 定义 |bitbeamer| 文档类的接口键值对。
6 % \begin{macrocode}
7 % Declare variables used by keys
8 \tl_new:N \l_bit_framelogo_tl
9 % Declare keys
10 \keys_define:nn { bitbeamer }
11 {
12 titlegraphic .tl_set:N = \l_bit_titlegraphic_tl,
13 framelogo .tl_set:N = \l_bit_framelogo_tl,
14 }
15 % \end{macrocode}
16 %
17 % 在宏加载时,处理 |bitbeamer| 中的值。使得 |bitbeamer|
18 % 宏包的模板选项可以在宏加载时生效。
19 % \begin{macrocode}
20 \ProcessKeysOptions { bitbeamer }
21 % \end{macrocode}
22 %
23 % Pass every option not explicitly defined to `ctexbeamer`.
24 % \begin{macrocode}
25 \DeclareOption*{
26 \PassOptionsToClass{\CurrentOption}{ctexbeamer}
27 }
28 % \end{macrocode}
29 %
30 % Executes the code for each option.
31 % Load.
32 % \begin{macrocode}
33 \ProcessOptions\relax
34 \LoadClass{ctexbeamer}
35 % \end{macrocode}
36 %
37 % \subsubsection{定义模板类样式}
38 %
39 % 加载所需的宏包。
40 % \begin{macrocode}
41 \RequirePackage{xeCJKfntef}
42 \RequirePackage{tikz}
43 % \end{macrocode}
44 %
45 % 设置主题与主题色。
46 % \begin{macrocode}
47 \usetheme{Madrid}
48 \definecolor{bitred}{HTML}{A13E0B}
49 \definecolor{bitgreen}{HTML}{0A8F30}
50 \definecolor{bitdarkgreen}{HTML}{005B30}
51 \colorlet{beamer@blendedblue}{bitdarkgreen}
52 % \end{macrocode}
53 %
54 %
55 % \begin{macro}{\@@_CJKhl:nn}
56 % 高亮中文字符。
57 % \begin{macrocode}
58 \cs_new:Npn \@@_CJKhl:nn #1 #2
59 { \CJKsout*[thickness=2.5ex, format=\color{#1}]{#2} }
60 % \end{macrocode}
61 % \end{macro}
62 %
63 % Set header if logo path is provided.
64 % \begin{macrocode}
65 \tl_if_empty:NF \l_bit_titlegraphic_tl {
66 % BIT Logo
67 \titlegraphic{
68 \includegraphics[width=2cm]{\l_bit_titlegraphic_tl}
69 }
70 }
71 % \end{macrocode}
72 %
73 % Set title logo if logo path is provided.
74 % \begin{macrocode}
75 \tl_if_empty:NF \l_bit_framelogo_tl {
76 \addtobeamertemplate{frametitle}{}{%
77 \begin{tikzpicture}[remember~picture,overlay]
78 \node[anchor=north~east,yshift=2pt] at (current~page.north~east)
79 {\includegraphics[height=0.8cm]{\tl_use:N \l_bit_framelogo_tl}};
80 \end{tikzpicture}
81 }
82 }
83 % \end{macrocode}
84 %
85 % \subsubsection{定义用户接口}
86 %
87 % \begin{macrocode}
88 \cs_new_eq:NN \CJKhl \@@_CJKhl:nn
89 % \end{macrocode}