update biblatex

This commit is contained in:
EthanDeng
2020-07-06 22:39:58 +08:00
parent 303d2e5c9d
commit 9092103354
3 changed files with 37 additions and 39 deletions

View File

@@ -1,12 +1,12 @@
\documentclass[cn,11pt,chinese]{elegantbook}
\documentclass[cn,11pt]{elegantbook}
\title{ElegantBook优美的 \LaTeX{} 书籍模板}
\subtitle{Elegant\LaTeX{} 经典之作}
\author{Ethan Deng \& Liam Huang}
\institute{Elegant\LaTeX{} Program}
\date{June 3, 2020}
\version{4.0.1}
\date{July 6, 2020}
\version{4.0.2}
\bioinfo{自定义}{信息}
\extrainfo{温柔正确的人总是难以生存,因为这世界既不温柔,也不正确。—— 比企谷八幡}
@@ -456,7 +456,7 @@ The content of theorem.
\section{参考文献}
此模板使用了 \hologo{BibTeX} 来生成参考文献,在中文示例中,使用了 \lstinline{gbt7714} 宏包。参考文献示例:\cite{en1,en2,en3} 使用了中国一个大型的 P2P 平台(人人贷)的数据来检验男性投资者和女性投资者在投资表现上是否有显著差异。
此模板使用了 \hologo{BibTeX} 来生成参考文献,在中文示例中,使用了 \lstinline{gbt7714} 宏包。参考文献示例:\cite{cn1,en2,en3} 使用了中国一个大型的 P2P 平台(人人贷)的数据来检验男性投资者和女性投资者在投资表现上是否有显著差异。
你可以在谷歌学术MendeleyEndnote 中获得文献条目bib item然后把它们添加到 \lstinline{reference.bib} 中。在文中引用的时候引用它们的键值bib key即可。注意需要在编译的过程中添加 \hologo{BibTeX} 编译。如果你想添加未引用的文献,可以使用
\begin{lstlisting}[frame=single]
@@ -960,7 +960,7 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
\end{change}
\nocite{*}
\bibliography{reference}
\printbibliography
\appendix
\chapter{基本数学工具}

View File

@@ -1,12 +1,12 @@
\documentclass[11pt,fancy,authoryear]{elegantbook}
\documentclass[11pt,fancy,twoside]{elegantbook}
\title{An Elegant \LaTeX{} Template for Books}
\subtitle{Classic Elegant\LaTeX{} Template}
\author{Ethan Deng \& Liam Huang}
\institute{Elegant\LaTeX{} Program}
\date{June 6, 2020}
\version{4.0.1}
\date{July 6, 2020}
\version{4.0.2}
\bioinfo{Bio}{Information}
\extrainfo{Victory won\rq t come to us unless we go to it. }
@@ -401,7 +401,7 @@ This template uses \lstinline{tikz} to customize the list environments, with \ls
\section{Bibliography}
This template uses \hologo{BibTeX} to generate the bibliography, the default bibliography style is \lstinline{aer}. Let's take a glance at the citation effect. ~\cite{en1} use data from a major peer-to-peer lending marketplace in China to study whether female and male investors evaluate loan performance differently.
This template uses \hologo{BibTeX} to generate the bibliography, the default bibliography style is \lstinline{aer}. Let's take a glance at the citation effect. ~\cite{en1} use data from a major peer-to-peer lending \cite{en3} marketplace in China to study whether female and male investors evaluate loan performance differently \parencite{en2}.
If you want to use \hologo{BibTeX}, you must create a file named \lstinline{reference.bib}, add bib items (from Google Scholar, Mendeley, EndNote, and etc.) to \lstinline{reference.bib} file, then cite the bibkey in the \lstinline{tex} file. The Bib\TeX{} will automatically generate the bibliography for the reference you cited. If you want to add some noncited reference to the bibliography, you can use
\begin{lstlisting}[frame=single]
@@ -750,7 +750,8 @@ We revised our templates now and then. This section shows the version story of E
\end{change}
\nocite{en2,en3}
\bibliography{reference}
\printbibliography
\appendix
\chapter{Mathematical Tools}

View File

