📄 base.tex
字号:
\makeatletter% Development notes at% http://docutils.python-hosting.com/wiki/NewLatex\providecommand{\Dprinting}{false}\providecommand{\DSearly}{}\providecommand{\DSlate}{}\providecommand{\Ddocumentclass}{scrartcl}\providecommand{\Ddocumentoptions}{a4paper}\documentclass[\Ddocumentoptions]{\Ddocumentclass}\DSearly\providecommand{\DSfontencoding}{ % Set up font encoding. % AE is a T1-emulation. It provides most characters and features % as T1-encoded fonts but doesn't use ugly bitmap fonts. \usepackage{ae} % Provide the characters not contained in AE from EC bitmap fonts. \usepackage{aecompl} % Guillemets ("<<", ">>") in AE. \usepackage{aeguill}}\providecommand{\DSsymbols}{% % Fix up symbols. % The Euro symbol in Computer Modern looks, um, funny. Let's get a % proper Euro symbol. \RequirePackage{eurosym}% \renewcommand{\texteuro}{\euro}%}% Taken from% <http://groups.google.de/groups?selm=1i0n5tgtplti420e1omp4pctlv19jpuhbb%404ax.com>% and modified. Used with permission.\providecommand{\Dprovidelength}[2]{% \begingroup% \escapechar\m@ne% \xdef\@gtempa{{\string#1}}% \endgroup% \expandafter\@ifundefined\@gtempa% {\newlength{#1}\setlength{#1}{#2}}% {}%}\providecommand{\Dprovidecounter}[1]{% % Like \newcounter except that it doesn't crash if the counter % already exists. \@ifundefined{c@#1}{\newcounter{#1}}{}}\Dprovidelength{\Dboxparindent}{\parindent}\providecommand{\Dmakeboxminipage}[1]{% % Make minipage for use in a box created by \Dmakefbox. \begin{minipage}[t]{0.9\linewidth}% \setlength{\parindent}{\Dboxparindent}% #1% \end{minipage}%}\providecommand{\Dmakefbox}[1]{% % Make a centered, framed box. Useful e.g. for admonitions. \vspace{0.4\baselineskip}% \begin{center}% \fbox{\Dmakeboxminipage{#1}}% \end{center}% \vspace{0.4\baselineskip}%}\providecommand{\Dmakebox}[1]{% % Make a centered, frameless box. Useful e.g. for block quotes. % Do not use minipages here, but create pseudo-lists to allow % page-breaking. (Don't use KOMA-script's addmargin environment % because it messes up bullet lists.) \Dmakelistenvironment{}{}{% \setlength{\parskip}{0pt}% \setlength{\parindent}{\Dboxparindent}% \item{#1}% }%}\RequirePackage{ifthen}\providecommand{\Dfrenchspacing}{true}\ifthenelse{\equal{\Dfrenchspacing}{true}}{\frenchspacing}{}\Dprovidelength{\Dblocklevelvspace}{% % Space between block-level elements other than paragraphs. 0.7\baselineskip plus 0.3\baselineskip minus 0.2\baselineskip%}\providecommand{\Dauxiliaryspace}{% \ifthenelse{\equal{\Dneedvspace}{true}}{\vspace{\Dblocklevelvspace}}{}% \par\noindent%}\providecommand{\Dparagraphspace}{\par}\providecommand{\Dneedvspace}{true}\providecommand{\DSlinks}{ % Targets and references. \RequirePackage[colorlinks=false,pdfborder={0 0 0}]{hyperref} \providecommand{\Draisedlink}[1]{\Hy@raisedlink{##1}} % References. % We're assuming here that the "refid" and "refuri" attributes occur % only in inline context (in TextElements). \providecommand{\DArefid}[5]{% \ifthenelse{\equal{##4}{reference}}{% \Dexplicitreference{\###3}{##5}% }{% % If this is not a target node (targets with refids are % uninteresting and should be silently dropped). \ifthenelse{\not\equal{##4}{target}}{% % If this is a footnote reference, call special macro. \ifthenelse{\equal{##4}{footnotereference}}{% \Dimplicitfootnotereference{\###3}{##5}% }{% \ifthenelse{\equal{##4}{citationreference}}{% \Dimplicitcitationreference{\###3}{##5}% }{% \Dimplicitreference{\###3}{##5}% }% }% }{}% }% } \providecommand{\DArefuri}[5]{% \ifthenelse{\equal{##4}{target}}{% % Hyperlink targets can (and should be) ignored because they are % invisible. }{% % We only have explicit URI references, so one macro suffices. \Durireference{##3}{##5}% }% } % Targets. \providecommand{\DAids}[5]{% \label{##3}% \ifthenelse{\equal{##4}{footnotereference}}{% {% \renewcommand{\HyperRaiseLinkDefault}{% % Dirty hack to make backrefs to footnote references work. % For some reason, \baselineskip is 0pt in fn references. 0.5\Doriginalbaselineskip% }% \Draisedlink{\hypertarget{##3}{}}##5% }% }{% \Draisedlink{\hypertarget{##3}{}}##5% }% } % Color in references. \RequirePackage{color} \providecommand{\Dimplicitreference}[2]{% % Create implicit reference to ID. Implicit references occur % e.g. in TOC-backlinks of section titles. Parameters: % 1. Target. % 2. Link text. \href{##1}{##2}% } \providecommand{\Dimplicitfootnotereference}[2]{% % Ditto, but for the special case of footnotes. % We want them to be rendered like explicit references. \Dexplicitreference{##1}{##2}% } \providecommand{\Dimplicitcitationreference}[2]{% % Ditto for citation references. \Dimplicitfootnotereference{##1}{##2}% } \ifthenelse{\equal{\Dprinting}{true}}{ \providecommand{\Dexplicitreferencecolor}{black} }{ \providecommand{\Dexplicitreferencecolor}{blue} } \providecommand{\Dexplicitreference}[2]{% % Create explicit reference to ID, e.g. created with "foo_". % Parameters: % 1. Target. % 2. Link text. \href{##1}{{\color{\Dexplicitreferencecolor}##2}}% } \providecommand{\Durireferencecolor}{\Dexplicitreferencecolor} \providecommand{\Durireference}[2]{% % Create reference to URI. Parameters: % 1. Target. % 2. Link text. \href{##1}{{\color{\Durireferencecolor}##2}}% }}\providecommand{\DSlanguage}{% % Set up babel. \ifthenelse{\equal{\Dlanguagebabel}{}}{}{ \RequirePackage[\Dlanguagebabel]{babel} }}\providecommand{\DAclasses}[5]{% \Difdefined{DN#4C#3}{% % Pass only contents, nothing else! \csname DN#4C#3\endcsname{#5}% }{% \Difdefined{DC#3}{% \csname DC#3\endcsname{#5}% }{% #5% }% }%}\providecommand{\Difdefined}[3]{\@ifundefined{#1}{#3}{#2}}\providecommand{\Dattr}[5]{% % Global attribute dispatcher. % Parameters: % 1. Attribute number. % 2. Attribute name. % 3. Attribute value. % 4. Node name. % 5. Node contents. \Difdefined{DN#4A#2V#3}{% \csname DN#4A#2V#3\endcsname{#1}{#2}{#3}{#4}{#5}% }{\Difdefined{DN#4A#2}{% \csname DN#4A#2\endcsname{#1}{#2}{#3}{#4}{#5}% }{\Difdefined{DA#2V#3}{% \csname DA#2V#3\endcsname{#1}{#2}{#3}{#4}{#5}% }{\Difdefined{DA#2}{% \csname DA#2\endcsname{#1}{#2}{#3}{#4}{#5}% }{#5% }}}}%}\providecommand{\DNparagraph}[1]{% \ifthenelse{\equal{\Dparagraphindented}{true}}{\indent}{\noindent}% #1%}\providecommand{\Dformatboxtitle}[1]{{\Large\textbf{#1}}}\providecommand{\Dformatboxsubtitle}[1]{{\large\textbf{#1}}}\providecommand{\Dtopictitle}[1]{% \Difinsidetoc{\vspace{1em}\par}{}% \noindent\Dformatboxtitle{#1}% \ifthenelse{\equal{\Dhassubtitle}{false}}{\vspace{1em}}{\vspace{0.5em}}% \par%}\providecommand{\Dtopicsubtitle}[1]{% \noindent\Dformatboxsubtitle{#1}% \vspace{1em}% \par%}\providecommand{\Dsidebartitle}[1]{\Dtopictitle{#1}}\providecommand{\Dsidebarsubtitle}[1]{\Dtopicsubtitle{#1}}\providecommand{\Ddocumenttitle}[1]{% \begin{center}{\Huge#1}\end{center}% \ifthenelse{\equal{\Dhassubtitle}{true}}{\vspace{0.1cm}}{\vspace{1cm}}%}\providecommand{\Ddocumentsubtitle}[1]{% \begin{center}{\huge#1}\end{center}% \vspace{1cm}%}% Can be overwritten by user stylesheet.\providecommand{\Dformatsectiontitle}[1]{#1}\providecommand{\Dformatsectionsubtitle}[1]{\Dformatsectiontitle{#1}}\providecommand{\Dbookmarksectiontitle}[1]{% % Return text suitable for use in \section*, \subsection*, etc., % containing a PDF bookmark. Parameter: The title (as node tree). \Draisedlink{\Dpdfbookmark{\Dtitleastext}}% #1%}\providecommand{\Dsectiontitlehook}[1]{#1}\providecommand{\Dsectiontitle}[1]{% \Dsectiontitlehook{% \Ddispatchsectiontitle{\Dbookmarksectiontitle{\Dformatsectiontitle{#1}}}% }%}\providecommand{\Ddispatchsectiontitle}[1]{% \@ifundefined{Dsectiontitle\roman{Dsectionlevel}}{% \Ddeepsectiontitle{#1}% }{% \csname Dsectiontitle\roman{Dsectionlevel}\endcsname{#1}% }%}\providecommand{\Ddispatchsectionsubtitle}[1]{% \Ddispatchsectiontitle{#1}%}\providecommand{\Dsectiontitlei}[1]{\section*{#1}}\providecommand{\Dsectiontitleii}[1]{\subsection*{#1}}\providecommand{\Ddeepsectiontitle}[1]{% % Anything below \subsubsection (like \paragraph or \subparagraph) % is useless because it uses the same font. The only way to % (visually) distinguish such deeply nested sections is to use % section numbering. \subsubsection*{#1}%}\providecommand{\Dsectionsubtitlehook}[1]{#1}\Dprovidelength{\Dsectionsubtitleraisedistance}{0.7em}\providecommand{\Dsectionsubtitlescaling}{0.85}\providecommand{\Dsectionsubtitle}[1]{% \Dsectionsubtitlehook{% % Move the subtitle nearer to the title. \vspace{-\Dsectionsubtitleraisedistance}% % Don't create a PDF bookmark. \Ddispatchsectionsubtitle{% \Dformatsectionsubtitle{\scalebox{\Dsectionsubtitlescaling}{#1}}% }% }%}% Boolean variable.\providecommand{\Dhassubtitle}{false}\providecommand{\DNtitle}[1]{% \csname D\Dparent title\endcsname{#1}%}\providecommand{\DNsubtitle}[1]{% \csname D\Dparent subtitle\endcsname{#1}%}\newcounter{Dpdfbookmarkid}\setcounter{Dpdfbookmarkid}{0}\providecommand{\Dpdfbookmark}[1]{% % Temporarily decrement Desctionlevel counter. \addtocounter{Dsectionlevel}{-1}% %\typeout{\arabic{Dsectionlevel}}% %\typeout{#1}% %\typeout{docutils\roman{Dpdfbookmarkid}}% %\typeout{}% \pdfbookmark[\arabic{Dsectionlevel}]{#1}{docutils\arabic{Dpdfbookmarkid}}% \addtocounter{Dsectionlevel}{1}% \addtocounter{Dpdfbookmarkid}{1}%}%\providecommand{\DNliteralblock}[1]{\begin{quote}\ttfamily\raggedright#1\end{quote}}\providecommand{\DNliteralblock}[1]{% \Dmakelistenvironment{}{% \ifthenelse{\equal{\Dinsidetabular}{true}}{% \setlength{\leftmargin}{0pt}% }{}% \setlength{\rightmargin}{0pt}% }{% \raggedright\item\noindent\nohyphens{\textnhtt{#1\Dfinalstrut}}% }%}\providecommand{\DNdoctestblock}[1]{% % Treat doctest blocks the same as literal blocks. \DNliteralblock{#1}%}\RequirePackage{hyphenat}\providecommand{\DNliteral}[1]{\textnhtt{#1}}\providecommand{\DNemphasis}[1]{\emph{#1}}\providecommand{\DNstrong}[1]{\textbf{#1}}\providecommand{\Dvisitdocument}{\begin{document}\noindent}\providecommand{\Ddepartdocument}{\end{document}}\providecommand{\DNtopic}[1]{% \ifthenelse{\equal{\DcurrentNtopicAcontents}{1}}{% \addtocounter{Dtoclevel}{1}% \par\noindent% #1% \addtocounter{Dtoclevel}{-1}% }{% \par\noindent%
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -