Debian Codegraph @

texmf-dist/source/latex/hitszbeamer/hitszbeamer.dtx

raw
1 % \iffalse meta-comment
2 % !TeX program = XeLaTeX
3 % !TeX encoding = UTF-8
4 %
5 % Copyright (C) 2019--2020 by Jingxuan Yang <[email protected]>
6 %
7 % This file may be distributed and/or modified under the
8 % conditions of the LaTeX Project Public License, either version 1.3c
9 % of this license or (at your option) any later version.
10 % The latest version of this license is in:
11 %
12 % http://www.latex-project.org/lppl.txt
13 %
14 % and version 1.3c or later is part of all distributions of LaTeX
15 % version 2008/05/04 or later.
16
17 %<*internal>
18 \def\nameofplainTeX{plain}
19 \ifx\fmtname\nameofplainTeX\else
20 \expandafter\begingroup
21 \fi
22 %</internal>
23 %<*install>
24
25 \input docstrip
26 \keepsilent
27 \askforoverwritefalse
28 \preamble
29
30 This is a generated file.
31
32 Copyright (C) 2019--\the\year by Jingxuan Yang <[email protected]>
33
34 This file may be distributed and/or modified under the
35 conditions of the LaTeX Project Public License, either version 1.3c
36 of this license or (at your option) any later version.
37 The latest version of this license is in:
38
39 http://www.latex-project.org/lppl.txt
40
41 and version 1.3c or later is part of all distributions of LaTeX
42 version 2008/05/04 or later.
43
44 To produce the documentation run the original source files ending with `.dtx'
45 through LaTeX.
46
47 \endpreamble
48 \postamble
49
50 This package consists of the file hitszbeamer.dtx,
51 and the derived files hitszbeamer.pdf,
52 beamerthemehitszbeamer.sty,
53 beamercolorthemehitszbeamer.sty,
54 beamerinnerthemehitszbeamer.sty,
55 beamerouterthemehitszbeamer.sty.
56
57 \endpostamble
58
59 \usedir{tex/latex/hitszbeamer}
60 \generate
61 {
62 \file{dtx-style.sty}{\from{\jobname.dtx}{dtx-style}}
63 \file{beamerthemehitszbeamer.sty}{\from{\jobname.dtx}{hitszbeamer}}
64 \file{beamercolorthemehitszbeamer.sty}{\from{\jobname.dtx}{hitszcolorstyle}}
65 \file{beamerinnerthemehitszbeamer.sty}{\from{\jobname.dtx}{hitszinnerstyle}}
66 \file{beamerouterthemehitszbeamer.sty}{\from{\jobname.dtx}{hitszouterstyle}}
67 }
68
69 \Msg{***********************************************************}
70 \Msg{*}
71 \Msg{* To finish the installation you have to move the following}
72 \Msg{* files into a directory searched by TeX:}
73 \Msg{*}
74 \Msg{* The recommended directory is TEXMF/tex/latex/hitszbeamer}
75 \Msg{*}
76 \Msg{* \space\space dtx-style.sty}
77 \Msg{* \space\space beamerthemehitszbeamer.sty}
78 \Msg{* \space\space beamercolorthemehitszbeamer.sty}
79 \Msg{* \space\space beamerinnerthemehitszbeamer.sty}
80 \Msg{* \space\space beamerouterthemehitszbeamer.sty}
81 \Msg{*}
82 \Msg{* To produce the documentation run the files ending with}
83 \Msg{* `.dtx' through LaTeX.}
84 \Msg{*}
85 \Msg{* Happy TeXing!}
86 \Msg{***********************************************************}
87
88 %</install>
89 %<install>\endbatchfile
90 %<*internal>
91
92 \usedir{tex/latex/hitszbeamer}
93 \generate
94 {
95 \file{\jobname.ins}{\from{\jobname.dtx}{install}}
96 }
97 \nopreamble\nopostamble
98
99 \ifx\fmtname\nameofplainTeX
100 \expandafter\endbatchfile
101 \else
102 \expandafter\endgroup
103 \fi
104 %</internal>
105 %
106 %<hitszbeamer|hitszcolorstyle|hitszinnerstyle|hitszouterstyle>\NeedsTeXFormat{LaTeX2e}
107 %<hitszbeamer>\ProvidesPackage{beamerthemehitszbeamer}
108 %<hitszcolorstyle>\ProvidesPackage{beamercolorthemehitszbeamer}
109 %<hitszinnerstyle>\ProvidesPackage{beamerinnerthemehitszbeamer}
110 %<hitszouterstyle>\ProvidesPackage{beamerouterthemehitszbeamer}
111 %<hitszbeamer|hitszcolorstyle|hitszinnerstyle|hitszouterstyle>[2020/03/17 v1.0.0 A Beamer Theme for Harbin Institute of Technology, ShenZhen (HITSZ)]
112 %
113 %<*driver>
114 \ProvidesFile{hitszbeamer.dtx}[2020/03/17 v1.0.0 A Beamer Theme for Harbin Institute of Technology, ShenZhen (HITSZ)]
115 \documentclass{ltxdoc}
116 \usepackage{dtx-style}
117
118 \EnableCrossrefs
119 \CodelineIndex
120 \RecordChanges
121
122 \begin{document}
123 \DocInput{\jobname.dtx}
124 \end{document}
125 %</driver>
126 %
127 % \fi
128 %
129 % \CheckSum{0}
130 % \CharacterTable
131 % {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
132 % 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
133 % Digits \0\1\2\3\4\5\6\7\8\9
134 % Exclamation \! Double quote \" Hash (number) \#
135 % Dollar \$ Percent \% Ampersand \&
136 % Acute accent \' Left paren \( Right paren \)
137 % Asterisk \* Plus \+ Comma \,
138 % Minus \- Point \. Solidus \/
139 % Colon \: Semicolon \; Less than \<
140 % Equals \= Greater than \> Question mark \?
141 % Commercial at \@ Left bracket \[ Backslash \\
142 % Right bracket \] Circumflex \^ Underscore \_
143 % Grave accent \` Left brace \{ Vertical bar \|
144 % Right brace \} Tilde \~}
145 %
146 % \GetFileInfo{\jobname.dtx}
147 %
148 % \changes{v1.0.0}{2020/03/17}{Initially design hitszbeamer}
149 %
150 % \DoNotIndex{\begin,\end,\begingroup,\endgroup}
151 % \DoNotIndex{\ifx,\ifdim,\ifnum,\ifcase,\else,\or,\fi,\-}
152 % \DoNotIndex{\let,\def,\xdef,\newcommand,\renewcommand}
153 % \DoNotIndex{\expandafter,\csname,\endcsname,\relax,\protect}
154 % \DoNotIndex{\Huge,\huge,\LARGE,\Large,\large,\normalsize}
155 % \DoNotIndex{\small,\footnotesize,\scriptsize,\tiny}
156 % \DoNotIndex{\normalfont,\bfseries,\slshape,\interlinepenalty}
157 % \DoNotIndex{\hfil,\par,\hskip,\vskip,\vspace,\quad}
158 % \DoNotIndex{\centering,\raggedright}
159 % \DoNotIndex{\c@secnumdepth,\@startsection,\@setfontsize}
160 % \DoNotIndex{\ ,\@plus,\@minus,\p@,\z@,\@m,\@M,\@ne,\m@ne}
161 % \DoNotIndex{\@@par,\DeclareOperation,\RequirePackage,\LoadClass}
162 % \DoNotIndex{\AtBeginDocument,\AtEndDocument}
163 %
164 % \IndexPrologue{\section*{索~~~~引}}
165 % \GlossaryPrologue{\section*{修改记录}}
166 %
167 % \definecolor{beamer@headercolor}{RGB}{21,95,130}
168 % \title{\bfseries\color{beamer@headercolor}\hitszbeamer:哈尔滨工业大学(深圳)\\ Beamer主题}
169 % \author{{\Large\fangsong 杨敬轩}\\[5pt]\texttt{[email protected]}\\[5pt]\texttt{[email protected]}}
170 % \date{\fileversion\ (\filedate)}
171 %
172 % \maketitle\thispagestyle{empty}
173 %
174 % \vskip0.5cm
175 %
176 % \def\abstractname{\Large 摘\quad 要}
177 % \begin{abstract}\normalsize\vskip0.5cm
178 % \hitszbeamer\ 主题为作者在准备本科毕业设计中期答辩PPT时设计制作,
179 % 旨在帮助哈尔滨工业大学(深圳)学校师生进行学术交流或其他需要演示文稿活动时,方便的使用\LaTeX{}制作含有学校特色的演示文稿。
180 % \end{abstract}
181 %
182 % \vspace*{2em}
183 % \def\abstractname{\Large 免责声明}
184 % \begin{abstract}
185 % \noindent\normalsize
186 % \begin{enumerate}
187 % \item 本模板的发布遵守 \href{http://www.latex-project.org/lppl.txt}{\LaTeX\ Project Public License 1.3c}以及其后的最新版本,使用前请认真阅读协议内
188 % 容。
189 % \item 本主题为作者个人制作,使用仅供参考,任何由于使用本主题而引起的任何问题均与本主题作者无关。
190 % \item 任何个人或组织以本模板为基础进行修改、扩展而生成的新的专用模板,请严格遵
191 % 守 \href{http://www.latex-project.org/lppl.txt}{\LaTeX\ Project Public License 1.3c} 协议以及其后的最新版本。由于违犯协议而引起的任何纠纷争端均与
192 % 本模板作者无关。
193 % \end{enumerate}
194 % \end{abstract}
195 %
196 %
197 % \clearpage
198 % \pagestyle{fancy}
199 % \begin{multicols}{2}[
200 % \setlength{\columnseprule}{.4pt}
201 % \setlength{\columnsep}{18pt}]
202 % \tableofcontents
203 % \end{multicols}
204 % \clearpage
205 %
206 % \section{模板介绍}
207 % \hitszbeamer\ (\textbf{H}arbin \textbf{I}nstitute of \textbf{T}echnology,
208 % \textbf{S}hen\textbf{Z}hen \LaTeX\
209 % \textbf{Beamer} Template)是为了帮助哈尔滨工业大学(深圳)师生撰写演示文稿而编写的\LaTeX{} Beamer 模板。
210 %
211 % 本文档将尽量完整的介绍模板的使用方法,如有不清楚之处可以参考示例文档或者根据
212 % 第~\ref{sec:howtoask} 节说明提问,有兴趣者可以联系作者参与完善此手册,非常欢迎窝工学子对本代码作出贡献。
213 %
214 % \section{安装}
215 % \label{sec:installation}
216 %
217 % \hitszbeamer\ 已经上传CTAN,已包含在TeXLive与MiKTeX发行版中。
218 % 安装方法:打开命令行,输入以下命令即可
219 % \begin{shell}
220 % $ tlmgr install hitszbeamer
221 % \end{shell}
222 % 阅读本说明文档可以使用以下命令:
223 % \begin{shell}
224 % $ texdoc hitszbeamer
225 % \end{shell}
226 %
227 % 如果要使用开发版,需自己下载,\hitszbeamer\ 相关链接:
228 % \begin{itemize}
229 % \item 主页:\href{https://github.com/YangLaTeX/hitszbeamer}{GitHub}
230 % \item 下载:\href{http://www.ctan.org/pkg/hitszbeamer}{CTAN}
231 % \end{itemize}
232 %
233 % \subsection{模板的组成}
234 % 下表列出了 \hitszbeamer{}\ 的主要文件及其功能介绍:
235 %
236 % \begin{longtable}{l|p{8cm}}
237 % \toprule
238 % {\heiti 文件(夹)} & {\heiti 功能描述}\\\midrule
239 % \endfirsthead
240 % \midrule
241 % {\heiti 文件(夹)} & {\heiti 功能描述}\\\midrule
242 % \endhead
243 % \endfoot
244 % \endlastfoot
245 % hitszbeamer.dtx & 主题宏包、说明文档以及主题驱动文件的混排文件\\
246 % main.tex & 主题测试文档\\
247 % figures/ & 主题相关矢量图存储文件夹\\
248 % makedoc.bat & 生成主题与用户手册脚本\\
249 % makebeamer.bat & 编译测试样例脚本\\
250 % makeclean.bat & 清理编译过程中间文件脚本\\
251 % makecleanall.bat & 清理编译过程中间文件与样式文件脚本\\
252 % Makefile & Linux \& Mac OS脚本\\
253 % \textbf{hitszbeamer.pdf} & 用户手册(本文档)\\
254 % \bottomrule
255 % \end{longtable}
256 % \textbf{注:}使用前,请仔细阅读\textbf{hitszbeamer.pdf},即本文档。
257 %
258 % \section{使用说明}
259 % \label{sec:usage}
260 % 本手册假定用户已经能处理一般的 \LaTeX\ 文档,并对 \BibTeX\ 有一定了解。如果
261 % 从来没有接触过 \TeX\ 和 \LaTeX,建议先学习相关的基础知识。
262 %
263 % \subsection{关于提问}
264 % \label{sec:howtoask}
265 % 按照优先级推荐提问的位置如下:
266 %
267 % \begin{itemize}
268 % \item QQ group: 1039392552
269 % \item Github Issues: \href{http://github.com/YangLaTeX/hitszbeamer/issues}{http://github.com/YangLaTeX/hitszbeamer/issues}
270 % \item Email: \href{mailto:[email protected]}{[email protected]}, \href{mailto:[email protected]}{[email protected]}
271 % \end{itemize}
272 %
273 % \subsection{示例文件}
274 % \label{sec:userguide}
275 % 模板核心文件有四个\file{*.sty},但是如果
276 % 没有示例文档用户会发现很难下手。所以推荐新用户从模板自带的示例文档入手,里面包
277 % 括了Beamer写作用到的所有命令及其使用方法,只需要用自己的内容进行相应替换就可以。
278 % 对于不清楚的命令可以查阅本手册。下面的例子描述了模板中章节的组织形式,来自于示
279 % 例文档,具体内容可以参考模板附带的 \file{main.tex}。
280 %
281 % \lstinputlisting[style=lstStyleLaTeX]{main.tex}
282 %
283 % \subsection{论文选项}
284 % \label{sec:option}
285 %
286 % 论文选项在\file{main.tex} 文件的开头描述,此处不赘述。
287 %
288 % \section{使用模板}
289 % \subsection{如何编译}\label{SubSec:HowToMake}
290 % \subsubsection{Windows用户}
291 % 主题项目里已经列出了脚本:
292 % 首先双击\file{makedoc.bat} 脚本,生成主题和用户手册;
293 % 然后双击\file{makebeamer.bat} 脚本生成测试 Beamer 文件预览;
294 % 最后双击\file{makeclean.bat} 清理编译过程的中间文件;
295 % 双击\file{makecleanall.bat}可以清除辅助文件以及样式文件。
296 %
297 % \subsubsection{Linux \& Mac OS用户}
298 % 首先运行下面命令生成主题和用户手册;
299 % \begin{shell}
300 % $ make doc
301 % \end{shell}
302 %
303 % 然后运行下面命令生成测试 Beamer 文件预览;
304 % \begin{shell}
305 % $ make beamer
306 % \end{shell}
307 %
308 % 最后运行下面命令清理编译过程的中间文件。
309 % \begin{shell}
310 % $ make clean
311 % \end{shell}
312 %
313 % 若运行下面命令则清理编译过程的中间文件以及所有样式文件。
314 % \begin{shell}
315 % $ make cleanall
316 % \end{shell}
317 %
318 % \section{致谢}
319 % \label{sec:thanks}
320 % 感谢\href{https://github.com/StickCui/XDUstyle-Beamer-Theme}{XDUstyle}、\href{https://github.com/tl3shi/THUBeamer}{thubeamer}模板的作者,本模板基于他们改编而来!
321 %
322 % 欢迎各位到 \href{http://github.com/YangLaTeX/hitszbeamer/}{\hitszbeamer\ Github 主页}贡献!
323 %
324 % \StopEventually{\PrintChanges\PrintIndex}
325 % \clearpage
326 %
327 % \section{实现细节}
328 %
329 % \subsection{主题主文件部分}
330 % 导入必要宏包
331 % \begin{macrocode}
332 %<*hitszbeamer>
333 \def\hitszbeamer{\textsc{Hitsz}\-\textsc{Beamer}}
334 \RequirePackage{tikz}
335 \usetikzlibrary{external}
336 \RequirePackage{pgf}
337 \RequirePackage{multicol}
338 \RequirePackage{multimedia}
339 \RequirePackage{calc}
340 \RequirePackage[UTF8]{ctex}
341 \RequirePackage[square,sort&compress]{natbib}
342 % \end{macrocode}
343 %
344 % 主题选项
345 % \begin{macrocode}
346 \DeclareOptionBeamer{hitszred}{%
347 \PassOptionsToPackage{hitszred}{beamercolorthemehitszbeamer}
348 \PassOptionsToPackage{hitszred}{beamerinnerthemehitszbeamer}
349 \PassOptionsToPackage{hitszred}{beamerouterthemehitszbeamer}
350 }
351 \DeclareOptionBeamer{hitszblue}{%
352 \PassOptionsToPackage{hitszblue}{beamercolorthemehitszbeamer}
353 \PassOptionsToPackage{hitszblue}{beamerinnerthemehitszbeamer}
354 \PassOptionsToPackage{hitszblue}{beamerouterthemehitszbeamer}
355 }
356 \ProcessOptionsBeamer
357 % \end{macrocode}
358 %
359 % 特殊设置
360 % \begin{macrocode}
361 \mode<presentation>
362 {
363 \useinnertheme{hitszbeamer}
364 \useoutertheme{hitszbeamer}
365 \usecolortheme{hitszbeamer}
366 }
367
368 \mode<all>
369 %</hitszbeamer>
370 % \end{macrocode}
371 % \subsection{主题配色文件部分}
372 %
373 % 参数设置
374 % \begin{macrocode}
375 %<*hitszcolorstyle>
376 \DeclareOptionBeamer{hitszred}{\def\beamer@hitszcolor{hitszred}}
377 \DeclareOptionBeamer{hitszblue}{\def\beamer@hitszcolor{hitszblue}}
378 \ProcessOptionsBeamer
379
380 \def\beamer@hitszcolorred{hitszred}
381 % \end{macrocode}
382 %
383 % 颜色设置。
384 % \begin{macrocode}
385 \mode<presentation>
386 {
387 \ifx\beamer@hitszcolor\beamer@hitszcolorred%
388 \definecolor{beamer@headercolor}{RGB}{175,33,37}
389 \else
390 \definecolor{beamer@headercolor}{rgb}{0.0,0.415,0.682}
391 \fi
392
393 \setbeamercolor{title}{fg=white,bg=beamer@headercolor}
394 \setbeamercolor{frametitle}{fg=beamer@headercolor,bg=beamer@headercolor!30}
395 \setbeamerfont{frametitle}{size=\large}
396
397 \setbeamercolor{secondbottomline}{fg=white,bg=beamer@headercolor}
398 \setbeamercolor{firstbottomline}{fg=white,bg=beamer@headercolor!80}
399 \setbeamercolor{block title}{fg=white,bg=beamer@headercolor}
400 \setbeamercolor{block title example}{%
401 use={normal text,example text},fg=white,bg=example text.fg!75!green
402 }
403 \setbeamercolor{fine separation line}{}
404 \setbeamercolor{item projected}{fg=white}
405 \setbeamercolor{palette sidebar primary}{use=normal text,fg=normal text.fg}
406 \setbeamercolor{palette sidebar quaternary}{use=structure,fg=structure.fg}
407 \setbeamercolor{palette sidebar secondary}{use=structure,fg=structure.fg}
408 \setbeamercolor{palette sidebar tertiary}{use=normal text,fg=normal text.fg}
409 \setbeamercolor{section in sidebar}{fg=brown}
410 \setbeamercolor{section in sidebar shaded}{fg=gray}
411 \setbeamercolor{separation line}{}
412 \setbeamercolor{sidebar}{bg=beamer@headercolor!30}
413 \setbeamercolor{sidebar}{parent=palette primary}
414 \setbeamercolor{structure}{fg=beamer@headercolor}
415 \setbeamercolor{subsection in sidebar}{fg=brown}
416 \setbeamercolor{subsection in sidebar shaded}{fg=gray}
417 \setbeamercolor{logo}{bg=beamer@headercolor!50}
418 }
419
420 \mode<all>
421 %</hitszcolorstyle>
422 % \end{macrocode}
423 % \subsection{内部主题文件部分}
424 %
425 % 必要宏包
426 % \begin{macrocode}
427 %<*hitszinnerstyle>
428 \RequirePackage{tikz}
429 \usetikzlibrary{external}
430 % \end{macrocode}
431 %
432 % 参数设置
433 % \begin{macrocode}
434 \DeclareOptionBeamer{hitszred}{\def\beamer@hitszcolor{hitszred}}
435 \DeclareOptionBeamer{hitszblue}{\def\beamer@hitszcolor{hitszblue}}
436 \ProcessOptionsBeamer
437
438 \newlength{\beamer@plainpagewidth}
439 \def\beamer@hitszcolorblue{hitszblue}
440 % \end{macrocode}
441 %
442 % 特殊设置
443 % \begin{macrocode}
444 \mode<presentation>
445
446 \usefonttheme{structurebold}
447 \setbeamertemplate{caption}[numbered]{}
448 \useinnertheme[shadow]{rounded}
449
450 \newcommand\varparallel{%
451 \mathrel{%
452 \text{%
453 \tikz[baseline] \draw (0em,-0.3ex) -- (.4em,1.7ex) (.2em,-0.3ex) -- (.6em,1.7ex);
454 }%
455 }%
456 }
457
458 \makeatletter
459 \newcommand{\frameofframes}{/}
460 \newcommand{\setframeofframes}[1]{
461 \renewcommand{\frameofframes}{#1}
462 }
463 \setbeamertemplate{footline}{%
464 \begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot}
465 \end{beamercolorbox}
466 \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
467 leftskip=.3cm,rightskip=.3cm plus1fil]{firstbottomline}%
468 \leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor}%
469 \hfill%
470 {\usebeamerfont{institute in head/foot}%
471 \usebeamercolor[fg]{frame number}%
472 \insertshortinstitute
473 }%
474 \end{beamercolorbox}%
475 \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
476 leftskip=.3cm,rightskip=.3cm plus1fil]{secondbottomline}%
477 {\usebeamerfont{title in head/foot}\insertshorttitle}%
478 \hfill%
479 {\usebeamerfont{frame number}\usebeamercolor[fg]{frame number}\insertframenumber~\frameofframes~\inserttotalframenumber}
480 \end{beamercolorbox}%
481 \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}
482 \end{beamercolorbox}
483 }
484 \makeatother
485
486 \mode<all>
487 %</hitszinnerstyle>
488 % \end{macrocode}
489 % \subsection{外部主题文件部分}
490 %
491 % \begin{macrocode}
492 %<*hitszouterstyle>
493 % \end{macrocode}
494 %
495 % 参数设置
496 % \begin{macrocode}
497 \DeclareOptionBeamer{hitszred}{\def\beamer@hitszcolor{hitszred}}
498 \DeclareOptionBeamer{hitszblue}{\def\beamer@hitszcolor{hitszblue}}
499 \ProcessOptionsBeamer
500
501 \mode<presentation>
502
503 % 插入透明的logo
504 \pgfdeclaremask{figmask}{figures/hitlogo-mask.jpg}
505 \pgfdeclareimage[mask=figmask,width=0.17\linewidth,interpolate=true]{hitlogomasked}{figures/hitlogo.jpg}
506 \logo{\pgfuseimage{hitlogomasked}}
507
508 % 取消导航符号
509 \setbeamertemplate{navigation symbols}{}
510
511 % 使用<sidebar>主题
512 \useoutertheme[width=0.17\linewidth]{sidebar}
513
514 \mode<all>
515 %</hitszouterstyle>
516 % \end{macrocode}
517 %
518 % \iffalse
519 % \begin{macrocode}
520 %<*dtx-style>
521 \ProvidesPackage{dtx-style}
522 \RequirePackage{hypdoc}
523 \RequirePackage[UTF8,scheme=chinese,fontset=windowsnew]{ctex}
524 \RequirePackage{newpxtext}
525 \RequirePackage{newpxmath}
526 \RequirePackage[
527 top=2.5cm, bottom=2.5cm,
528 left=3cm, right=2cm,
529 headsep=8mm]{geometry}
530 \RequirePackage{array,longtable,booktabs}
531 \RequirePackage{listings}
532 \RequirePackage{fancyhdr}
533 \RequirePackage{xcolor}
534 \RequirePackage{enumitem}
535 \RequirePackage{etoolbox}
536 \RequirePackage{metalogo}
537 \RequirePackage{hyperref}
538
539 \colorlet{hitsz@macro}{blue!60!black}
540 \colorlet{hitsz@env}{blue!70!black}
541 \colorlet{hitsz@option}{purple}
542 \patchcmd{\PrintMacroName}{\MacroFont}{\MacroFont\bfseries\color{hitsz@macro}}{}{}
543 \patchcmd{\PrintDescribeMacro}{\MacroFont}{\MacroFont\bfseries\color{hitsz@macro}}{}{}
544 \patchcmd{\PrintDescribeEnv}{\MacroFont}{\MacroFont\bfseries\color{hitsz@env}}{}{}
545 \patchcmd{\PrintEnvName}{\MacroFont}{\MacroFont\bfseries\color{hitsz@env}}{}{}
546
547 \def\DescribeOption{%
548 \leavevmode\@bsphack\begingroup\MakePrivateLetters%
549 \Describe@Option}
550 \def\Describe@Option#1{\endgroup
551 \marginpar{\raggedleft\PrintDescribeOption{#1}}%
552 \hitsz@special@index{option}{#1}\@esphack\ignorespaces}
553 \def\PrintDescribeOption#1{\strut \MacroFont\bfseries\sffamily\color{hitsz@option} #1\ }
554 \def\hitsz@special@index#1#2{\@bsphack
555 \begingroup
556 \HD@target
557 \let\HDorg@encapchar\encapchar
558 \edef\encapchar usage{%
559 \HDorg@encapchar hdclindex{\the\c@HD@hypercount}{usage}%
560 }%
561 \index{#2\actualchar{\string\ttfamily\space#2}
562 (#1)\encapchar usage}%
563 \index{#1:\levelchar#2\actualchar
564 {\string\ttfamily\space#2}\encapchar usage}%
565 \endgroup
566 \@esphack}
567
568 \lstdefinestyle{lstStyleBase}{%
569 basicstyle=\small\ttfamily,
570 aboveskip=\medskipamount,
571 belowskip=\medskipamount,
572 lineskip=0pt,
573 boxpos=c,
574 showlines=false,
575 extendedchars=true,
576 upquote=true,
577 tabsize=2,
578 showtabs=false,
579 showspaces=false,
580 showstringspaces=false,
581 numbers=none,
582 linewidth=\linewidth,
583 xleftmargin=4pt,
584 xrightmargin=0pt,
585 resetmargins=false,
586 breaklines=true,
587 breakatwhitespace=false,
588 breakindent=0pt,
589 breakautoindent=true,
590 columns=flexible,
591 keepspaces=true,
592 gobble=2,
593 framesep=3pt,
594 rulesep=1pt,
595 framerule=1pt,
596 backgroundcolor=\color{gray!5},
597 stringstyle=\color{green!40!black!100},
598 keywordstyle=\bfseries\color{blue!50!black},
599 commentstyle=\slshape\color{black!60}}
600
601 \lstdefinestyle{lstStyleShell}{%
602 style=lstStyleBase,
603 frame=l,
604 rulecolor=\color{purple},
605 language=bash}
606
607 \definecolor{beamer@headercolor}{RGB}{21,95,130}
608 \lstdefinestyle{lstStyleLaTeX}{%
609 style=lstStyleBase,
610 frame=l,
611 rulecolor=\color{beamer@headercolor},
612 language=[LaTeX]TeX}
613
614 \lstnewenvironment{latex}{\lstset{style=lstStyleLaTeX}}{}
615 \lstnewenvironment{shell}{\lstset{style=lstStyleShell}}{}
616
617 \setlist{nosep}
618
619 \DeclareDocumentCommand{\option}{m}{\textsf{#1}}
620 \DeclareDocumentCommand{\env}{m}{\texttt{#1}}
621 \DeclareDocumentCommand{\pkg}{s m}{%
622 \texttt{#2}\IfBooleanF#1{\hitsz@special@index{package}{#2}}}
623 \DeclareDocumentCommand{\file}{s m}{%
624 \texttt{#2}\IfBooleanF#1{\hitsz@special@index{file}{#2}}}
625 \newcommand{\myentry}[1]{%
626 \marginpar{\small\raggedleft\color{purple}\bfseries\strut #1}}
627 \newcommand{\note}[2][Note]{{%
628 \color{magenta}{\bfseries #1}\emph{#2}}}
629 \def\hitszbeamer{\textsc{Hitsz}\-\textsc{Beamer}}
630 \def\hitsz{哈尔滨工业大学(深圳)}
631 %</dtx-style>
632 % \end{macrocode}
633 % \fi
634 %
635 % \Finale
636 %
637 \endinput
638 % \iffalse
639 % Local Variables:
640 % mode: doctex
641 % TeX-master: t
642 % End:
643 % \fi