version 3.09

This commit is contained in:
EthanDeng
2019-08-18 18:25:37 +08:00
parent 954f131754
commit fd709816b3
4 changed files with 268 additions and 100 deletions

View File

@@ -212,7 +212,7 @@
\RequirePackage{enumerate}
% list/itemize/enumerate setting
\RequirePackage[shortlabels]{enumitem}
\RequirePackage[shortlabels,inline]{enumitem}
\setlist{nolistsep}
% caption settings
@@ -224,6 +224,8 @@
\setlength{\abovedisplayskip}{3pt}
\setlength{\belowdisplayskip}{3pt}
\setcounter{tocdepth}{1}
\RequirePackage[flushmargin]{footmisc}
\setlength{\footnotesep}{12pt}
}
\ifdefstring{\ELEGANT@toc}{twocol}{
@@ -250,25 +252,28 @@
%%
\ifdefstring{\ELEGANT@lang}{cn}{
\renewcommand{\contentsname}{\hspace{2em}}
\renewcommand{\figurename}{}
\renewcommand{\tablename}{}
\renewcommand{\partname}{\color{structurecolor}}
\renewcommand{\thepart}{\zhnumber{\arabic{part}}}
\renewcommand{\listfigurename}{}
\renewcommand{\listtablename}{}
\renewcommand{\bibname}{}
\renewcommand{\appendixname}{}
\renewcommand{\indexname}{\hspace{2em}}
\newcommand\figref[1]{\textbf{}~\ref{#1}}
\newcommand\tabref[1]{\textbf{}~\ref{#1}}
\renewcommand{\chaptername}{ \thechapter\,}
\ifdefstring{\ELEGANT@cite}{authoryear}{
\RequirePackage[authoryear]{gbt7714}
}{\relax}
\ifdefstring{\ELEGANT@cite}{numbers}{
\RequirePackage[numbers]{gbt7714}
}{\relax}
\renewcommand{\contentsname}{\hspace{2em}}
\renewcommand{\figurename}{}
\renewcommand{\tablename}{}
\renewcommand{\partname}{\color{structurecolor}}
\renewcommand{\thepart}{\zhnumber{\arabic{part}}}
\renewcommand{\listfigurename}{}
\renewcommand{\listtablename}{}
\renewcommand{\bibname}{}
\renewcommand{\appendixname}{}
\renewcommand{\indexname}{\hspace{2em}}
\newcommand\figref[1]{\textbf{}~\ref{#1}}
\newcommand\tabref[1]{\textbf{}~\ref{#1}}
\renewcommand{\chaptername}{ \thechapter\,}
\ifdefstring{\ELEGANT@cite}{authoryear}{
\RequirePackage[authoryear]{gbt7714}
}{\relax}
\ifdefstring{\ELEGANT@cite}{numbers}{
\RequirePackage[numbers]{gbt7714}
}{\relax}
\ifdefstring{\ELEGANT@cite}{super}{
\RequirePackage[super]{gbt7714}
}{\relax}
}{\relax}
\ifdefstring{\ELEGANT@lang}{en}{
\newcommand\figref[1]{\textbf{Figure}~\ref{#1}}
@@ -311,6 +316,12 @@
headsep=4mm,
footskip=12mm
}
\ifdefstring{\ELEGANT@marginpar}{margintrue}{
\geometry{
marginparwidth=5cm, marginparsep=5mm,
left=2cm,right=7cm,
}
}{\relax}
}{\relax}
\ifdefstring{\ELEGANT@device}{pad}{
@@ -604,7 +615,7 @@
\RequirePackage{adforn}
\newenvironment{problemset}[1][\ifdefstring{\ELEGANT@lang}{en}{\textbf{\chaptername\, Exercise}}{\textbf{\chaptername\, }}]{
\begin{center}
% \ifdefstring{\ELEGANT@lang}{en}{\addcontentsline{toc}{section}{\chaptername\, Exercise} }{\addcontentsline{toc}{section}{\chaptername\, }}
\ifdefstring{\ELEGANT@lang}{en}{\addcontentsline{toc}{section}{\texorpdfstring{\chaptername\,}{Chapter} Exercise} }{\addcontentsline{toc}{section}{\texorpdfstring{\chaptername\,}{}}}
\textcolor{structurecolor}{\Large\bfseries\adftripleflourishleft~#1~\adftripleflourishright}
\end{center}
\begin{enumerate}[label=\textcolor{structurecolor}{\arabic*.}]}{%
@@ -627,16 +638,32 @@
\RequirePackage{lastpage}
\fancyhf{}
\if@twoside
\fancyhead[EL,OR]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}--\thepage/\pageref*{LastPage}--}
\fancyhead[ER]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}\leftmark{}}
\fancyhead[OL]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}\rightmark}
\else
\fancyhead[R]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}--\thepage/\pageref*{LastPage}--}
\fancyhead[L]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}\rightmark}
\fi
\fancyfoot[c]{\catcode`\$=3\relax\base{structurecolor}{88}}
\ifdefstring{\ELEGANT@base}{hide}{
\if@twoside
\fancyhead[ER,OR]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}\rightmark}
\fancyhead[El,OL]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}\leftmark}
\else
\fancyhead[L]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}\leftmark}
\fancyhead[R]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}\rightmark}
\fancyfoot[c]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}--\;\thepage/\pageref*{LastPage}\;--}
\fi
}{\relax}
\ifdefstring{\ELEGANT@base}{show}{
\fancyfoot[c]{\catcode`\$=3\relax\base{structurecolor}{88}}
\if@twoside
\fancyhead[ER,OL]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}--\;\thepage/\pageref*{LastPage}\;--}
\fancyhead[EL]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}\leftmark}
\fancyhead[OR]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}\rightmark}
\else
\fancyhead[R]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}--\;\thepage/\pageref*{LastPage}\;--}
\fancyhead[L]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}\leftmark}
\fi
}{\relax}
\renewcommand{\headrule}{\color{structurecolor}\hrule width\textwidth}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{1pt}
@@ -739,9 +766,9 @@
breaklines=true,
keywordstyle=\color{winered},
commentstyle=\color{gray},
emph={elegantpaper,fontenc,fontspec,xeCJK,FiraMono,xunicode,newtxmath,figure,fig,image,img,table,itemize,enumerate,newtxtext,newtxtt,ctex,microtype,description,times,newtx,booktabs,tabular,PDFLaTeX,XeLaTeX,type1cm,BibTeX,device,color,mode,lang,amsthm,tcolorbox,titlestyle,cite,marginnote,ctex,listings},
emph={elegantpaper,fontenc,fontspec,xeCJK,FiraMono,xunicode,newtxmath,figure,fig,image,img,table,itemize,enumerate,newtxtext,newtxtt,ctex,microtype,description,times,newtx,booktabs,tabular,PDFLaTeX,XeLaTeX,type1cm,BibTeX,device,color,mode,lang,amsthm,tcolorbox,titlestyle,cite,marginnote,ctex,listings,base},
emphstyle={\color{frenchplum}},
morekeywords={DeclareSymbolFont,SetSymbolFont,toprule,midrule,bottomrule,institute,version,includegraphics,setmainfont,setsansfont,setmonofont ,setCJKmainfont,setCJKsansfont,setCJKmonofont,RequirePackage,figref,tabref,email,maketitle,keywords,definecolor,extrainfo,logo,cover,subtitle,appendix,chapter,hypersetup,mainmatter,tableofcontents,elegantpar,numbers,authoryear,heiti,kaishu,lstset,pagecolor,zhnumber,marginpar,part,equote},
morekeywords={DeclareSymbolFont,SetSymbolFont,toprule,midrule,bottomrule,institute,version,includegraphics,setmainfont,setsansfont,setmonofont ,setCJKmainfont,setCJKsansfont,setCJKmonofont,RequirePackage,figref,tabref,email,maketitle,keywords,definecolor,extrainfo,logo,cover,subtitle,appendix,chapter,hypersetup,mainmatter,tableofcontents,elegantpar,heiti,kaishu,lstset,pagecolor,zhnumber,marginpar,part,equote,marginnote},
frame=single,
tabsize=2,
rulecolor=\color{structurecolor},