Debian Codegraph @

texmf-dist/doc/latex/hitszbeamer/dtx-style.sty

raw
1 %%
2 %% This is file `dtx-style.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% hitszbeamer.dtx (with options: `dtx-style')
8 %%
9 %% This is a generated file.
10 %%
11 %% Copyright (C) 2019--2020 by Jingxuan Yang <[email protected]>
12 %%
13 %% This file may be distributed and/or modified under the
14 %% conditions of the LaTeX Project Public License, either version 1.3c
15 %% of this license or (at your option) any later version.
16 %% The latest version of this license is in:
17 %%
18 %% http://www.latex-project.org/lppl.txt
19 %%
20 %% and version 1.3c or later is part of all distributions of LaTeX
21 %% version 2008/05/04 or later.
22 %%
23 %% To produce the documentation run the original source files ending with `.dtx'
24 %% through LaTeX.
25 %%
26
27 \ProvidesPackage{dtx-style}
28 \RequirePackage{hypdoc}
29 \RequirePackage[UTF8,scheme=chinese,fontset=windowsnew]{ctex}
30 \RequirePackage{newpxtext}
31 \RequirePackage{newpxmath}
32 \RequirePackage[
33 top=2.5cm, bottom=2.5cm,
34 left=3cm, right=2cm,
35 headsep=8mm]{geometry}
36 \RequirePackage{array,longtable,booktabs}
37 \RequirePackage{listings}
38 \RequirePackage{fancyhdr}
39 \RequirePackage{xcolor}
40 \RequirePackage{enumitem}
41 \RequirePackage{etoolbox}
42 \RequirePackage{metalogo}
43 \RequirePackage{hyperref}
44
45 \colorlet{hitsz@macro}{blue!60!black}
46 \colorlet{hitsz@env}{blue!70!black}
47 \colorlet{hitsz@option}{purple}
48 \patchcmd{\PrintMacroName}{\MacroFont}{\MacroFont\bfseries\color{hitsz@macro}}{}{}
49 \patchcmd{\PrintDescribeMacro}{\MacroFont}{\MacroFont\bfseries\color{hitsz@macro}}{}{}
50 \patchcmd{\PrintDescribeEnv}{\MacroFont}{\MacroFont\bfseries\color{hitsz@env}}{}{}
51 \patchcmd{\PrintEnvName}{\MacroFont}{\MacroFont\bfseries\color{hitsz@env}}{}{}
52
53 \def\DescribeOption{%
54 \leavevmode\@bsphack\begingroup\MakePrivateLetters%
55 \Describe@Option}
56 \def\Describe@Option#1{\endgroup
57 \marginpar{\raggedleft\PrintDescribeOption{#1}}%
58 \hitsz@special@index{option}{#1}\@esphack\ignorespaces}
59 \def\PrintDescribeOption#1{\strut \MacroFont\bfseries\sffamily\color{hitsz@option} #1\ }
60 \def\hitsz@special@index#1#2{\@bsphack
61 \begingroup
62 \HD@target
63 \let\HDorg@encapchar\encapchar
64 \edef\encapchar usage{%
65 \HDorg@encapchar hdclindex{\the\c@HD@hypercount}{usage}%
66 }%
67 \index{#2\actualchar{\string\ttfamily\space#2}
68 (#1)\encapchar usage}%
69 \index{#1:\levelchar#2\actualchar
70 {\string\ttfamily\space#2}\encapchar usage}%
71 \endgroup
72 \@esphack}
73
74 \lstdefinestyle{lstStyleBase}{%
75 basicstyle=\small\ttfamily,
76 aboveskip=\medskipamount,
77 belowskip=\medskipamount,
78 lineskip=0pt,
79 boxpos=c,
80 showlines=false,
81 extendedchars=true,
82 upquote=true,
83 tabsize=2,
84 showtabs=false,
85 showspaces=false,
86 showstringspaces=false,
87 numbers=none,
88 linewidth=\linewidth,
89 xleftmargin=4pt,
90 xrightmargin=0pt,
91 resetmargins=false,
92 breaklines=true,
93 breakatwhitespace=false,
94 breakindent=0pt,
95 breakautoindent=true,
96 columns=flexible,
97 keepspaces=true,
98 gobble=2,
99 framesep=3pt,
100 rulesep=1pt,
101 framerule=1pt,
102 backgroundcolor=\color{gray!5},
103 stringstyle=\color{green!40!black!100},
104 keywordstyle=\bfseries\color{blue!50!black},
105 commentstyle=\slshape\color{black!60}}
106
107 \lstdefinestyle{lstStyleShell}{%
108 style=lstStyleBase,
109 frame=l,
110 rulecolor=\color{purple},
111 language=bash}
112
113 \definecolor{beamer@headercolor}{RGB}{21,95,130}
114 \lstdefinestyle{lstStyleLaTeX}{%
115 style=lstStyleBase,
116 frame=l,
117 rulecolor=\color{beamer@headercolor},
118 language=[LaTeX]TeX}
119
120 \lstnewenvironment{latex}{\lstset{style=lstStyleLaTeX}}{}
121 \lstnewenvironment{shell}{\lstset{style=lstStyleShell}}{}
122
123 \setlist{nosep}
124
125 \DeclareDocumentCommand{\option}{m}{\textsf{#1}}
126 \DeclareDocumentCommand{\env}{m}{\texttt{#1}}
127 \DeclareDocumentCommand{\pkg}{s m}{%
128 \texttt{#2}\IfBooleanF#1{\hitsz@special@index{package}{#2}}}
129 \DeclareDocumentCommand{\file}{s m}{%
130 \texttt{#2}\IfBooleanF#1{\hitsz@special@index{file}{#2}}}
131 \newcommand{\myentry}[1]{%
132 \marginpar{\small\raggedleft\color{purple}\bfseries\strut #1}}
133 \newcommand{\note}[2][Note]{{%
134 \color{magenta}{\bfseries #1}\emph{#2}}}
135 \def\hitszbeamer{\textsc{Hitsz}\-\textsc{Beamer}}
136 \def\hitsz{^^e5^^93^^88^^e5^^b0^^94^^e6^^bb^^a8^^e5^^b7^^a5^^e4^^b8^^9a^^e5^^a4^^a7^^e5^^ad^^a6^^ef^^bc^^88^^e6^^b7^^b1^^e5^^9c^^b3^^ef^^bc^^89}
137 %%
138 %% This package consists of the file hitszbeamer.dtx,
139 %% and the derived files hitszbeamer.pdf,
140 %% beamerthemehitszbeamer.sty,
141 %% beamercolorthemehitszbeamer.sty,
142 %% beamerinnerthemehitszbeamer.sty,
143 %% beamerouterthemehitszbeamer.sty.
144 %%
145 %%
146 %% End of file `dtx-style.sty'.