

% !Mode:: "TeX:UTF-8"
% 用于测试ucasthesis中应用biblatex-gb7714-2015的情况
%

\documentclass[twoside]{article}
\usepackage{ctex}
\usepackage{fontspec}
\setmainfont{CMU Serif}
\IfFileExists{SourceHanSerifSC-Regular.otf}
{\setCJKmainfont{SourceHanSerifSC-Regular.otf}}{}
%\IfFontExistsTF{⟨font name⟩}{⟨true branch⟩}{⟨false branch⟩}
\usepackage{xcolor}
\usepackage{toolbox}
\usepackage[colorlinks,citecolor=blue]{hyperref}
\usepackage{lipsum}
\usepackage{geometry}%,showframe,showcrop
\geometry{paper=a4paper,left=31.7mm,right=31.7mm,top=25.4mm,bottom=25.4mm}
\usepackage{bicaption}
\captionsetup[bi-first]{name={图},labelsep=period}
\captionsetup[bi-second]{name={Fig},labelsep=period}
\usepackage[backend=biber,style=gb7714-2015ay,%citestyle=authoryear-comp,%
maxcitenames=2,mincitenames=1,gbcitelocal=gb7714-2015,mergedate=none]{biblatex}%,sortcites=false,mergedate=none


\DefineBibliographyStrings{english}{
        andincite         = {和},
        andincitecn       = {和},
        andothersincitecn = {等},
        andothersincite   = {等{\adddot}},%adddot才能避开标点追踪
}

%\DefineBibliographyStrings{english}{
%        andincite         = {and},
%        andincitecn       = {和},
%        andothersincitecn = {等},
%        andothersincite   = {等{\adddot}},%adddot才能避开标点追踪
%}

