remove the warnings

This commit is contained in:
EthanDeng
2019-04-26 00:04:24 +08:00
parent 774825f729
commit 824977a888
6 changed files with 72 additions and 70 deletions

View File

@@ -4,12 +4,11 @@
%%
%% This work may be distributed and/or modified freely
%% available at https://github.com/ElegantLaTeX/ElegantBook
% %
%% Last Modification 2019-04-12
%
%%%%%%%%%%%%%%%%%%%%%
% % !Mode:: "TeX:UTF-8"
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{elegantbook}[2019/04/03 v3.07 ElegantBook document class]
\ProvidesClass{elegantbook}[2019/04/25 v3.07 ElegantBook document class]
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -65,7 +64,9 @@
% fontsetting
\PassOptionsToPackage{no-math}{fontspec}
\RequirePackage[UTF8, scheme=plain,punct=kaiming]{ctex}
\ifdefstring{\ELEGANT@lang}{cn}{
\RequirePackage[UTF8, scheme=plain]{ctex}
}
\RequirePackage{ifxetex}
@@ -199,6 +200,11 @@
\newtoks\institute
\newtoks\subtitle
\RequirePackage{natbib}
\setlength{\bibsep}{0.0pt}
\def\bibfont{\footnotesize}
\RequirePackage{enumerate}
% list/itemize/enumerate setting
@@ -221,15 +227,10 @@
\RequirePackage{multicol}
\RequirePackage{xcolor}
\RequirePackage{fancyvrb}
\RequirePackage{makecell,lipsum,bxtexlogo,setspace}
\RequirePackage{makecell,lipsum,hologo,setspace}
%%
\ifdefstring{\ELEGANT@lang}{en}{
\newcommand\figref[1]{\textbf{Figure}~\ref{#1}}
\newcommand\tabref[1]{\textbf{Table}~\ref{#1}}
\renewcommand{\chaptername}{Chapter \thechapter}
}{\relax}
\ifdefstring{\ELEGANT@lang}{cn}{
\renewcommand{\contentsname}{\hspace{2em}}
\renewcommand{\figurename}{}
@@ -243,8 +244,15 @@
\newcommand\figref[1]{\textbf{}~\ref{#1}}
\newcommand\tabref[1]{\textbf{}~\ref{#1}}
\renewcommand{\chaptername}{ \thechapter\;}
\RequirePackage[authoryear]{gbt7714}
% \bibliographystyle{aer}
}{\relax}
\ifdefstring{\ELEGANT@lang}{en}{
\newcommand\figref[1]{\textbf{Figure}~\ref{#1}}
\newcommand\tabref[1]{\textbf{Table}~\ref{#1}}
\renewcommand{\chaptername}{Chapter \thechapter}
\bibliographystyle{aer}
}{\relax}
\graphicspath{{./figure/}{./figures/}{./image/}{./images/}{./graphics/}{./graphic/}{./pictures/}{./picture/}}
@@ -264,10 +272,6 @@
\setlist[itemize,2]{label={\eitemii}}
\setlist[itemize,3]{label={\eitemiii}}
\RequirePackage{natbib}
\setlength{\bibsep}{0.0pt}
\def\bibfont{\footnotesize}
%% device settings
@@ -410,9 +414,9 @@
{\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\upshape\kaishu}}% Body font
{}% Indent amount
{\bfseries\color{main}}% Theorem head font
{.}% Punctuation after theorem head
{.5em}% Space after theorem head
{\thmname{#1}\thmnumber{ #2}\thmnote{ (#3)}}% Theorem head spec (can be left empty, meaning normal)
{}% Punctuation after theorem head
{0.5em}% Space after theorem head
{\thmname{#1} \thmnumber{#2} \thmnote{(#3)}}% Theorem head spec (can be left empty, meaning normal)
% -------------------------------------------------%
\newtheoremstyle{ethmstyle}%
{3pt}% Space above
@@ -420,9 +424,9 @@
{\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\upshape\kaishu}}% Body font
{}% Indent amount
{\bfseries\color{second}}% Theorem head font
{.}% Punctuation after theorem head
{}% Punctuation after theorem head
{.5em}% Space after theorem head
{\thmname{#1}\thmnumber{ #2}\thmnote{ (#3)}}% Theorem head spec (can be left empty, meaning normal)
{\thmname{#1} \thmnumber{#2} \thmnote{(#3)}}% Theorem head spec (can be left empty, meaning normal)
% -------------------------------------------------%
\newtheoremstyle{eprostyle}%
{3pt}% Space above
@@ -430,9 +434,9 @@
{\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\upshape\kaishu}}% Body font
{}% Indent amount
{\bfseries\color{third}}% Theorem head font
{.}% Punctuation after theorem head
{}% Punctuation after theorem head
{.5em}% Space after theorem head
{\thmname{#1}\thmnumber{ #2}\thmnote{ (#3)}}% Theorem head spec (can be left empty, meaning normal)
{\thmname{#1} \thmnumber{#2} \thmnote{(#3)}}% Theorem head spec (can be left empty, meaning normal)
\theoremstyle{edefstyle}
\newtheorem{edefinition}{\ifdefstring{\ELEGANT@lang}{en}{Definition}{}}[chapter]
@@ -477,7 +481,7 @@
\newenvironment{example}[1][]{
\refstepcounter{exam}\par\noindent\textbf{\color{main}{
\ifdefstring{\ELEGANT@lang}{en}{Example}{}
}~\theexam #1: }\rmfamily %
}\theexam #1 }\rmfamily %
}{
\par\medskip\ignorespacesafterend %
}
@@ -489,7 +493,7 @@
\newenvironment{exercise}[1][]{
\refstepcounter{exer}\par\noindent\makebox[-3pt][r]{\scriptsize\color{red!90}\HandPencilLeft\quad}\textbf{\color{main}{
\ifdefstring{\ELEGANT@lang}{en}{Exercise}{}
}~\theexer #1: }\rmfamily %
}\theexer #1 }\rmfamily %
}{
\par\medskip\ignorespacesafterend %
}
@@ -501,7 +505,7 @@
\newenvironment{problem}[1][]{
\refstepcounter{prob}\par\noindent\textbf{\color{main}{%
\ifdefstring{\ELEGANT@lang}{en}{Problem}{}
}~\theprob #1: }\rmfamily %
}\theprob #1 }\rmfamily %
}{
\par\medskip\ignorespacesafterend %
}
@@ -509,31 +513,31 @@
\newenvironment{note}{\par\noindent{\makebox[0pt][r]{\scriptsize\color{red!90}\textdbend\quad}\textbf{\color{second}
\ifdefstring{\ELEGANT@lang}{en}{Note:}{}
\ifdefstring{\ELEGANT@lang}{en}{Note}{}
}}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}}{\par}
\newenvironment{proof}{\par\noindent\textbf{\color{second}
\ifdefstring{\ELEGANT@lang}{en}{Proof:}{}
\ifdefstring{\ELEGANT@lang}{en}{Proof}{}
}\color{black!90}\small}{
%\hfill$\Box$\quad
\par}
\newenvironment{remark}{\noindent\textbf{\color{second}
\ifdefstring{\ELEGANT@lang}{en}{Remark:}{}
\ifdefstring{\ELEGANT@lang}{en}{Remark}{}
}}{\par}
\newenvironment{assumption}{\par\noindent\textbf{\color{third}
\ifdefstring{\ELEGANT@lang}{en}{Assumption:}{}
\ifdefstring{\ELEGANT@lang}{en}{Assumption}{}
}}{\par}
\newenvironment{conclusion}{\par\noindent\textbf{\color{third}
\ifdefstring{\ELEGANT@lang}{en}{Conclusion:}{}
\ifdefstring{\ELEGANT@lang}{en}{Conclusion}{}
}}{\par}
\newenvironment{solution}{\par\noindent\textbf{\color{main}
\ifdefstring{\ELEGANT@lang}{en}{Solution:}{}
\ifdefstring{\ELEGANT@lang}{en}{Solution}{}
}}{\par}
\newenvironment{property}{\par\noindent\textbf{\color{third}
\ifdefstring{\ELEGANT@lang}{en}{Property:}{}
\ifdefstring{\ELEGANT@lang}{en}{Property}{}
}}{\par}
\newenvironment{custom}[1]{\par\noindent\textbf{\color{third}
\ifdefstring{\ELEGANT@lang}{en}{#1:}{#1}
\ifdefstring{\ELEGANT@lang}{en}{#1}{#1}
}}{\par}
\ifdefstring{\ELEGANT@result}{noanswer}{
@@ -607,15 +611,15 @@
\vspace{-1.0cm}
\setstretch{2.5}
\hspace{2.5em}
\begin{minipage}[c]{0.68\linewidth}
\begin{minipage}[c]{0.67\linewidth}
{\color{darkgray}\bfseries\Large \the\subtitle\\[2ex]}
\color{gray}\kaishu\normalsize
\color{gray}\normalsize
{\renewcommand{\arraystretch}{0.618}
\begin{tabular}{l}
\ifdefstring{\ELEGANT@lang}{en}{\textbf{Author: }}{\textbf{}} \@author \\
\ifdefstring{\ELEGANT@lang}{en}{\textbf{Institute: }}{\textbf{}} \the\institute\\
\ifdefstring{\ELEGANT@lang}{en}{\textbf{Date: }}{\textbf{}} \@date\\
\ifdefstring{\ELEGANT@lang}{en}{\textbf{Version: }}{\textbf{}} \the\version\\
\ifdefstring{\ELEGANT@lang}{en}{\textbf{Author: }}{\kaishu } \@author \\
\ifdefstring{\ELEGANT@lang}{en}{\textbf{Institute: }}{\kaishu } \the\institute\\
\ifdefstring{\ELEGANT@lang}{en}{\textbf{Date: }}{\kaishu } \@date\\
\ifdefstring{\ELEGANT@lang}{en}{\textbf{Version: }}{\kaishu } \the\version\\
\end{tabular}}
\end{minipage}
\begin{minipage}[c]{0.27\linewidth}
@@ -663,7 +667,4 @@
framerule=0.2pt,
columns=flexible,
% backgroundcolor=\color{lightgrey}
}
}