@@ -8,7 +8,7 @@
%%%%%%%%%%%%%%%%%%%%%
% % !Mode:: "TeX:UTF-8"
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{elegantbook}[2020/06/03 v4.0.1 ElegantBook document class]
\ProvidesClass{elegantbook}[2020/07/06 v4.0.2 ElegantBook document class]
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -53,13 +53,6 @@
\DeclareVoidOption{normal}{\ekv{device=normal}}
\DeclareVoidOption{pad}{\ekv{device=pad}}
\DeclareStringOption[numbers]{cite}
\DeclareVoidOption{numbers}{\ekv{cite=numbers}}
\DeclareVoidOption{authoryear}{\ekv{cite=authoryear}}
\DeclareVoidOption{super}{\ekv{cite=super}}
\DeclareStringOption[apalike]{bibstyle}
\DeclareVoidOption{newtx}{\ekv{math=newtx}}
\DeclareVoidOption{mtpro2}{\ekv{math=mtpro2}}
\DeclareVoidOption{cm}{\ekv{math=cm}}
@@ -86,6 +79,10 @@
\LoadClass[a4paper,oneside]{book}
\RequirePackage{setspace}
\RequirePackage{csquotes}
\RequirePackage{hyperref}
\hypersetup{
breaklinks,
@@ -167,7 +164,9 @@
\fi
\AfterEndPreamble{
% \renewcommand{\itshape}{\kaishu}
\setlength\parindent{2\ccwd}}}{\relax}
\setlength\parindent{2\ccwd}}
}{\relax}
\ifcsname kaishu\endcsname
\newcommand{\citshape}{\kaishu}
@@ -295,9 +294,6 @@
\newcommand{\question}[1]{{\par\citshape #1}\\[0.2ex]}
\ifdefstring{\ELEGANT@lang}{cn}{\relax}{
\RequirePackage[\ELEGANT@cite,sort&compress]{natbib}}
\RequirePackage{enumerate}
% list/itemize/enumerate setting
\RequirePackage[shortlabels,inline]{enumitem}
@@ -338,6 +334,18 @@
\RequirePackage{fancyvrb}
\RequirePackage{makecell,lipsum,hologo}
%%
\ifdefstring{\ELEGANT@lang}{cn}{
\RequirePackage[
backend=biber,
style=gb7714-2015,
sorting=gb7714-2015]{biblatex}}{
\RequirePackage[
backend=biber,
style=numeric-comp,
sorting=none]{biblatex}
}
\ifdefstring{\ELEGANT@lang}{cn}{
\renewcommand{\contentsname}{}
\renewcommand{\figurename}{}
@@ -358,12 +366,6 @@
\newcommand{\institutename}{\citshape }
\newcommand{\datename}{\citshape }
\newcommand{\versionname}{\citshape }
\RequirePackage{gbt7714}
\ifdefstring{\ELEGANT@cite}{authoryear}{
\bibliographystyle{gbt7714-author-year}}{
\bibliographystyle{gbt7714-numerical}}
\ifdefstring{\ELEGANT@cite}{numbers}{
\citestyle{numbers}}{\relax}
\newcommand{\notename}{}
\renewcommand*{\proofname}{}
\newcommand{\problemname}{}
@@ -385,7 +387,8 @@
\newcommand{\problemsetname}{}
\newcommand\bioinfo[2]{\gdef\@bioinfo{{\citshape #1}#2}}
\newcommand{\updatename}{}
\newcommand{\historyname}{}}{\relax}
\newcommand{\historyname}{}
}{\relax}
\ifdefstring{\ELEGANT@lang}{en}{
\setlength\parindent{2em}
\newcommand\figref[1]{\textbf{Figure}~\ref{#1}}
@@ -396,7 +399,6 @@
\newcommand{\institutename}{\textbf{Institute: }}
\newcommand{\datename}{\textbf{Date: }}
\newcommand{\versionname}{\textbf{Version: }}
\bibliographystyle{\ELEGANT@bibstyle}
\newcommand{\notename}{Note}
\newcommand{\proofname}{Proof}
\newcommand{\problemname}{Problem}
@@ -431,7 +433,6 @@
\newcommand{\institutename}{\textbf{Istituto: }}
\newcommand{\datename}{\textbf{Data: }}
\newcommand{\versionname}{\textbf{Versione: }}
\bibliographystyle{\ELEGANT@bibstyle}
\newcommand{\notename}{Nota}
\newcommand{\proofname}{Dimostrazione}
\newcommand{\problemname}{Problema}
@@ -456,8 +457,6 @@
\newcommand{\historyname}{Cronologia delle versioni}
}{\relax}
\setlength{\bibsep}{0.0pt}
\def\bibfont{\footnotesize}
\RequirePackage{xpatch}
\xpatchcmd{\part}{
@@ -513,9 +512,7 @@
%%define the note and proof environment
\RequirePackage{pifont,manfnt,bbding}
\RequirePackage[many]{tcolorbox}
% \newlength{\normalparindent}
% \setlength{\normalparindent}{\parindent}
\ifdefstring{\ELEGANT@mode}{fancy}{
@@ -565,7 +562,6 @@
overlay unbroken and last={
\node[anchor=south east, outer sep=0pt] at (\linewidth-width,0) {
\textcolor{third}{$\spadesuit$}};}},}
% \newtcbtheorem[auto counter,number within=chapter]{definition}{\definitionname}{defstyle}{def}
\DeclareTColorBox[auto counter,number within=chapter]{definition}{ o t\label g }{
common,defstyle,
@@ -600,8 +596,7 @@
\DeclareTColorBox[auto counter,number within=chapter]{proposition}{ o t\label g }{
common,propstyle,
IfValueTF={#1}{title={\propositionname~\thetcbcounter\ (#1)}}{title=\propositionname~\thetcbcounter},
IfBooleanTF={#2}{label=#3}{}}
}{\relax}
IfBooleanTF={#2}{label=#3}{}}}{\relax}
\ifdefstring{\ELEGANT@mode}{simple}{
@@ -887,3 +882,5 @@
\newenvironment{change}{
\begin{enumerate}[label=\small\protect\circled{\arabic*}]}{
\end{enumerate}}
\addbibresource[location=local]{reference.bib}