diff --git a/makeclearfig.bat b/delete-temp-files.bat similarity index 93% rename from makeclearfig.bat rename to delete-temp-files.bat index 33f3659..f6da4ee 100644 --- a/makeclearfig.bat +++ b/delete-temp-files.bat @@ -1,5 +1,5 @@ @echo off -del /q *.aux *.bbl *.blg *.log *.out *.toc *.bcf *.xml *.synctex *.nlo *.nls *.bak *.ind *.idx *.ilg *.lof *.lot *.ent-x *.tmp *.ltx *.los *.lol *.loc *.listing *.gz *.userbak *.nav *.snm *.vrb +del /q *.aux *.bbl *.blg *.log *.out *.toc *.bcf *.xml *.synctex *.nlo *.nls *.bak *.ind *.idx *.ilg *.lof *.lot *.ent-x *.tmp *.ltx *.los *.lol *.loc *.listing *.gz *.userbak *.nav *.snm *.vrb *.synctex(busy) del /q *.nav *.snm *.vrb *.fls *.xdv *.fdb_latexmk \ No newline at end of file diff --git a/elegantbook-cn.pdf b/elegantbook-cn.pdf index 78980a5..5b7ce93 100644 Binary files a/elegantbook-cn.pdf and b/elegantbook-cn.pdf differ diff --git a/elegantbook-cn.tex b/elegantbook-cn.tex index 3b4e641..5d10102 100644 --- a/elegantbook-cn.tex +++ b/elegantbook-cn.tex @@ -1,4 +1,4 @@ -\documentclass[cn]{elegantbook} +\documentclass[cn,fancy,11pt]{elegantbook} \title{ElegantBook:优美的 \LaTeX{} 书籍模板} @@ -8,9 +8,6 @@ \institute{Elegant\LaTeX{} Program} \date{\today} -%\definecolor{main}{RGB}{0,127,0} -%\definecolor{second}{RGB}{204,102,0} -%\definecolor{third}{RGB}{0,127,127} \version{3.07} \equote{Victory won\rq t come to us unless we go to it. --- M. Moore} @@ -21,7 +18,7 @@ \begin{document} \maketitle \tableofcontents -\clearpage + % \thispagestyle{empty} \mainmatter @@ -61,40 +58,10 @@ \section{编译方式} 本模板基于基础的 book 文类,所以 book 的选项对于本模板也是有效的。默认编码为 UTF-8,推荐使用 \TeX{} Live 编译。本文编写环境为 Win10 (64bit) + \TeX{} Live 2018,支持 \lstinline{PDFLaTeX} 以及 \lstinline{XeLaTeX} 编译。 -\subsection[选择 PDFLaTeX 编译]{选择 \lstinline{PDFLaTeX} 编译} -如果你使用 \lstinline{PDFLaTeX} 编译,默认的 Computer Modern 字体被换成了 \lstinline{newtx} 系列字体,默认的字体字号是 12 pt。关于字体设置的宏包主要用到了: -\begin{itemize} - \item \lstinline{newtxtext} 用于文档正文字体,类似于 Times New Roman 字体。 - \item \lstinline{newtxmath} 用于数学字体,搭配 \lstinline{newtxtext} 非常合适。 - \item \lstinline{FiraMono} 用于打字机字体,并使用了 \lstinline{scale=0.7} 选项。 - \item \lstinline{ctex} 用于中文字体设置,并使用了 \lstinline{scheme=plain} 选项。 -\end{itemize} -一次完整的编译:\lstinline[breaklines]{PDFLaTeX -> BibTeX -> PDFLaTeX*2}。 - -\subsection[选择 XeLaTeX 编译]{选择 \lstinline{XeLaTeX} 编译} -如果你选择 \lstinline{XeLaTeX} 编译的话,那么设置字体的宏包为 \lstinline{fontspec} 和 \lstinline{xeCJK}。由于模板中使用的字体是 Windows 中的字体,所以如果你使用其他操作系统,比如 Linux 或者 Mac OS,那么你需要把所用字体替换为你系统中的字体。设置字体的命令: - -\begin{lstlisting}[frame=single] -\RequirePackage{fontenc} -\RequirePackage[no-math]{fontspec} -\setmainfont{Times New Roman}[NFSSFamily=ntxtlf] -\setsansfont{Arial} -%\setmonofont[Scale=0.7]{Courier New} -\RequirePackage{xeCJK} -\RequirePackage{xunicode} -\setCJKmainfont[BoldFont={SimHei},ItalicFont={KaiTi}]{SimSun} -\setCJKsansfont[BoldFont={SimHei},ItalicFont={KaiTi}]{KaiTi} -\setCJKmonofont[BoldFont={SimHei},ItalicFont={KaiTi},Scale=0.7]{Microsoft YaHei} -\XeTeXlinebreaklocale "zh" -\XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt -\RequirePackage{newtxmath} -\end{lstlisting} -一次完整的编译:\lstinline[breaklines]{XeLaTeX -> BibTeX -> XeLaTeX*2}。 \section{语言模式} 本模板内含两套语言环境,改变语言环境会改变图表标题的引导词(图,表),文章结构词(比如目录,参考文献等),以及定理环境中的引导词(比如定理,引理等)。不同语言模式的启用如下: - \begin{lstlisting}[frame=single] \documentclass[cn]{elegantbook} \documentclass[lang=cn]{elegantbook} @@ -109,14 +76,12 @@ \section{颜色主题} 本模板内置 4 组颜色主题,分别为 \textcolor{main1}{\lstinline{green}}(默认)、\textcolor{main2}{\lstinline{cyan}}、\textcolor{main3}{\lstinline{blue}}、\textcolor{gray}{\lstinline{plain}},另外还有一个自定义的选项 \lstinline{nocolor}。调用颜色主题 \lstinline{green} 的方法为 - \begin{lstlisting}[frame=single] \documentclass[green]{elegantbook} %or \documentclass[color=green]{elegantbook} \end{lstlisting} 其中 \textcolor{gray}{plain} 主题为全灰色。如果需要自定义颜色的话请选择 \lstinline{nocolor} 选项或者使用 \lstinline{color=none},然后在导言区定义 main、second、third 颜色,具体方法如下: - \begin{lstlisting}[frame=single] \definecolor{main}{RGB}{70,70,70} \definecolor{second}{RGB}{115,45,2} @@ -142,7 +107,6 @@ third &\makecell{ {\color{third1}\rule{1cm}{1cm}}}& \makecell{{\color{third2}\ru \section{章标题显示风格} 本模板内置 2 套\textit{章标题显示风格},包含 \lstinline{hang}(默认)与 \lstinline{display} 两种风格,区别在于章标题单行显示(\lstinline{hang})与双行显示(\lstinline{display}),本说明使用了 \lstinline{hang}。调用方式为 - \begin{lstlisting}[frame=single] \documentclass[hang]{elegantbook} %or \documentclass[titlestyle=hang]{elegantbook} @@ -166,7 +130,6 @@ third &\makecell{ {\color{third1}\rule{1cm}{1cm}}}& \makecell{{\color{third2}\ru \subsection{定理类环境的使用} 由于本模板使用了 \lstinline{tcolorbox} 宏包来定制定理类环境,所以和普通的定理环境的使用有些许区别,定理的使用方法如下: - \begin{lstlisting}[frame=single] \begin{theorem}{}{