

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

\documentclass[twoside]{article}
    \usepackage{ctex}%[zihao=-4]
    \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,
  vmargin    = 2.54cm,
  hmargin    = 3.17cm,
  headheight = 0.8cm,
  headsep    = 0.24cm,
  footskip   = 0.79cm,
}
\usepackage[backend=biber,style=gb7714-2015mx]{biblatex}%标注(引用)样式citestyle，著录样式bibstyle都采用gb7714-2015样式
\makeatletter
\renewbibmacro*{cite:dump}{%
  \ifnumgreater{\value{cbx@tempcnta}}{0}%
    {\ifnumgreater{\value{cbx@tempcnta}}{0}%1改为0，可以将压缩起始3个编号改为2个编号
       {\bibrangedash}%
       {\multicitedelim}%
     \bibhyperref[\cbx@lastkey]{%
       \ifdef\cbx@lastprefix
         {\printtext[labelprefix]{\cbx@lastprefix}}%
         {}%
       \printtext[labelnumber]{\cbx@lastnumber}}}%
    {}%
  \setcounter{cbx@tempcnta}{0}%
  \global\undef\cbx@lastprefix}
\makeatother
%第二个refsection使用author-year样式
\setaystylesection{2}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{knuth84,
  author    = {Donald E. Knuth},
  title     = {Literate Programming},
  journal   = {The Computer Journal},
  year      = {1984},
  number    = {2},
  volume    = {27},
  pages     = {97--111},
}

@book{knuth86a,
  author    = {Donald E. Knuth},
  title     = {The {\TeX}book},
  volume    = {A},
  publisher = {Addison-Wesley},
  address   = {Reading, MA, USA},
  year      = {1986},
  series    = {Computers and Typesetting},
}

@book{lamport94,
  author    = {Leslie Lamport},
  title     = {{\LaTeX}: a Document Preparation System},
  publisher = {Addison-Wesley},
  address   = {Reading, MA, USA},
  edition   = {2},
  year      = {1994},
}

@book{tlc2,
  author    = {Frank Mittelbach and Michel Goossens and Johannes
                 Braams and David Carlisle},
  title     = {The {\LaTeX} Companion},
  publisher = {Addison-Wesley},
  address   = {Reading, MA, USA},
  edition   = {2},
  year      = {2004},
}

@collection{slg,
  editor    = {孙立广},
  title     = {顶级期刊论文摘要汇编（1999--2010）},
  address   = {合肥},
  publisher = {中国科学技术大学出版社},
  year      = {2016},
  pages     = {222},
}

@book{lyc,
  author    = {李泳池},
  title     = {张量初步和近代连续介质力学概论},
  edition   = {2},
  address   = {合肥},
  publisher = {中国科学技术大学出版社},
  year      = {2016},
  pages     = {61},
}

@book{ljs,
  author    = {刘景双},
  title     = {湿地生态系统碳、氮、硫、磷生物地球化学过程},
  address   = {合肥},
  publisher = {中国科学技术大学出版社},
  year      = {2014},
}

@incollection{cgw,
  author    = {程根伟},
  title     = {1998年长江洪水的成因与减灾对策},
  editor    = {许厚泽 and 赵其国},
  booktitle = {长江流域洪涝灾害与科技对策},
  address   = {北京},
  publisher = {科学出版社},
  year      = {1999},
  pages     = {26--32},
}

@incollection{cjb,
  author    = {陈晋镳 and 张惠民 and 朱士兴 and 赵震 and 王振刚},
  title     = {蓟县震旦亚界研究},
  editor    = {中国地质科学院天津地质矿产研究所},
  booktitle = {中国震旦亚界},
  address   = {天津},
  publisher = {天津科学技术出版社},
  year      = {1980},
  pages     = {56--114},
}

@article{kqy,
  author    = {孔庆勇 and 郭红健 and 孔庆和},
  title     = {我国科技期刊的金字塔分层模型及发展路径初探},
  journal   = {中国科技期刊研究},
  year      = {2015},
  volume    = {26},
  number    = {10},
  pages     = {1100--1103},
}

@article{yhs,
  author    = {杨洪升},
  title     = {四库馆私家抄校书考略},
  journal   = {文献},
  year      = {2013},
  number    = {1},
  pages     = {56--75},
}

@article{yx,
  author    = {于潇 and 刘义 and 柴跃廷 and others},
  title     = {互联网药品可信交易环境中主体资质审核备案模式},
  journal   = {清华大学学报(自然科学版)},
  year      = {2012},
  volume    = {52},
  number    = {11},
  pages     = {1518--1521},
}

@newspaper{dwx,
  author    = {丁文详},
  title     = {数字革命与竞争国际化},
  journal   = {中国青年报},
  year      = {2000},
  date      = {2000-11-20},
  number    = {15},
}

