summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/hitszbeamer/hitszbeamer.dtx
blob: 48ef65c4a1c8cac8250f58e0e45190846e1459c9 (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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
% \iffalse meta-comment
% !TeX program  = XeLaTeX
% !TeX encoding = UTF-8
%
% Copyright (C) 2019--2020 by Jingxuan Yang <yanglatex2e@gmail.com>
%
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in:
%
% http://www.latex-project.org/lppl.txt
%
% and version 1.3c or later is part of all distributions of LaTeX
% version 2008/05/04 or later.

%<*internal>
\def\nameofplainTeX{plain}
\ifx\fmtname\nameofplainTeX\else
  \expandafter\begingroup
\fi
%</internal>
%<*install>

\input docstrip
\keepsilent
\askforoverwritefalse
\preamble

This is a generated file.

Copyright (C) 2019--\the\year by Jingxuan Yang <yanglatex2e@gmail.com>

This file may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3c
of this license or (at your option) any later version.
The latest version of this license is in:

http://www.latex-project.org/lppl.txt

and version 1.3c or later is part of all distributions of LaTeX
version 2008/05/04 or later.

To produce the documentation run the original source files ending with `.dtx'
through LaTeX.

\endpreamble
\postamble

This package consists of the file  hitszbeamer.dtx,
             and the derived files hitszbeamer.pdf,
                                   beamerthemehitszbeamer.sty,
                                   beamercolorthemehitszbeamer.sty,
                                   beamerinnerthemehitszbeamer.sty,
                                   beamerouterthemehitszbeamer.sty.

\endpostamble

\usedir{tex/latex/hitszbeamer}
\generate
  {
    \file{dtx-style.sty}{\from{\jobname.dtx}{dtx-style}}
  \file{beamerthemehitszbeamer.sty}{\from{\jobname.dtx}{hitszbeamer}}
	\file{beamercolorthemehitszbeamer.sty}{\from{\jobname.dtx}{hitszcolorstyle}}
	\file{beamerinnerthemehitszbeamer.sty}{\from{\jobname.dtx}{hitszinnerstyle}}
	\file{beamerouterthemehitszbeamer.sty}{\from{\jobname.dtx}{hitszouterstyle}}
  }

\Msg{***********************************************************}
\Msg{*}
\Msg{* To finish the installation you have to move the following}
\Msg{* files into a directory searched by TeX:}
\Msg{*}
\Msg{* The recommended directory is TEXMF/tex/latex/hitszbeamer}
\Msg{*}
\Msg{* \space\space dtx-style.sty}
\Msg{* \space\space beamerthemehitszbeamer.sty}
\Msg{* \space\space beamercolorthemehitszbeamer.sty}
\Msg{* \space\space beamerinnerthemehitszbeamer.sty}
\Msg{* \space\space beamerouterthemehitszbeamer.sty}
\Msg{*}
\Msg{* To produce the documentation run the files ending with}
\Msg{* `.dtx' through LaTeX.}
\Msg{*}
\Msg{* Happy TeXing!}
\Msg{***********************************************************}

%</install>
%<install>\endbatchfile
%<*internal>

\usedir{tex/latex/hitszbeamer}
\generate
  {
	\file{\jobname.ins}{\from{\jobname.dtx}{install}}
  }
\nopreamble\nopostamble

\ifx\fmtname\nameofplainTeX
  \expandafter\endbatchfile
\else
  \expandafter\endgroup
\fi
%</internal>
%
%<hitszbeamer|hitszcolorstyle|hitszinnerstyle|hitszouterstyle>\NeedsTeXFormat{LaTeX2e}
%<hitszbeamer>\ProvidesPackage{beamerthemehitszbeamer}
%<hitszcolorstyle>\ProvidesPackage{beamercolorthemehitszbeamer}
%<hitszinnerstyle>\ProvidesPackage{beamerinnerthemehitszbeamer}
%<hitszouterstyle>\ProvidesPackage{beamerouterthemehitszbeamer}
%<hitszbeamer|hitszcolorstyle|hitszinnerstyle|hitszouterstyle>[2020/03/17 v1.0.0 A Beamer Theme for Harbin Institute of Technology, ShenZhen (HITSZ)]
%
%<*driver>
\ProvidesFile{hitszbeamer.dtx}[2020/03/17 v1.0.0 A Beamer Theme for Harbin Institute of Technology, ShenZhen (HITSZ)]
\documentclass{ltxdoc}
\usepackage{dtx-style}

\EnableCrossrefs
\CodelineIndex
\RecordChanges

\begin{document}
  \DocInput{\jobname.dtx}
\end{document}
%</driver>
%
% \fi
%
% \CheckSum{0}
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
% \GetFileInfo{\jobname.dtx}
%
% \changes{v1.0.0}{2020/03/17}{Initially design hitszbeamer}
%
% \DoNotIndex{\begin,\end,\begingroup,\endgroup}
% \DoNotIndex{\ifx,\ifdim,\ifnum,\ifcase,\else,\or,\fi,\-}
% \DoNotIndex{\let,\def,\xdef,\newcommand,\renewcommand}
% \DoNotIndex{\expandafter,\csname,\endcsname,\relax,\protect}
% \DoNotIndex{\Huge,\huge,\LARGE,\Large,\large,\normalsize}
% \DoNotIndex{\small,\footnotesize,\scriptsize,\tiny}
% \DoNotIndex{\normalfont,\bfseries,\slshape,\interlinepenalty}
% \DoNotIndex{\hfil,\par,\hskip,\vskip,\vspace,\quad}
% \DoNotIndex{\centering,\raggedright}
% \DoNotIndex{\c@secnumdepth,\@startsection,\@setfontsize}
% \DoNotIndex{\ ,\@plus,\@minus,\p@,\z@,\@m,\@M,\@ne,\m@ne}
% \DoNotIndex{\@@par,\DeclareOperation,\RequirePackage,\LoadClass}
% \DoNotIndex{\AtBeginDocument,\AtEndDocument}
%
% \IndexPrologue{\section*{索~~~~引}}
% \GlossaryPrologue{\section*{修改记录}}
%
% \definecolor{beamer@headercolor}{RGB}{21,95,130}
% \title{\bfseries\color{beamer@headercolor}\hitszbeamer:哈尔滨工业大学(深圳)\\ Beamer主题}
% \author{{\Large\fangsong 杨敬轩}\\[5pt]\texttt{yanglatex2e@gmail.com}\\[5pt]\texttt{yangjingxuan@stu.hit.edu.cn}}
% \date{\fileversion\ (\filedate)}
%
% \maketitle\thispagestyle{empty}
%
% \vskip0.5cm
%
% \def\abstractname{\Large 摘\quad 要}
% \begin{abstract}\normalsize\vskip0.5cm
% \hitszbeamer\ 主题为作者在准备本科毕业设计中期答辩PPT时设计制作,
% 旨在帮助哈尔滨工业大学(深圳)学校师生进行学术交流或其他需要演示文稿活动时,方便的使用\LaTeX{}制作含有学校特色的演示文稿。
% \end{abstract}
%
% \vspace*{2em}
% \def\abstractname{\Large 免责声明}
% \begin{abstract}
% \noindent\normalsize
%  \begin{enumerate}
% \item 本模板的发布遵守 \href{http://www.latex-project.org/lppl.txt}{\LaTeX\ Project Public License 1.3c}以及其后的最新版本,使用前请认真阅读协议内
%   容。
%  \item 本主题为作者个人制作,使用仅供参考,任何由于使用本主题而引起的任何问题均与本主题作者无关。
%  \item 任何个人或组织以本模板为基础进行修改、扩展而生成的新的专用模板,请严格遵
%   守 \href{http://www.latex-project.org/lppl.txt}{\LaTeX\ Project Public License 1.3c} 协议以及其后的最新版本。由于违犯协议而引起的任何纠纷争端均与
%   本模板作者无关。
%  \end{enumerate}
% \end{abstract}
%
%
% \clearpage
% \pagestyle{fancy}
% \begin{multicols}{2}[
%   \setlength{\columnseprule}{.4pt}
%   \setlength{\columnsep}{18pt}]
%   \tableofcontents
% \end{multicols}
% \clearpage
%
% \section{模板介绍}
% \hitszbeamer\ (\textbf{H}arbin \textbf{I}nstitute of \textbf{T}echnology,
% \textbf{S}hen\textbf{Z}hen \LaTeX\
% \textbf{Beamer} Template)是为了帮助哈尔滨工业大学(深圳)师生撰写演示文稿而编写的\LaTeX{} Beamer 模板。
%
% 本文档将尽量完整的介绍模板的使用方法,如有不清楚之处可以参考示例文档或者根据
% 第~\ref{sec:howtoask} 节说明提问,有兴趣者可以联系作者参与完善此手册,非常欢迎窝工学子对本代码作出贡献。
%
% \section{安装}
% \label{sec:installation}
%
% \hitszbeamer\ 已经上传CTAN,已包含在TeXLive与MiKTeX发行版中。
% 安装方法:打开命令行,输入以下命令即可
% \begin{shell}
% $ tlmgr install hitszbeamer
% \end{shell}
% 阅读本说明文档可以使用以下命令:
% \begin{shell}
% $ texdoc hitszbeamer
% \end{shell}
%
% 如果要使用开发版,需自己下载,\hitszbeamer\ 相关链接:
% \begin{itemize}
% \item 主页:\href{https://github.com/YangLaTeX/hitszbeamer}{GitHub}
% \item 下载:\href{http://www.ctan.org/pkg/hitszbeamer}{CTAN}
% \end{itemize}
%
% \subsection{模板的组成}
% 下表列出了 \hitszbeamer{}\ 的主要文件及其功能介绍:
%
% \begin{longtable}{l|p{8cm}}
% \toprule
% {\heiti 文件(夹)} & {\heiti 功能描述}\\\midrule
% \endfirsthead
% \midrule
% {\heiti 文件(夹)} & {\heiti 功能描述}\\\midrule
% \endhead
% \endfoot
% \endlastfoot
% hitszbeamer.dtx & 主题宏包、说明文档以及主题驱动文件的混排文件\\
% main.tex & 主题测试文档\\
% figures/ & 主题相关矢量图存储文件夹\\
% makedoc.bat & 生成主题与用户手册脚本\\
% makebeamer.bat & 编译测试样例脚本\\
% makeclean.bat & 清理编译过程中间文件脚本\\
% makecleanall.bat & 清理编译过程中间文件与样式文件脚本\\
% Makefile & Linux \& Mac OS脚本\\
% \textbf{hitszbeamer.pdf} & 用户手册(本文档)\\
% \bottomrule
% \end{longtable}
% \textbf{注:}使用前,请仔细阅读\textbf{hitszbeamer.pdf},即本文档。
%
% \section{使用说明}
% \label{sec:usage}
% 本手册假定用户已经能处理一般的 \LaTeX\ 文档,并对 \BibTeX\ 有一定了解。如果
% 从来没有接触过 \TeX\ 和 \LaTeX,建议先学习相关的基础知识。
%
% \subsection{关于提问}
% \label{sec:howtoask}
% 按照优先级推荐提问的位置如下:
%
% \begin{itemize}
% \item QQ group: 1039392552
% \item Github Issues: \href{http://github.com/YangLaTeX/hitszbeamer/issues}{http://github.com/YangLaTeX/hitszbeamer/issues}
% \item Email: \href{mailto:yanglatex2e@gmail.com}{yanglatex2e@gmail.com}, \href{mailto:yangjingxuan@stu.hit.edu.cn}{yangjingxuan@stu.hit.edu.cn}
% \end{itemize}
%
% \subsection{示例文件}
% \label{sec:userguide}
% 模板核心文件有四个\file{*.sty},但是如果
% 没有示例文档用户会发现很难下手。所以推荐新用户从模板自带的示例文档入手,里面包
% 括了Beamer写作用到的所有命令及其使用方法,只需要用自己的内容进行相应替换就可以。
% 对于不清楚的命令可以查阅本手册。下面的例子描述了模板中章节的组织形式,来自于示
% 例文档,具体内容可以参考模板附带的 \file{main.tex}。
%
% \lstinputlisting[style=lstStyleLaTeX]{main.tex}
%
% \subsection{论文选项}
% \label{sec:option}
%
% 论文选项在\file{main.tex} 文件的开头描述,此处不赘述。
%
% \section{使用模板}
% \subsection{如何编译}\label{SubSec:HowToMake}
% \subsubsection{Windows用户}
% 主题项目里已经列出了脚本:
% 首先双击\file{makedoc.bat} 脚本,生成主题和用户手册;
% 然后双击\file{makebeamer.bat} 脚本生成测试 Beamer 文件预览;
% 最后双击\file{makeclean.bat} 清理编译过程的中间文件;
% 双击\file{makecleanall.bat}可以清除辅助文件以及样式文件。
%
% \subsubsection{Linux \& Mac OS用户}
% 首先运行下面命令生成主题和用户手册;
% \begin{shell}
% $ make doc
% \end{shell}
%
% 然后运行下面命令生成测试 Beamer 文件预览;
% \begin{shell}
% $ make beamer
% \end{shell}
%
% 最后运行下面命令清理编译过程的中间文件。
% \begin{shell}
% $ make clean
% \end{shell}
%
% 若运行下面命令则清理编译过程的中间文件以及所有样式文件。
% \begin{shell}
% $ make cleanall
% \end{shell}
%
% \section{致谢}
% \label{sec:thanks}
% 感谢\href{https://github.com/StickCui/XDUstyle-Beamer-Theme}{XDUstyle}、\href{https://github.com/tl3shi/THUBeamer}{thubeamer}模板的作者,本模板基于他们改编而来!
%
% 欢迎各位到 \href{http://github.com/YangLaTeX/hitszbeamer/}{\hitszbeamer\ Github 主页}贡献!
%
% \StopEventually{\PrintChanges\PrintIndex}
% \clearpage
%
% \section{实现细节}
%
% \subsection{主题主文件部分}
% 导入必要宏包
%    \begin{macrocode}
%<*hitszbeamer>
\def\hitszbeamer{\textsc{Hitsz}\-\textsc{Beamer}}
\RequirePackage{tikz}
\usetikzlibrary{external}
\RequirePackage{pgf}
\RequirePackage{multicol}
\RequirePackage{multimedia}
\RequirePackage{calc}
\RequirePackage[UTF8]{ctex}
\RequirePackage[square,sort&compress]{natbib}
%    \end{macrocode}
%
% 主题选项
%    \begin{macrocode}
\DeclareOptionBeamer{hitszred}{%
  \PassOptionsToPackage{hitszred}{beamercolorthemehitszbeamer}
  \PassOptionsToPackage{hitszred}{beamerinnerthemehitszbeamer}
  \PassOptionsToPackage{hitszred}{beamerouterthemehitszbeamer}
}
\DeclareOptionBeamer{hitszblue}{%
  \PassOptionsToPackage{hitszblue}{beamercolorthemehitszbeamer}
  \PassOptionsToPackage{hitszblue}{beamerinnerthemehitszbeamer}
  \PassOptionsToPackage{hitszblue}{beamerouterthemehitszbeamer}
}
\ProcessOptionsBeamer
%    \end{macrocode}
%
% 特殊设置
%    \begin{macrocode}
\mode<presentation>
{
  \useinnertheme{hitszbeamer}
  \useoutertheme{hitszbeamer}
  \usecolortheme{hitszbeamer}
}

\mode<all>
%</hitszbeamer>
%    \end{macrocode}
% \subsection{主题配色文件部分}
%
% 参数设置
%    \begin{macrocode}
%<*hitszcolorstyle>
\DeclareOptionBeamer{hitszred}{\def\beamer@hitszcolor{hitszred}}
\DeclareOptionBeamer{hitszblue}{\def\beamer@hitszcolor{hitszblue}}
\ProcessOptionsBeamer

\def\beamer@hitszcolorred{hitszred}
%    \end{macrocode}
%
% 颜色设置。
%    \begin{macrocode}
\mode<presentation>
{
  \ifx\beamer@hitszcolor\beamer@hitszcolorred%
    \definecolor{beamer@headercolor}{RGB}{175,33,37}
  \else
    \definecolor{beamer@headercolor}{rgb}{0.0,0.415,0.682}
  \fi

  \setbeamercolor{title}{fg=white,bg=beamer@headercolor}
  \setbeamercolor{frametitle}{fg=beamer@headercolor,bg=beamer@headercolor!30}
  \setbeamerfont{frametitle}{size=\large}

  \setbeamercolor{secondbottomline}{fg=white,bg=beamer@headercolor}
  \setbeamercolor{firstbottomline}{fg=white,bg=beamer@headercolor!80}
  \setbeamercolor{block title}{fg=white,bg=beamer@headercolor}
  \setbeamercolor{block title example}{%
    use={normal text,example text},fg=white,bg=example text.fg!75!green
  }
  \setbeamercolor{fine separation line}{}
  \setbeamercolor{item projected}{fg=white}
  \setbeamercolor{palette sidebar primary}{use=normal text,fg=normal text.fg}
  \setbeamercolor{palette sidebar quaternary}{use=structure,fg=structure.fg}
  \setbeamercolor{palette sidebar secondary}{use=structure,fg=structure.fg}
  \setbeamercolor{palette sidebar tertiary}{use=normal text,fg=normal text.fg}
  \setbeamercolor{section in sidebar}{fg=brown}
  \setbeamercolor{section in sidebar shaded}{fg=gray}
  \setbeamercolor{separation line}{}
  \setbeamercolor{sidebar}{bg=beamer@headercolor!30}
  \setbeamercolor{sidebar}{parent=palette primary}
  \setbeamercolor{structure}{fg=beamer@headercolor}
  \setbeamercolor{subsection in sidebar}{fg=brown}
  \setbeamercolor{subsection in sidebar shaded}{fg=gray}
  \setbeamercolor{logo}{bg=beamer@headercolor!50}
}

\mode<all>
%</hitszcolorstyle>
%    \end{macrocode}
% \subsection{内部主题文件部分}
%
% 必要宏包
%    \begin{macrocode}
%<*hitszinnerstyle>
\RequirePackage{tikz}
\usetikzlibrary{external}
%    \end{macrocode}
%
% 参数设置
%    \begin{macrocode}
\DeclareOptionBeamer{hitszred}{\def\beamer@hitszcolor{hitszred}}
\DeclareOptionBeamer{hitszblue}{\def\beamer@hitszcolor{hitszblue}}
\ProcessOptionsBeamer

\newlength{\beamer@plainpagewidth}
\def\beamer@hitszcolorblue{hitszblue}
%    \end{macrocode}
%
% 特殊设置
%    \begin{macrocode}
\mode<presentation>

\usefonttheme{structurebold}
\setbeamertemplate{caption}[numbered]{}
\useinnertheme[shadow]{rounded}

\newcommand\varparallel{%
  \mathrel{%
    \text{%
      \tikz[baseline] \draw (0em,-0.3ex) -- (.4em,1.7ex) (.2em,-0.3ex) -- (.6em,1.7ex);
    }%
  }%
}

\makeatletter
\newcommand{\frameofframes}{/}
\newcommand{\setframeofframes}[1]{
  \renewcommand{\frameofframes}{#1}
}
\setbeamertemplate{footline}{%
  \begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot}
  \end{beamercolorbox}
  \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
    leftskip=.3cm,rightskip=.3cm plus1fil]{firstbottomline}%
    \leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor}%
    \hfill%
    {\usebeamerfont{institute in head/foot}%
    \usebeamercolor[fg]{frame number}%
      \insertshortinstitute
    }%
  \end{beamercolorbox}%
  \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
    leftskip=.3cm,rightskip=.3cm plus1fil]{secondbottomline}%
    {\usebeamerfont{title in head/foot}\insertshorttitle}%
    \hfill%
    {\usebeamerfont{frame number}\usebeamercolor[fg]{frame number}\insertframenumber~\frameofframes~\inserttotalframenumber}
  \end{beamercolorbox}%
  \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}
  \end{beamercolorbox}
}
\makeatother

\mode<all>
%</hitszinnerstyle>
%    \end{macrocode}
% \subsection{外部主题文件部分}
%
%    \begin{macrocode}
%<*hitszouterstyle>
%    \end{macrocode}
%
% 参数设置
%    \begin{macrocode}
\DeclareOptionBeamer{hitszred}{\def\beamer@hitszcolor{hitszred}}
\DeclareOptionBeamer{hitszblue}{\def\beamer@hitszcolor{hitszblue}}
\ProcessOptionsBeamer

\mode<presentation>

% 插入透明的logo
\pgfdeclaremask{figmask}{figures/hitlogo-mask.jpg}
\pgfdeclareimage[mask=figmask,width=0.17\linewidth,interpolate=true]{hitlogomasked}{figures/hitlogo.jpg}
\logo{\pgfuseimage{hitlogomasked}}

% 取消导航符号
\setbeamertemplate{navigation symbols}{}

% 使用<sidebar>主题
\useoutertheme[width=0.17\linewidth]{sidebar}

\mode<all>
%</hitszouterstyle>
%    \end{macrocode}
%
% \iffalse
%    \begin{macrocode}
%<*dtx-style>
\ProvidesPackage{dtx-style}
\RequirePackage{hypdoc}
\RequirePackage[UTF8,scheme=chinese,fontset=windowsnew]{ctex}
\RequirePackage{newpxtext}
\RequirePackage{newpxmath}
\RequirePackage[
  top=2.5cm, bottom=2.5cm,
  left=3cm, right=2cm,
  headsep=8mm]{geometry}
\RequirePackage{array,longtable,booktabs}
\RequirePackage{listings}
\RequirePackage{fancyhdr}
\RequirePackage{xcolor}
\RequirePackage{enumitem}
\RequirePackage{etoolbox}
\RequirePackage{metalogo}
\RequirePackage{hyperref}

\colorlet{hitsz@macro}{blue!60!black}
\colorlet{hitsz@env}{blue!70!black}
\colorlet{hitsz@option}{purple}
\patchcmd{\PrintMacroName}{\MacroFont}{\MacroFont\bfseries\color{hitsz@macro}}{}{}
\patchcmd{\PrintDescribeMacro}{\MacroFont}{\MacroFont\bfseries\color{hitsz@macro}}{}{}
\patchcmd{\PrintDescribeEnv}{\MacroFont}{\MacroFont\bfseries\color{hitsz@env}}{}{}
\patchcmd{\PrintEnvName}{\MacroFont}{\MacroFont\bfseries\color{hitsz@env}}{}{}

\def\DescribeOption{%
  \leavevmode\@bsphack\begingroup\MakePrivateLetters%
  \Describe@Option}
\def\Describe@Option#1{\endgroup
  \marginpar{\raggedleft\PrintDescribeOption{#1}}%
  \hitsz@special@index{option}{#1}\@esphack\ignorespaces}
\def\PrintDescribeOption#1{\strut \MacroFont\bfseries\sffamily\color{hitsz@option} #1\ }
\def\hitsz@special@index#1#2{\@bsphack
  \begingroup
    \HD@target
    \let\HDorg@encapchar\encapchar
    \edef\encapchar usage{%
      \HDorg@encapchar hdclindex{\the\c@HD@hypercount}{usage}%
    }%
    \index{#2\actualchar{\string\ttfamily\space#2}
           (#1)\encapchar usage}%
    \index{#1:\levelchar#2\actualchar
           {\string\ttfamily\space#2}\encapchar usage}%
  \endgroup
  \@esphack}

\lstdefinestyle{lstStyleBase}{%
   basicstyle=\small\ttfamily,
   aboveskip=\medskipamount,
   belowskip=\medskipamount,
   lineskip=0pt,
   boxpos=c,
   showlines=false,
   extendedchars=true,
   upquote=true,
   tabsize=2,
   showtabs=false,
   showspaces=false,
   showstringspaces=false,
   numbers=none,
   linewidth=\linewidth,
   xleftmargin=4pt,
   xrightmargin=0pt,
   resetmargins=false,
   breaklines=true,
   breakatwhitespace=false,
   breakindent=0pt,
   breakautoindent=true,
   columns=flexible,
   keepspaces=true,
   gobble=2,
   framesep=3pt,
   rulesep=1pt,
   framerule=1pt,
   backgroundcolor=\color{gray!5},
   stringstyle=\color{green!40!black!100},
   keywordstyle=\bfseries\color{blue!50!black},
   commentstyle=\slshape\color{black!60}}

\lstdefinestyle{lstStyleShell}{%
   style=lstStyleBase,
   frame=l,
   rulecolor=\color{purple},
   language=bash}

\definecolor{beamer@headercolor}{RGB}{21,95,130}
\lstdefinestyle{lstStyleLaTeX}{%
   style=lstStyleBase,
   frame=l,
   rulecolor=\color{beamer@headercolor},
   language=[LaTeX]TeX}

\lstnewenvironment{latex}{\lstset{style=lstStyleLaTeX}}{}
\lstnewenvironment{shell}{\lstset{style=lstStyleShell}}{}

\setlist{nosep}

\DeclareDocumentCommand{\option}{m}{\textsf{#1}}
\DeclareDocumentCommand{\env}{m}{\texttt{#1}}
\DeclareDocumentCommand{\pkg}{s m}{%
  \texttt{#2}\IfBooleanF#1{\hitsz@special@index{package}{#2}}}
\DeclareDocumentCommand{\file}{s m}{%
  \texttt{#2}\IfBooleanF#1{\hitsz@special@index{file}{#2}}}
\newcommand{\myentry}[1]{%
  \marginpar{\small\raggedleft\color{purple}\bfseries\strut #1}}
\newcommand{\note}[2][Note]{{%
  \color{magenta}{\bfseries #1}\emph{#2}}}
\def\hitszbeamer{\textsc{Hitsz}\-\textsc{Beamer}}
\def\hitsz{哈尔滨工业大学(深圳)}
%</dtx-style>
%    \end{macrocode}
% \fi
%
% \Finale
%
\endinput
% \iffalse
%  Local Variables:
%  mode: doctex
%  TeX-master: t
%  End:
% \fi