%# -*- coding:utf-8 -*-
\usepackage{geometry}
\usepackage{float} %图片浮动
%\usepackage[section]{placeins} %避免浮动体跨过 \section
\usepackage{placeins}
\usepackage{array}
\usepackage{setspace} %设置间距
\usepackage{fontspec} %设置字体库
\usepackage{indentfirst} %设置第一段首行缩进
%\usepackage[backend = biber, style = gb7714-2015,gbalign=right]{biblatex}%这里style可以选择规定引用格式
%\usepackage[backend = biber, style = gb7714-2015]{biblatex} %按引用顺序排序，英文文献作者姓名样式默认
\usepackage[backend = biber, style = gb7714-2015ms,gbalign=right，gbstyle=false,gbnamefmt=givenahead]{biblatex}%按引用顺序排序，英文文献作者姓名样式加点
%\usepackage[backend = biber, style = gb7714-2015,gbalign=right，gblanorder=chineseahead,sorting=nlorder]{biblatex}%中文在前，英文在后排序
%\usepackage[backend = biber, style = gb7714-2015,gbalign=right，gblanorder=chineseahead,sorting=nlorder,gbnamefmt=givenahead]{biblatex}%中文在前，英文在后排序，英文文献作者姓名样式加点
\DeclareSortingTemplate{nlorder}{
\sort{
\field{lansortorder}%language
}
\sort{
\field{presort}
}
% \sort{
% \field{sortkey}
% }
% \sort{%[direction=descending]
% \field{sortname}
% \field{author}
% \field{editor}
% \field{translator}
% }
% \sort{
% \field{sortyear}
% \field{year}
% }
% \sort{
% \field{sorttitle}
% \field{title}
% }
% \sort{
% \field{volume}
% \literal{0}
% }
}
\renewcommand{\bibfont}{\zihao{5}} %设置参考文献字体
\setlength{\biblabelsep}{2mm} %设置间距
\addbibresource{references/paper.bib} %指定.bib文件
\setmainfont{Times New Roman} %设置西文字体
\setCJKmainfont{SimSun} %设置中文字体
\geometry{a4paper,top=2.54cm,bottom=2.54cm,left=3.17cm,right=3.17cm,head=1.57cm,foot=1.5cm}

%对齐格式
\newcommand{\PreserveBackslash}[1]{\let\temp=\\#1\let\\=\temp}
\newcolumntype{C}[1]{>{\PreserveBackslash\centering}p{#1}}
\newcolumntype{R}[1]{>{\PreserveBackslash\raggedleft}p{#1}}
\newcolumntype{L}[1]{>{\PreserveBackslash\raggedright}p{#1}}