@patent{jxz,
  author    = {姜锡洲},
  title     = {一种温热外敷药制备方案：中国，88105607.3},
  year      = {1989},
  date      = {1989-07-26},
}

@database{wjk,
  author    = {万锦坤},
  title     = {中国大学学报论文文摘（1983--1993）（英文版）},
  medium    = {CD},
  address   = {北京},
  publisher = {中国大百科全书出版社},
  year      = {1996},
}

@phdthesis{syw,
  author    = {孙玉文},
  title     = {汉语变调构词研究},
  address   = {北京},
  school    = {北京大学},
  year      = {2000},
}

@article{wf,
  author    = {文富 and 顾丽梅},
  title     = {网络时代经济发展战略特征},
  journal   = {学术研究},
  year      = {2000},
  volume    = {21},
  number    = {4},
  pages     = {35--40},
}

@book{xd,
  author    = {肖度 and others},
  title     = {知识时代的企业合作经营},
  address   = {北京},
  publisher = {北京大学出版社},
  year      = {2000},
  pages     = {67--69},
}

@techreport{twh,
  author    = {{The White House}},
  title     = {Technology for Economic Growth},
  address   = {Washington},
  year      = {1993},
}

@article{huston,
  author    = {Hutson, Jeremy M},
  title     = {Vibrational dependence of the anisotropic intermolecular
               potential of argon-hydrogen chloride},
  journal   = {J. Phys. Chem.},
  year      = {1992},
  volume    = {96},
  number    = {11},
  pages     = {4237--4247},
}



\end{filecontents}
    \addbibresource{\jobname.bib}
    %
\def\cs#1{\textbackslash\texttt{#1}}
    \begin{document}
\begin{refsection}
	
    \section*{USTC-顺序编码制}
\stepcounter{section}
模板使用 \texttt{biblatex} 宏包来设置参考文献引用的格式，
更多引用方法可以参考该宏包的使用说明。

\subsection{角标数字标注法}

\noindent
\begin{tabular}{l@{\quad$\Rightarrow$\quad}l}
  \verb|\cite{knuth86a}|         & \cite{knuth86a}         \\
  \verb|\authornumcite{knuth86a}|        & \authornumcite{knuth86a}        \\
  \verb|\cite[42]{knuth86a}|     & \cite[42]{knuth86a}     \\
  \verb|\cite{knuth86a,tlc2}|    & \cite{knuth86a,tlc2}    \\
  \verb|\cite{knuth86a,knuth84}| & \cite{knuth86a,knuth84} \\
  \verb|\parencite{knuth86a}|         & \parencite{knuth86a}         \\
  \verb|\textcite{knuth86a}|        & \textcite{knuth86a}        \\
  \verb|\parencite[42]{knuth86a}|     & \parencite[42]{knuth86a}     \\
  \verb|\parencite{knuth86a,tlc2}|    & \parencite{knuth86a,tlc2}    \\
  \verb|\parencite{knuth86a,knuth84}| & \parencite{knuth86a,knuth84} \\
\end{tabular}


\subsection{数字标注法}

\noindent
\begin{tabular}{l@{\quad$\Rightarrow$\quad}l}
  \verb|\parencite{knuth86a}|         & \parencite{knuth86a}         \\
  \verb|\textcite{knuth86a}|        & \textcite{knuth86a}        \\
  \verb|\parencite[42]{knuth86a}|     & \parencite[42]{knuth86a}     \\
  \verb|\parencite{knuth86a,tlc2}|    & \parencite{knuth86a,tlc2}    \\
  \verb|\parencite{knuth86a,knuth84}| & \parencite{knuth86a,knuth84} \\
\end{tabular}


\vskip 2ex
注意，参考文献列表中的每条文献在正文中都要被引用
\cite{slg,lyc,ljs,cgw,cjb,kqy,yhs,yx,dwx,jxz,wjk,syw,wf,xd,twh,huston}。

    \printbibliography
\end{refsection}



\begin{refsection}



\section{USTC-著者-出版年制标注法}


\noindent
\begin{tabular}{l@{\quad$\Rightarrow$\quad}l}
  \verb|\cite{knuth86a}|         & \cite{knuth86a}         \\
  \verb|\citep{knuth86a}|        & \citep{knuth86a}        \\
  \verb|\cite[42]{knuth86a}|     & \cite[42]{knuth86a}     \\
  \verb|\cite{knuth86a,tlc2}|    & \cite{knuth86a,tlc2}    \\
  \verb|\cite{knuth86a,knuth84}| & \cite{knuth86a,knuth84} \\
\end{tabular}

\vskip 2ex
注意，参考文献列表中的每条文献在正文中都要被引用
\cite{slg,lyc,ljs,cgw,cjb,kqy,yhs,yx,dwx,jxz,wjk,syw,wf,xd,twh,huston}。

    \printbibliography
	
\end{refsection}

    \end{document} 