diff options
author | Karl Berry <karl@freefriends.org> | 2016-06-11 23:07:59 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-06-11 23:07:59 +0000 |
commit | 05fd0dcbb7c348f3e41ed7d500a2e2cf64f7c4b4 (patch) | |
tree | 7a20c14f00aaaafeddbff95a81fedc959289b16f /Master/texmf-dist/doc/latex/cquthesis/dtx-style.sty | |
parent | 876b86d0b964599f049d2ae7d670b73308961d4a (diff) |
cquthesis (11jun16)
git-svn-id: svn://tug.org/texlive/trunk@41372 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/cquthesis/dtx-style.sty')
-rw-r--r-- | Master/texmf-dist/doc/latex/cquthesis/dtx-style.sty | 138 |
1 files changed, 138 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/cquthesis/dtx-style.sty b/Master/texmf-dist/doc/latex/cquthesis/dtx-style.sty new file mode 100644 index 00000000000..81273520106 --- /dev/null +++ b/Master/texmf-dist/doc/latex/cquthesis/dtx-style.sty @@ -0,0 +1,138 @@ +%% +%% This is file `dtx-style.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% cquthesis.dtx (with options: `dtx-style') +%% +%% This is a generated file. +%% +%% Copyright (C) 2016-2016 by Zhennan Li <i@nanmu.me> +%% This file may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3 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.3 or later is part of all distributions of +%% LaTeX version 2005/12/01 or later. +%% +\ProvidesPackage{dtx-style} +\RequirePackage{hypdoc} +\RequirePackage[UTF8,scheme=chinese]{ctex} +\RequirePackage{newpxtext} +\RequirePackage{newpxmath} +\RequirePackage[ +top=2.5cm, bottom=2.5cm, +left=4cm, right=2cm, +headsep=3mm]{geometry} +\RequirePackage{array,longtable,booktabs} +\RequirePackage{listings} +\RequirePackage{fancyhdr} +\RequirePackage{xcolor} +\RequirePackage{enumitem} +\RequirePackage{etoolbox} +\RequirePackage{metalogo} +\RequirePackage{graphicx} +\RequirePackage{xspace} + +\colorlet{cqu@macro}{blue!60!black} +\colorlet{cqu@env}{blue!70!black} +\colorlet{cqu@option}{purple} +\patchcmd{\PrintMacroName}{\MacroFont}{\MacroFont\bfseries\color{cqu@macro}}{}{} +\patchcmd{\PrintDescribeMacro}{\MacroFont}{\MacroFont\bfseries\color{cqu@macro}}{}{} +\patchcmd{\PrintDescribeEnv}{\MacroFont}{\MacroFont\bfseries\color{cqu@env}}{}{} +\patchcmd{\PrintEnvName}{\MacroFont}{\MacroFont\bfseries\color{cqu@env}}{}{} + +\appto{\TeX}{\xspace} +\appto{\LaTeX}{\xspace} +\appto{\XeTeX}{\xspace} + +\def\DescribeOption{% +\leavevmode\@bsphack\begingroup\MakePrivateLetters% +\Describe@Option} +\def\Describe@Option#1{\endgroup +\marginpar{\raggedleft\PrintDescribeOption{#1}}% +\cqu@special@index{option}{#1}\@esphack\ignorespaces} +\def\PrintDescribeOption#1{\strut \MacroFont\bfseries\sffamily\color{cqu@option} #1\ } +\def\cqu@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{blue}, +language=bash} + +\lstdefinestyle{lstStyleLaTeX}{% +style=lstStyleBase, +frame=l, +rulecolor=\color{cyan}, +language=[LaTeX]TeX} + +\lstnewenvironment{latex}{\lstset{style=lstStyleLaTeX}}{} +\lstnewenvironment{shell}{\lstset{style=lstStyleShell}}{} + +\setlist{nosep} + +\DeclareDocumentCommand{\option}{m}{\textsf{#1}\xspace} +\DeclareDocumentCommand{\env}{m}{\texttt{#1}\xspace} +\DeclareDocumentCommand{\pkg}{s m}{% +\texttt{#2}\xspace\IfBooleanF#1{\cqu@special@index{package}{#2}}} +\DeclareDocumentCommand{\file}{s m}{% +\texttt{#2}\xspace\IfBooleanF#1{\cqu@special@index{file}{#2}}} +\newcommand{\myentry}[1]{% +\marginpar{\raggedleft\color{purple}\bfseries\strut #1}} +\newcommand{\note}[1]{{% +\color{magenta}{\noindent\bfseries 说明:}\emph{#1}}} + +\def\cquthesis{\textsc{Cqu}\-\textsc{Thesis}} +\endinput +%% +%% End of file `dtx-style.sty'. |