mirror of
https://github.com/ElegantLaTeX/ElegantBook.git
synced 2026-01-26 04:14:35 +08:00
update biblatex
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
\documentclass[cn,11pt,chinese]{elegantbook}
|
\documentclass[cn,11pt]{elegantbook}
|
||||||
|
|
||||||
\title{ElegantBook:优美的 \LaTeX{} 书籍模板}
|
\title{ElegantBook:优美的 \LaTeX{} 书籍模板}
|
||||||
\subtitle{Elegant\LaTeX{} 经典之作}
|
\subtitle{Elegant\LaTeX{} 经典之作}
|
||||||
|
|
||||||
\author{Ethan Deng \& Liam Huang}
|
\author{Ethan Deng \& Liam Huang}
|
||||||
\institute{Elegant\LaTeX{} Program}
|
\institute{Elegant\LaTeX{} Program}
|
||||||
\date{June 3, 2020}
|
\date{July 6, 2020}
|
||||||
\version{4.0.1}
|
\version{4.0.2}
|
||||||
\bioinfo{自定义}{信息}
|
\bioinfo{自定义}{信息}
|
||||||
|
|
||||||
\extrainfo{温柔正确的人总是难以生存,因为这世界既不温柔,也不正确。—— 比企谷八幡}
|
\extrainfo{温柔正确的人总是难以生存,因为这世界既不温柔,也不正确。—— 比企谷八幡}
|
||||||
@@ -456,7 +456,7 @@ The content of theorem.
|
|||||||
|
|
||||||
\section{参考文献}
|
\section{参考文献}
|
||||||
|
|
||||||
此模板使用了 \hologo{BibTeX} 来生成参考文献,在中文示例中,使用了 \lstinline{gbt7714} 宏包。参考文献示例:\cite{en1,en2,en3} 使用了中国一个大型的 P2P 平台(人人贷)的数据来检验男性投资者和女性投资者在投资表现上是否有显著差异。
|
此模板使用了 \hologo{BibTeX} 来生成参考文献,在中文示例中,使用了 \lstinline{gbt7714} 宏包。参考文献示例:\cite{cn1,en2,en3} 使用了中国一个大型的 P2P 平台(人人贷)的数据来检验男性投资者和女性投资者在投资表现上是否有显著差异。
|
||||||
|
|
||||||
你可以在谷歌学术,Mendeley,Endnote 中获得文献条目(bib item),然后把它们添加到 \lstinline{reference.bib} 中。在文中引用的时候,引用它们的键值(bib key)即可。注意需要在编译的过程中添加 \hologo{BibTeX} 编译。如果你想添加未引用的文献,可以使用
|
你可以在谷歌学术,Mendeley,Endnote 中获得文献条目(bib item),然后把它们添加到 \lstinline{reference.bib} 中。在文中引用的时候,引用它们的键值(bib key)即可。注意需要在编译的过程中添加 \hologo{BibTeX} 编译。如果你想添加未引用的文献,可以使用
|
||||||
\begin{lstlisting}[frame=single]
|
\begin{lstlisting}[frame=single]
|
||||||
@@ -960,7 +960,7 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
|
|||||||
\end{change}
|
\end{change}
|
||||||
|
|
||||||
\nocite{*}
|
\nocite{*}
|
||||||
\bibliography{reference}
|
\printbibliography
|
||||||
\appendix
|
\appendix
|
||||||
|
|
||||||
\chapter{基本数学工具}
|
\chapter{基本数学工具}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
\documentclass[11pt,fancy,authoryear]{elegantbook}
|
\documentclass[11pt,fancy,twoside]{elegantbook}
|
||||||
|
|
||||||
\title{An Elegant \LaTeX{} Template for Books}
|
\title{An Elegant \LaTeX{} Template for Books}
|
||||||
\subtitle{Classic Elegant\LaTeX{} Template}
|
\subtitle{Classic Elegant\LaTeX{} Template}
|
||||||
|
|
||||||
\author{Ethan Deng \& Liam Huang}
|
\author{Ethan Deng \& Liam Huang}
|
||||||
\institute{Elegant\LaTeX{} Program}
|
\institute{Elegant\LaTeX{} Program}
|
||||||
\date{June 6, 2020}
|
\date{July 6, 2020}
|
||||||
\version{4.0.1}
|
\version{4.0.2}
|
||||||
\bioinfo{Bio}{Information}
|
\bioinfo{Bio}{Information}
|
||||||
|
|
||||||
\extrainfo{Victory won\rq t come to us unless we go to it. }
|
\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}
|
\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
|
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]
|
\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}
|
\end{change}
|
||||||
|
|
||||||
\nocite{en2,en3}
|
\nocite{en2,en3}
|
||||||
\bibliography{reference}
|
\printbibliography
|
||||||
|
|
||||||
\appendix
|
\appendix
|
||||||
|
|
||||||
\chapter{Mathematical Tools}
|
\chapter{Mathematical Tools}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%
|
||||||
% % !Mode:: "TeX:UTF-8"
|
% % !Mode:: "TeX:UTF-8"
|
||||||
\NeedsTeXFormat{LaTeX2e}
|
\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{kvoptions}
|
||||||
\RequirePackage{etoolbox}
|
\RequirePackage{etoolbox}
|
||||||
@@ -53,13 +53,6 @@
|
|||||||
\DeclareVoidOption{normal}{\ekv{device=normal}}
|
\DeclareVoidOption{normal}{\ekv{device=normal}}
|
||||||
\DeclareVoidOption{pad}{\ekv{device=pad}}
|
\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{newtx}{\ekv{math=newtx}}
|
||||||
\DeclareVoidOption{mtpro2}{\ekv{math=mtpro2}}
|
\DeclareVoidOption{mtpro2}{\ekv{math=mtpro2}}
|
||||||
\DeclareVoidOption{cm}{\ekv{math=cm}}
|
\DeclareVoidOption{cm}{\ekv{math=cm}}
|
||||||
@@ -86,6 +79,10 @@
|
|||||||
\LoadClass[a4paper,oneside]{book}
|
\LoadClass[a4paper,oneside]{book}
|
||||||
|
|
||||||
\RequirePackage{setspace}
|
\RequirePackage{setspace}
|
||||||
|
|
||||||
|
\RequirePackage{csquotes}
|
||||||
|
|
||||||
|
|
||||||
\RequirePackage{hyperref}
|
\RequirePackage{hyperref}
|
||||||
\hypersetup{
|
\hypersetup{
|
||||||
breaklinks,
|
breaklinks,
|
||||||
@@ -167,7 +164,9 @@
|
|||||||
\fi
|
\fi
|
||||||
\AfterEndPreamble{
|
\AfterEndPreamble{
|
||||||
% \renewcommand{\itshape}{\kaishu}
|
% \renewcommand{\itshape}{\kaishu}
|
||||||
\setlength\parindent{2\ccwd}}}{\relax}
|
\setlength\parindent{2\ccwd}}
|
||||||
|
}{\relax}
|
||||||
|
|
||||||
|
|
||||||
\ifcsname kaishu\endcsname
|
\ifcsname kaishu\endcsname
|
||||||
\newcommand{\citshape}{\kaishu}
|
\newcommand{\citshape}{\kaishu}
|
||||||
@@ -295,9 +294,6 @@
|
|||||||
|
|
||||||
\newcommand{\question}[1]{{\par\citshape #1}\\[0.2ex]}
|
\newcommand{\question}[1]{{\par\citshape #1}\\[0.2ex]}
|
||||||
|
|
||||||
\ifdefstring{\ELEGANT@lang}{cn}{\relax}{
|
|
||||||
\RequirePackage[\ELEGANT@cite,sort&compress]{natbib}}
|
|
||||||
|
|
||||||
\RequirePackage{enumerate}
|
\RequirePackage{enumerate}
|
||||||
% list/itemize/enumerate setting
|
% list/itemize/enumerate setting
|
||||||
\RequirePackage[shortlabels,inline]{enumitem}
|
\RequirePackage[shortlabels,inline]{enumitem}
|
||||||
@@ -338,6 +334,18 @@
|
|||||||
\RequirePackage{fancyvrb}
|
\RequirePackage{fancyvrb}
|
||||||
\RequirePackage{makecell,lipsum,hologo}
|
\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}{
|
\ifdefstring{\ELEGANT@lang}{cn}{
|
||||||
\renewcommand{\contentsname}{目录}
|
\renewcommand{\contentsname}{目录}
|
||||||
\renewcommand{\figurename}{图}
|
\renewcommand{\figurename}{图}
|
||||||
@@ -358,12 +366,6 @@
|
|||||||
\newcommand{\institutename}{\citshape 组织:}
|
\newcommand{\institutename}{\citshape 组织:}
|
||||||
\newcommand{\datename}{\citshape 时间:}
|
\newcommand{\datename}{\citshape 时间:}
|
||||||
\newcommand{\versionname}{\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}{笔记}
|
\newcommand{\notename}{笔记}
|
||||||
\renewcommand*{\proofname}{证明}
|
\renewcommand*{\proofname}{证明}
|
||||||
\newcommand{\problemname}{例题}
|
\newcommand{\problemname}{例题}
|
||||||
@@ -385,7 +387,8 @@
|
|||||||
\newcommand{\problemsetname}{习题}
|
\newcommand{\problemsetname}{习题}
|
||||||
\newcommand\bioinfo[2]{\gdef\@bioinfo{{\citshape #1}:#2}}
|
\newcommand\bioinfo[2]{\gdef\@bioinfo{{\citshape #1}:#2}}
|
||||||
\newcommand{\updatename}{更新:}
|
\newcommand{\updatename}{更新:}
|
||||||
\newcommand{\historyname}{版本更新历史}}{\relax}
|
\newcommand{\historyname}{版本更新历史}
|
||||||
|
}{\relax}
|
||||||
\ifdefstring{\ELEGANT@lang}{en}{
|
\ifdefstring{\ELEGANT@lang}{en}{
|
||||||
\setlength\parindent{2em}
|
\setlength\parindent{2em}
|
||||||
\newcommand\figref[1]{\textbf{Figure}~\ref{#1}}
|
\newcommand\figref[1]{\textbf{Figure}~\ref{#1}}
|
||||||
@@ -396,7 +399,6 @@
|
|||||||
\newcommand{\institutename}{\textbf{Institute: }}
|
\newcommand{\institutename}{\textbf{Institute: }}
|
||||||
\newcommand{\datename}{\textbf{Date: }}
|
\newcommand{\datename}{\textbf{Date: }}
|
||||||
\newcommand{\versionname}{\textbf{Version: }}
|
\newcommand{\versionname}{\textbf{Version: }}
|
||||||
\bibliographystyle{\ELEGANT@bibstyle}
|
|
||||||
\newcommand{\notename}{Note}
|
\newcommand{\notename}{Note}
|
||||||
\newcommand{\proofname}{Proof}
|
\newcommand{\proofname}{Proof}
|
||||||
\newcommand{\problemname}{Problem}
|
\newcommand{\problemname}{Problem}
|
||||||
@@ -431,7 +433,6 @@
|
|||||||
\newcommand{\institutename}{\textbf{Istituto: }}
|
\newcommand{\institutename}{\textbf{Istituto: }}
|
||||||
\newcommand{\datename}{\textbf{Data: }}
|
\newcommand{\datename}{\textbf{Data: }}
|
||||||
\newcommand{\versionname}{\textbf{Versione: }}
|
\newcommand{\versionname}{\textbf{Versione: }}
|
||||||
\bibliographystyle{\ELEGANT@bibstyle}
|
|
||||||
\newcommand{\notename}{Nota}
|
\newcommand{\notename}{Nota}
|
||||||
\newcommand{\proofname}{Dimostrazione}
|
\newcommand{\proofname}{Dimostrazione}
|
||||||
\newcommand{\problemname}{Problema}
|
\newcommand{\problemname}{Problema}
|
||||||
@@ -456,8 +457,6 @@
|
|||||||
\newcommand{\historyname}{Cronologia delle versioni}
|
\newcommand{\historyname}{Cronologia delle versioni}
|
||||||
}{\relax}
|
}{\relax}
|
||||||
|
|
||||||
\setlength{\bibsep}{0.0pt}
|
|
||||||
\def\bibfont{\footnotesize}
|
|
||||||
|
|
||||||
\RequirePackage{xpatch}
|
\RequirePackage{xpatch}
|
||||||
\xpatchcmd{\part}{
|
\xpatchcmd{\part}{
|
||||||
@@ -513,9 +512,7 @@
|
|||||||
|
|
||||||
%%define the note and proof environment
|
%%define the note and proof environment
|
||||||
\RequirePackage{pifont,manfnt,bbding}
|
\RequirePackage{pifont,manfnt,bbding}
|
||||||
|
|
||||||
\RequirePackage[many]{tcolorbox}
|
\RequirePackage[many]{tcolorbox}
|
||||||
|
|
||||||
% \newlength{\normalparindent}
|
% \newlength{\normalparindent}
|
||||||
% \setlength{\normalparindent}{\parindent}
|
% \setlength{\normalparindent}{\parindent}
|
||||||
\ifdefstring{\ELEGANT@mode}{fancy}{
|
\ifdefstring{\ELEGANT@mode}{fancy}{
|
||||||
@@ -565,7 +562,6 @@
|
|||||||
overlay unbroken and last={
|
overlay unbroken and last={
|
||||||
\node[anchor=south east, outer sep=0pt] at (\linewidth-width,0) {
|
\node[anchor=south east, outer sep=0pt] at (\linewidth-width,0) {
|
||||||
\textcolor{third}{$\spadesuit$}};}},}
|
\textcolor{third}{$\spadesuit$}};}},}
|
||||||
|
|
||||||
% \newtcbtheorem[auto counter,number within=chapter]{definition}{\definitionname}{defstyle}{def}
|
% \newtcbtheorem[auto counter,number within=chapter]{definition}{\definitionname}{defstyle}{def}
|
||||||
\DeclareTColorBox[auto counter,number within=chapter]{definition}{ o t\label g }{
|
\DeclareTColorBox[auto counter,number within=chapter]{definition}{ o t\label g }{
|
||||||
common,defstyle,
|
common,defstyle,
|
||||||
@@ -600,8 +596,7 @@
|
|||||||
\DeclareTColorBox[auto counter,number within=chapter]{proposition}{ o t\label g }{
|
\DeclareTColorBox[auto counter,number within=chapter]{proposition}{ o t\label g }{
|
||||||
common,propstyle,
|
common,propstyle,
|
||||||
IfValueTF={#1}{title={\propositionname~\thetcbcounter\ (#1)}}{title=\propositionname~\thetcbcounter},
|
IfValueTF={#1}{title={\propositionname~\thetcbcounter\ (#1)}}{title=\propositionname~\thetcbcounter},
|
||||||
IfBooleanTF={#2}{label=#3}{}}
|
IfBooleanTF={#2}{label=#3}{}}}{\relax}
|
||||||
}{\relax}
|
|
||||||
|
|
||||||
|
|
||||||
\ifdefstring{\ELEGANT@mode}{simple}{
|
\ifdefstring{\ELEGANT@mode}{simple}{
|
||||||
@@ -886,4 +881,6 @@
|
|||||||
|
|
||||||
\newenvironment{change}{
|
\newenvironment{change}{
|
||||||
\begin{enumerate}[label=\small\protect\circled{\arabic*}]}{
|
\begin{enumerate}[label=\small\protect\circled{\arabic*}]}{
|
||||||
\end{enumerate}}
|
\end{enumerate}}
|
||||||
|
|
||||||
|
\addbibresource[location=local]{reference.bib}
|
||||||
Reference in New Issue
Block a user