代码拉取完成,页面将自动刷新
% Specify the class of the document.
% This is a Chinese BOOK (hence "ctexbook");
% this uses UTF8;
% this uses fonts to be specified (hence fontset=none);
% this uses the size of "小四" (hence zihao=-4);
% the numbers of equations will be displayed in the inner side
% (the left side on odd pages) (hence leqno).
% this uses A4 paper.
% Punctuation style: narrow some punctuation symbols.
\documentclass[%
UTF8,%
fontset=none,%
punct=kaiming,%
zihao=-4,%
a4paper,%
leqno%
]{ctexbook}
% Specify the fonts used by the document.
\setmainfont{XITS}
\setsansfont{Fira Sans}[
UprightFont = * Light,
BoldFont = * SemiBold,
ItalicFont = * Light Italic,
BoldItalicFont = * SemiBold Italic
]
\setmonofont{Sarasa Mono SC}[
UprightFont = * Light,
BoldFont = * Semibold,
ItalicFont = * Light Italic,
BoldItalicFont = * Semibold Italic
]
\setCJKmainfont{Source Han Serif CN}[
UprightFont = * Light,
BoldFont = Sarasa Mono SC Semibold,
ItalicFont = Sarasa Mono SC Light Italic,
BoldItalicFont = Sarasa Mono SC Semibold Italic
]
\setCJKsansfont{Sarasa Mono SC}[
UprightFont = * Light,
BoldFont = * Semibold,
ItalicFont = * Light Italic,
BoldItalicFont = * Semibold Italic
]
\setCJKmonofont{Sarasa Mono SC}[
UprightFont = * Light,
BoldFont = * Semibold,
ItalicFont = * Light Italic,
BoldItalicFont = * Semibold Italic
]
% If you do not want to use external fonts mentioned above,
% consider commenting lines 27--50
% and uncommenting lines 55--72.
% \setCJKmainfont{FandolSong}[
% UprightFont = *,
% BoldFont = FandolHei,
% ItalicFont = FandolKai,
% BoldItalicFont = FandolHei,
% ]
% \setCJKsansfont{FandolHei}[
% UprightFont = *,
% BoldFont = *,
% ItalicFont = FandolKai,
% BoldItalicFont = *,
% ]
% \setCJKmonofont{FandolFang}[
% UprightFont = *,
% BoldFont = FandolHei,
% ItalicFont = FandolKai,
% BoldItalicFont = FandolHei,
% ]
% Redefine the emphasis style.
\let\emph\relax
\DeclareTextFontCommand{\emph}{\bfseries}
% Add "pass" to retain the old page margin settings.
% \usepackage[pass]{geometry}
% Allow easier imports.
\usepackage{import}
% Make aliases.
\makeatletter
\providecommand*{\thetitle}{\@title}
\providecommand*{\theauthor}{\@author}
\providecommand*{\thedate}{\@date}
\makeatother
% This package makes modifications to existing commands easier.
\usepackage{xpatch}
% unnumbered sections, subsections, subsubsections etc.
% (parts are still numbered)
\xapptocmd{\frontmatter}{\setcounter{secnumdepth}{0}}{}{}
% numbered parts, chapters, sections,
% subsections, subsubsections etc.
\xapptocmd{\mainmatter}{\setcounter{secnumdepth}{2}}{}{}
% unnumbered sections, subsections, subsubsections etc.
% (Parts are still numbered.)
\xapptocmd{\backmatter}{\setcounter{secnumdepth}{0}}{}{}
% Modify how margin notes look.
\makeatletter
\xapptocmd{\@marginparreset}{%
\footnotesize\raggedright\sffamily\itshape%
}{}{}
\makeatother
% This is a package which makes indices.
% Load "imakeidx" (or "makeidx") before "hyperref".
\usepackage[quiet]{imakeidx}
\makeindex[intoc]
\makeindex[
name=testing,
title={List of Vegetables, Fruits and Spices},
intoc
]
% This is a package which includes a lot of logos about TeX.
\usepackage{hologo}
% This is a package which makes it possible
% to typeset numbers correctly and easily.
\usepackage[group-minimum-digits=4]{siunitx}
% These are packages which deal with mathematical formulae.
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage[
math-style=ISO,
bold-style=ISO,
mathrm=sym,
mathbf=sym,
partial=upright,
warnings-off={mathtools-colon,mathtools-overbracket}
]{unicode-math}
\allowdisplaybreaks[3]
% Standing-up-straight integral symbol (For XITS Math).
\setmathfont{XITS Math}[StylisticSet=8]
\setmathfont{TeX Gyre Termes Math}[range=bb/{latin,Latin}]
\setmathfont{STIX Two Math}[range={"2218-"2218}]
% These are packages which deal with theorem environments.
\usepackage{amsthm}
\usepackage{thmtools}
\usepackage{thm-restate}
\declaretheoremstyle[%
spaceabove=2ex,%
spacebelow=2ex,%
headfont=\normalfont\bfseries,%
notefont=\normalfont,%
notebraces={(}{)},%
bodyfont=\normalfont,%
headindent=\parindent,%
headpunct={},%
postheadspace=1em%
]{TheoremStyle}
\declaretheoremstyle[%
spaceabove=2ex,%
spacebelow=2ex,%
headfont=\normalfont\bfseries,%
notefont=\normalfont,%
notebraces={(}{)},%
bodyfont=\normalfont,%
headindent=\parindent,%
headpunct={},%
postheadspace=1em,%
qed=\qedsymbol%
]{ProofStyle}
\declaretheorem[%
style=TheoremStyle,%
name=定理,%
numberwithin=chapter%
]{theorem}
\declaretheorem[%
style=TheoremStyle,%
name=定义,%
sibling=theorem%
]{definition}
\declaretheorem[%
style=TheoremStyle,%
name=定义,%
numbered=no%
]{definition*}
\declaretheorem[%
style=TheoremStyle,%
name=命题,%
sibling=theorem%
]{proposition}
\declaretheorem[%
style=TheoremStyle,%
name=引理,%
sibling=theorem%
]{lemma}
\declaretheorem[%
style=TheoremStyle,%
name=公理,%
sibling=theorem%
]{axiom}
\declaretheorem[%
style=TheoremStyle,%
name=推论,%
sibling=theorem%
]{corollary}
\declaretheorem[%
style=TheoremStyle,%
name=例,%
sibling=theorem%
]{example}
\declaretheorem[%
style=TheoremStyle,%
name=注,%
sibling=theorem%
]{remark}
\declaretheorem[%
style=TheoremStyle,%
name=注,%
numbered=no%
]{remark*}
\declaretheorem[%
style=TheoremStyle,%
name=猜想,%
sibling=theorem%
]{conjecture}
% Undefine the proof environment provided by `amsthm`
\let\proof\relax
\let\endproof\relax
\declaretheorem[%
style=ProofStyle,%
name=证,
numbered=no%
]{proof}
\renewcommand*{\qedsymbol}{证毕.}
% These are packages which deal with hyperlinks.
\usepackage[hidelinks,hyperindex,breaklinks]{hyperref}
% Add hyperlinks to the table of contents.
\usepackage{bookmark}
% This package deals with footnotes.
% Slightly modify the style of the footnotes.
\usepackage[perpage,multiple,symbol*]{footmisc}
% This package deals with headers and footers.
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\setlength{\headheight}{15pt}
\fancyhead[LO]{\sffamily\nouppercase{\rightmark}}
\fancyhead[RO]{\sffamily\thepage}
\fancyhead[RE]{\sffamily\nouppercase{\leftmark}}
\fancyhead[LE]{\sffamily\thepage}
\renewcommand*{\headrulewidth}{0pt}
\renewcommand*{\footrulewidth}{0pt}
\fancypagestyle{plain}{%
\fancyhf{}
\fancyfoot[C]{\sffamily\thepage}
\renewcommand*{\headrulewidth}{0pt}
\renewcommand*{\footrulewidth}{0pt}
}
% If a chapter has no section,
% mark the header on the odd pages as well.
% Put the definition after fancyhdr.
\renewcommand*{\chaptermark}[1]{%
\markboth{\CTEXifname{\CTEXthechapter\hspace{\ccwd}}{%
}#1}{\CTEXifname{\CTEXthechapter\hspace{\ccwd}}{%
}#1}%
}
% No page numbers or headers or footers on empty pages.
\usepackage{emptypage}
% Ensure that the number of pages is even.
\usepackage{evenpage}
% This package deals with lists,
% including numbered and unnumbered ones.
\usepackage{enumitem}
\setlist[1]{labelindent=\parindent}
\setlist[itemize]{leftmargin=*,nosep}
\setlist[enumerate]{leftmargin=*,nosep,align=left}
\setlist[enumerate,1]{label=(\arabic*),ref=(\arabic*)}
\setlist[description]{style=nextline,leftmargin=2\parindent}
% Insert the table of bibliography (and reference).
\usepackage[backend=biber,style=gb7714-2015]{biblatex}
% Multiple .bib files can also be added.
\addbibresource{data/bibliography.bib}
\addbibresource{data/less important references.bib}
\addbibresource{data/other references.bib}
% Trick: https://tex.stackexchange.com/questions/294362/use-fira-code-font-with-ligatures-in-code-listings
% Make the mono-space font look better.
\makeatletter
\def\verbatim@nolig@list{}
\makeatother
% Display the code more easily.
\usepackage[savemem]{listings}
\lstset{% general command to set parameter(s)
basicstyle=\ttfamily,
breaklines=true,
columns=fullflexible,
keepspaces=true,
tabsize=4
}
\renewcommand*{\lstlistingname}{码}
\renewcommand*{\lstlistlistingname}{代码}
% Insert figures.
\usepackage{graphicx}
\graphicspath{{images/}}
% Insert and configure captions.
\usepackage{caption}
% Insert sub-figures.
\usepackage{subcaption}
% Make long tables.
\usepackage{longtable}
% Line break in a cell.
\providecommand*{\makecell}[2][c]{%
\begin{tabular}[#1]{@{}l@{}}#2\end{tabular}}
% This package deals with arrays.
% The following code makes it easier to input a version number
% converging to 2pi.
%
% Usage: \ApproxToTwoPi[n], where n is a positive integer
% less than 1100.
\usepackage{readarray}
\readrecordarray{data/ApproximationsTo2Pi.txt}\ApproxToTwoPi
% This package deals with glossaries.
\usepackage[nonumberlist,nopostdot,toc=true]{glossaries-extra}
\newglossary*{lore}{List of Lores}
\makenoidxglossaries
\input{data/glossary entries}
\input{data/lores}
% Enable to print all entries without even referring to them.
\glsaddall
% This is something between \fussy and \sloopy.
% Source: memoir.
\makeatletter
\providecommand*{\midsloppy}{%
\tolerance 5000%
\hbadness 4000%
\emergencystretch 1.5em%
\hfuzz .1\p@%
\vfuzz\hfuzz}
\makeatother
% Some xeCJK settings.
\xeCJKsetup{%
xCJKecglue = true,%
CheckSingle = true,%
}
% These are modifications which are
% to be inserted after \begin{document}.
\AtBeginDocument{%
% A magic that kills as many overfull lines as possible.
\midsloppy
\renewcommand*{\UrlFont}{\ttfamily}
\let\umathpi\pi
\renewcommand*{\pi}{\symup\umathpi}
\let\umathiota\iota
\renewcommand*{\iota}{\symup\umathiota}
\renewcommand*{\leq}{\leqslant}
\renewcommand*{\geq}{\geqslant}
\renewcommand*{\mathellipsis}{\cdots}
\renewcommand*{\Re}{\operatorname{Re}}
\renewcommand*{\Im}{\operatorname{Im}}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。