%如果要求mergedate=none时年份后面加上abc等做区分
%则取消注释如下代码
%\renewbibmacro*{date}{%
%    \iffieldundef{labelyear}%
%      {\printdate}%
%      {\printtext{\iflabeldateisdate%
%           {\printdateextra}
%           {\printlabeldateextra}}}}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
%---------------------------------------------------------------------------%
%-                                                                         -%
%-                             Bibliography                                -%
%-                                                                         -%
%---------------------------------------------------------------------------%
@book{wikibook2014latex,
    title={http://en.wikibooks.org/wiki/LaTeX},
    author={Wikibook},
    year={2014},
    publisher={On-line Resources}
}
@book{lamport1986document,
    title={Document Preparation System},
    author={Lamport, Leslie},
    year={1986},
    publisher={Addison-Wesley Reading, MA}
}
@article{chen2005zhulu,
    title={著录文后参考文献的规则及注意事项},
    author={陈浩元},
    journal={编辑学报},
    volume={17},
    number={6},
    pages={413--415},
    year={2005}
}
@book{chu2004tushu,
    title={图书馆数字参考咨询服务研究},
    author={初景利 and 陈浩元},
    year={2004},
    address={北京},
    publisher={北京图书馆出版社}
}
@article{stamerjohanns2009mathml,
    title={{MathML}-aware article conversion from {LaTeX}},
    author={Stamerjohanns, Heinrich and Ginev, Deyan and David, Catalin and Misev, Dimitar and Zamdzhiev, Vladimir and Kohlhase, Michael},
    journal={Towards a Digital Mathematics Library},
    volume={16},
    number={2},
    pages={109--120},
    year={2009},
    publisher={Masaryk University Press}
}
@article{betts2005aging,
    title={Aging reduces center-surround antagonism in visual motion processing},
    author={Betts, Lisa R and Taylor, Christopher P},
    journal={Neuron},
    volume={45},
    number={3},
    pages={361--366},
    year={2005},
    publisher={Elsevier}
}

@article{bravo1990comparative,
    title={Comparative study of visual inter and intrahemispheric cortico-cortical connections in five native Chilean rodents},
    author={Bravo, Hermes and Olavarria, Jaime},
    journal={Anatomy and embryology},
    volume={181},
    number={1},
    pages={67--73},
    year={1990},
    publisher={Springer}
}
@book{hls2012jinji,
    author       = {哈里森·沃尔德伦},
    translator   = {谢远涛},
    title        = {经济数学与金融数学},
    address      = {北京},
    publisher    = {中国人民大学出版社},
    year         = {2012},
    pages        = {235--236},
}
@proceedings{niu2013zonghe,
    editor       = {牛志明 and 斯温兰德 and 雷光春},
    title        = {综合湿地管理国际研讨会论文集},
    address      = {北京},
    publisher    = {海洋出版社},
    year         = {2013},
}
@incollection{chen1980zhongguo,
    author       = {陈晋镳 and 张惠民 and 朱士兴 and 赵震 and
        王振刚},
    title        = {蓟县震旦亚界研究},
    editor       = {中国地质科学院天津地质矿产研究所},
    booktitle    = {中国震旦亚界},
    address      = {天津},
    publisher    = {天津科学技术出版社},
    year         = {1980},
    pages        = {56--114},
}
@article{yuan2012lana,
    author       = {袁训来 and 陈哲 and 肖书海},
    title        = {蓝田生物群: 一个认识多细胞生物起源和早期演化的新窗口--篇一},
    journal      = {科学通报},
    year         = {2012},
    volume       = {57},
    number       = {34},
    pages        = {3219},
}
@article{yuan2012lanb,
    author       = {袁训来 and 陈哲 and 肖书海},
    title        = {蓝田生物群: 一个认识多细胞生物起源和早期演化的新窗口--篇二},
    journal      = {科学通报},
    year         = {2012},
    volume       = {57},
    number       = {34},
    pages        = {3219},
}
@article{yuan2012lanc,
    author       = {袁训来 and 陈哲 and 肖书海},
    title        = {蓝田生物群: 一个认识多细胞生物起源和早期演化的新窗口--篇三},
    journal      = {科学通报},
    year         = {2012},
    volume       = {57},
    number       = {34},
    pages        = {3219},
}

@article{walls2013drought,
    author       = {Walls, Susan C. and Barichivich, William J. and Brown, Mary
        E.},
    title        = {Drought, deluge and declines: the impact of precipitation
        extremes on amphibians in a changing climate},
    journal      = {Biology},
    year         = {2013},
    volume       = {2},
    number       = {1},
    pages        = {399-418},
    urldate      = {2013-11-04},
    url          = {http://www.mdpi.com/2079-7737/2/1/399},
    doi          = {10.3390/biology2010399},
}

@article{Bohan1928,
    author = { ボハン, デ},
    title = { 過去及び現在に於ける英国と会 },
    journal = { 日本時報 },
    year = { 1928 },
    volume = { 17 },
    pages = { 5-9 },
    edition = { 9 },
    hyphenation = { japanese },
}

@article{Dubrovin1906,
    author = { Дубровин, А. И },
    title = { Открытое письмо Председателя Главного Совета Союза Русского Народа Санкт-Петербургскому Антонию, Первенствующему члену Священного Синода },
    journal = { Вече },
    year = { 1906 },
    volume = {  },
    edition = { 97 },
    month = { 7 дек. 1906 },
    pages = { 1-3 },
    hyphenation = { russian },
}
%---------------------------------------------------------------------------%

\end{filecontents}
    \addbibresource{\jobname.bib}
    %

    \begin{document}
    \section*{UCASTHESIS-A}
\setcounter{section}{1}
\subsection{本地化字符串的临时调整示例}

默认的本地化字符串由全局选项gbcitelocal控制，比如当前的设置条件下，有：
    {
    \cite{chu2004tushu}
    \cite{chen1980zhongguo}
    \cite{walls2013drought}
    \cite{betts2005aging}
    }


%局部调整本地化字符串的语言可以使用自定义命令的方式
%    局部强迫中文本地化字符串
%    \cncite{walls2013drought}
%    \cncite{betts2005aging}
%
%    局部强迫英文本地化字符串
%    \encite{walls2013drought}
%    \encite{betts2005aging}

%也可以使用设置toggle，设置conter等来进行设置
%主要是为了应付如下情况
%1、全文设置英文文献的本地化字符串为等.与和
%2、但在双语的题注的英文题注中则需使用英文文献的本地化字符串为et al.与and，因此需要做临时的调整。
%详见下面的调整方法。
    局部强迫中文本地化字符串
    {\defcounter{gbcitelocalcase}{1}
    \cite{chu2004tushu}
    \cite{chen1980zhongguo}
    \cite{walls2013drought}
    \cite{betts2005aging}
    }

    局部强迫英文本地化字符串
    {\defcounter{gbcitelocalcase}{2}
    \cite{chu2004tushu}
    \cite{chen1980zhongguo}
    \cite{walls2013drought}
    \cite{betts2005aging}}


    局部调整中文本地化字符串
    {%\makeatletter\csdef{abx@lstr@andothersincite}{et al.}\makeatother
    \makeatletter\csdef{abx@sstr@andothersincitecn}{et al.\isdot}\csdef{abx@sstr@andincitecn}{and}\makeatother
    \cite{chu2004tushu}
    \cite{chen1980zhongguo}
    \cite{walls2013drought}
    \cite{betts2005aging}}


    局部调整英文本地化字符串
    {%\makeatletter\csdef{abx@lstr@andothersincite}{et al.}\makeatother
    \makeatletter\csdef{abx@sstr@andothersincite}{et al.}\csdef{abx@sstr@andincite}{and}\makeatother
    \cite{chu2004tushu}
    \cite{chen1980zhongguo}
    \cite{walls2013drought}
    \cite{betts2005aging}}


\begin{figure}[!htbp]
  \centering
  \fbox{\parbox{5cm}{example fig\\在双语图题中强制使用某种语言的方式}}
  \bicaption{具体见{\cite{walls2013drought}\cite{betts2005aging}}}
    {See{\makeatletter\csdef{abx@sstr@andothersincite}{et al.}\csdef{abx@sstr@andincite}{and}\makeatother\cite{walls2013drought}
    \cite{betts2005aging}}}\label{fig:bi:lang}
\end{figure}

\begin{figure}[!htbp]
  \centering
  \fbox{\parbox{5cm}{example fig\\在双语图题中强制使用某种语言的方式}}
  \bicaption{具体见{\cite{walls2013drought}\cite{betts2005aging}}}
    {See{\setlocalbibstring{andothersincite}{et al.}\setlocalbibstring{andincite}{and}\cite{walls2013drought}
    \cite{betts2005aging}}}\label{fig:bi:lang2}
\end{figure}

    其它由全局选项gbcitelocal设置。如下节所示：

\subsection{学位论文的示例}

参考文献引用过程以实例进行介绍，假设需要引用名为"Document Preparation System"的文献，步骤如下：

1）使用Google Scholar搜索Document Preparation System，在目标条目下点击Cite，展开后选择Import into BibTeX打开此文章的BibTeX索引信息，将它们copy添加到ref.bib文件中（此文件位于Biblio文件夹下）。

2）索引第一行 \verb|@article{lamport1986document,|中 \verb|lamport1986document| 即为此文献的label (\textbf{中文文献也必须使用英文label}，一般遵照：姓氏拼音+年份+标题第一字拼音的格式)，想要在论文中索引此文献，有两种索引类型：

文本类型：\verb|\citet{lamport1986document}|。正如此处所示 \textcite{lamport1986document};

括号类型：\verb|\citep{lamport1986document}|。正如此处所示 \cite{lamport1986document}。

\textbf{多文献索引用英文逗号隔开}：

\verb|\citep{lamport1986document, chu2004tushu, chen2005zhulu}|。
正如此处所示 \cite{lamport1986document, chu2004tushu, chen2005zhulu}

更多例子如：

\textcite{walls2013drought}根据\textcite{betts2005aging}的研究，首次提出...。其中关于...\cite{walls2013drought,betts2005aging}，是当前中国...得到迅速发展的研究领域\cite{chen1980zhongguo, bravo1990comparative}。引用同一著者在同一年份出版的多篇文献时,在出版年份之后用
英文小写字母区别，如：\cite{yuan2012lana, yuan2012lanb, yuan2012lanc}。同一处引用多篇文献时,按出版年份由近及远依次标注,中间用
分号分开。
例如\cite{chen1980zhongguo,stamerjohanns2009mathml,hls2012jinji,niu2013zonghe}。

使用著者-出版年制（authoryear）式参考文献样式时，中文文献必须在BibTeX索引信息的 \textbf{key} 域（请参考ref.bib文件）填写作者姓名的拼音，才能使得文献列表按照拼音排序。参考文献表中的条目（不排序号），先按语种分类排列，语种顺 序是：中文、日文、英文、俄文、其他文种。然后，中文按汉语拼音字母顺序排列，日文按第一著者的姓氏笔画排序，西文和 俄文按第一著者姓氏首字母顺序排列。
如中\cite{niu2013zonghe}、日\cite{Bohan1928}、英\cite{stamerjohanns2009mathml}、俄\cite{Dubrovin1906}。

如此，即完成了文献的索引，请查看下本文档的参考文献一章，看看是不是就是这么简单呢？是的，就是这么简单！

不同文献样式和引用样式，如著者-出版年制（authoryear）、顺序编码制（numbers）、上标顺序编码制（super）可在Thesis.tex中对artratex.sty调用实现，


\subsection{引用(标注)标签的顺序}

\cite{chen1980zhongguo,stamerjohanns2009mathml,hls2012jinji,niu2013zonghe}

\cite{hls2012jinji,niu2013zonghe,chen1980zhongguo,stamerjohanns2009mathml}


    \printbibliography

    \end{document} 