diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/thuthesis/dtx-style.sty')
-rw-r--r-- | Master/texmf-dist/doc/latex/thuthesis/dtx-style.sty | 117 |
1 files changed, 27 insertions, 90 deletions
diff --git a/Master/texmf-dist/doc/latex/thuthesis/dtx-style.sty b/Master/texmf-dist/doc/latex/thuthesis/dtx-style.sty index f24e76f91d8..ec677025eb9 100644 --- a/Master/texmf-dist/doc/latex/thuthesis/dtx-style.sty +++ b/Master/texmf-dist/doc/latex/thuthesis/dtx-style.sty @@ -1,122 +1,59 @@ - \ProvidesPackage{dtx-style} +\RequirePackage[UTF8,scheme=chinese]{ctex} +\RequirePackage[top=2.5cm, bottom=2.5cm]{geometry} + \RequirePackage{calc} \RequirePackage{array,longtable} \RequirePackage{fancybox,fancyvrb} +\RequirePackage{fancyhdr} \RequirePackage{xcolor} +\RequirePackage{url} \RequirePackage{ifxetex} -\ifxetex - \RequirePackage[nofonts,UTF8,hyperref]{ctex} - \input{thufonts.def} -\else - \RequirePackage[winfonts,UTF8,hyperref]{ctex} - \RequirePackage{txfonts} -\fi \RequirePackage{hyperref} -\ifxetex - \hypersetup{% - CJKbookmarks=true} -\else - \hypersetup{% - unicode=true, - CJKbookmarks=false} -\fi \hypersetup{% bookmarksnumbered=true, bookmarksopen=true, bookmarksopenlevel=1, breaklinks=true, + colorlinks=true, linkcolor=blue, plainpages=false, - pdfpagelabels, pdfborder=0 0 0} -\RequirePackage{url} -\RequirePackage{indentfirst} - -\setlength{\parskip}{4pt plus1pt minus0pt} -\setlength{\topsep}{0pt} -\setlength{\partopsep}{0pt} -\setlength{\parindent}{20pt} -\addtolength{\oddsidemargin}{-1cm} -\advance\textwidth 1.5cm -\addtolength{\topmargin}{-1cm} -\addtolength{\headsep}{0.3cm} -\addtolength{\textheight}{2.3cm} +\ifxetex + \hypersetup{% + CJKbookmarks=true} +\else + \hypersetup{% + unicode=true, + CJKbookmarks=false} +\fi -\renewcommand{\baselinestretch}{1.3} -\setlength{\shadowsize}{3pt} -\def\DescribeOption#1{\SpecialOptionIndex{#1}} -\def\SpecialOptionIndex#1{\index{#1\actualchar\textbf{#1}}} -\renewenvironment{description} +\def\SpecialOptionIndex#1{\@bsphack% + \index{#1\actualchar{\protect\bfseries #1}}\@esphack} +\newenvironment{options} {\list{}{\setlength\labelwidth{2cm}% \setlength\labelsep{3pt}% \setlength\leftmargin{\labelwidth+\labelsep}% \addtolength{\itemsep}{3pt}% \renewcommand\makelabel[1]{% - \shadowbox{\color{blue!90}\sffamily ##1}\DescribeOption{##1}}} + \ovalbox{\color{magenta}\bfseries\sffamily ##1}% + \SpecialOptionIndex{##1}}} }{\endlist} \DefineVerbatimEnvironment{example}{Verbatim}% - {frame=single,framerule=0.3mm,rulecolor=\color{red!75!green!50!blue},% - fillcolor=\color{red!75!green!50!blue!15},framesep=2mm,baselinestretch=1.2,% + {frame=single,framerule=0.3mm,rulecolor=\color{violet},% + fillcolor=\color{violet!5},framesep=1mm,baselinestretch=1.2,% fontsize=\small,gobble=1} \DefineVerbatimEnvironment{shell}{Verbatim}% - {frame=single,framerule=0.3mm,rulecolor=\color{red!85!green!60},% - fillcolor=\color{red!85!green!10},framesep=2mm,fontsize=\small,gobble=1} -\long\def\myentry#1{\vskip5pt\par\noindent\llap{{\color{blue}\fangsong #1}}\marginpar{\strut}\hskip\parindent} -\def\tableofcontents{\renewcommand{\baselinestretch}{1.0}\@starttoc{toc}} -\def\DescribeMacro{\Describe@Macro} -\def\Describe@Macro#1{\PrintDescribeMacro{#1}\SpecialUsageIndex{#1}} -\def\PrintDescribeMacro#1{{\color{-red!75!green!50!blue!55}\MacroFont \string #1\hskip1em}} -\def\ps@headings{% - \let\@oddfoot\@empty - \def\@oddhead{\vbox{% - \hb@xt@ \textwidth{\llap{\fbox{\rightmark\rule[-2pt]{0pt}{13pt}}}\hfil\thepage}% - \vskip-0.7pt% - \hb@xt@ \textwidth{\hrulefill}}} - \let\@evenfoot\@oddfoot - \let\@evenhead\@oddhead - \let\@mkboth\markboth - \def\sectionmark##1{% - \markright{\ifnum \c@secnumdepth >\m@ne - \thesection\quad - \fi - ##1}} - \def\subsectionmark##1{% - \markright{\ifnum \c@secnumdepth >\m@ne - \thesubsection\quad - \fi - ##1}} - \def\subsubsectionmark##1{% - \markright{\ifnum \c@secnumdepth >\m@ne - \thesubsubsection\quad - \fi - ##1}}} -\renewcommand\section{\@startsection{section}{1}{\z@}% - {-3.5ex \@plus -1ex \@minus -.2ex}% - {2.3ex \@plus.2ex}% - {\normalfont\Large\bfseries}} - -\renewcommand\subsection{\@startsection{subsection}{2}{\z@}% - {-3.25ex\@plus -1ex \@minus -.2ex}% - {1.5ex \@plus .2ex}% - {\normalfont\large\bfseries}} -\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% - {-3.25ex\@plus -1ex \@minus -.2ex}% - {1.5ex \@plus .2ex}% - {\normalfont\normalsize\bfseries}} -\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% - {3.25ex \@plus1ex \@minus.2ex}% - {-1em}% - {\normalfont\normalsize\bfseries}} -\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}% - {3.25ex \@plus1ex \@minus .2ex}% - {-1em}% - {\normalfont\normalsize\bfseries}} -\pagestyle{empty} + {frame=single,framerule=0.3mm,rulecolor=\color{olive},% + fillcolor=\color{olive!5},framesep=1mm,fontsize=\small,gobble=1} +\newcommand{\myentry}[1]{% + \vskip5pt\par\noindent\llap{{\color{purple}\bfseries #1}}\marginpar{\strut}\hskip\parindent} \MakeShortVerb{\|} \def\pkg#1{\texttt{#1}} \def\option#1{\textsf{#1}} \def\file#1{\textsl{#1}} \def\thuthesis{\textsc{Thu}\-\textsc{Thesis}} +\newcommand{\note}[1]{\par% + {\color{magenta}\bfseries 说明:#1}} |