hushidong / biblatex-gb7714-2015

A biblatex implementation of the GB/T7714-2015 bibliography style || GB/T 7714-2015 参考文献著录和标注的biblatex样式包
758 stars 83 forks source link

用法:不同的中文拼音姓名格式 #102

Open hushidong opened 2 years ago

hushidong commented 2 years ago

参考:gbnamefmt选项。

下面这个例子是局部设置的例子:


%测试计算机研究与发展期刊的文献样式
%测试gbnamefmt=quanpin选项
\documentclass{article}
\usepackage{ctex}
\usepackage[top=1cm,bottom=1cm]{geometry}
\usepackage[style=gb7714-2015,gbnamefmt=quanpin]{biblatex}%citexref=true

\begin{filecontents}{\jobname.bib}

@Book{董肇君2007--,
  Title                    = {系统工程与运筹学},
  Author                   = {董肇君},
  Date                     = {2007-06},
  Address                  = {北京},
  Publisher                = {国防工业出版社},
  edition  ={2},
  pages={297-310}
}

@Book{董肇君2007en--,
  Title                    = {Systems engineering and operations research},
  Author                   = {Dong, Zhao Jun},
  Date                     = {2007-06},
  Address                  = {Beijing},
  Publisher                = {National Defense Industry Press},
  edition  ={2},
  pages={297-310}
}

@Book{越民义2014en--,
  Title                    = {Introduction to combinatorial optimization},
  Author                   = {Yue, Yi Min and Li, Rong Yan},
  Date                     = {2014-05},
  Address                  = {Beijing},
  Publisher                = {Science Press},
  edition  ={2},
  pages={10-25}
}

@Book{越民义2014--,
  Title                    = {组合优化导论},
  Author                   = {越民义 and 李荣珩},
  Date                     = {2014-05},
  Address                  = {北京},
  Publisher                = {科学出版社},
  edition  ={2},
  pages={10-25}
}

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

\renewcommand*{\entrysetpunct}{(in chinese) (}
\renewcommand*{\finentrypunct}{)}
\renewcommand{\bibfont}{\zihao{6}}
\defbibheading{bibliography}[\bibname]{%
\paragraph{#1}}%

\begin{document}

\begin{refsection}
\defcounter{gbnamefmtcase}{0}
\defbibentryset{董肇君2007}{董肇君2007en--,董肇君2007--}
\defbibentryset{越民义2014}{越民义2014en--,越民义2014--}
\nocite{董肇君2007,越民义2014}
\printbibliography[title=国标且姓大写]
\end{refsection}

\begin{refsection}
\defcounter{gbnamefmtcase}{1}
\defbibentryset{董肇君2007}{董肇君2007en--,董肇君2007--}
\defbibentryset{越民义2014}{越民义2014en--,越民义2014--}
\nocite{董肇君2007,越民义2014}
\printbibliography[title=国标且姓首字母大写]
\end{refsection}

\begin{refsection}
\defcounter{gbnamefmtcase}{2}
\defbibentryset{董肇君2007}{董肇君2007en--,董肇君2007--}
\defbibentryset{越民义2014}{越民义2014en--,越民义2014--}
\nocite{董肇君2007,越民义2014}
\printbibliography[title=名首字母加点姓首字母大写且在后]
\end{refsection}

\begin{refsection}
\defcounter{gbnamefmtcase}{3}
\defbibentryset{董肇君2007}{董肇君2007en--,董肇君2007--}
\defbibentryset{越民义2014}{越民义2014en--,越民义2014--}
\nocite{董肇君2007,越民义2014}
\printbibliography[title=名首字母加点姓首字母大写且在前]
\end{refsection}

\begin{refsection}
\defcounter{gbnamefmtcase}{5}
\defbibentryset{董肇君2007}{董肇君2007en--,董肇君2007--}
\defbibentryset{越民义2014}{越民义2014en--,越民义2014--}
\nocite{董肇君2007,越民义2014}
\printbibliography[title=第一作者姓在前其它作者姓在后]
\end{refsection}

\begin{refsection}
\defcounter{gbnamefmtcase}{4}
\defbibentryset{董肇君2007}{董肇君2007en--,董肇君2007--}
\defbibentryset{越民义2014}{越民义2014en--,越民义2014--}
\nocite{董肇君2007,越民义2014}
\printbibliography[title=全拼姓大写名之间用短横连接]
\end{refsection}

\begin{refsection}
\defcounter{gbnamefmtcase}{4}
\def\gbpinyinlocalset{\renewrobustcmd*{\bibinitperiod}{}%
\renewcommand*{\revsdnamepunct}{}%
\renewrobustcmd*{\bibnamedelima}{\mbox{$\sim$}}}
\defbibentryset{董肇君2007}{董肇君2007en--,董肇君2007--}
\defbibentryset{越民义2014}{越民义2014en--,越民义2014--}
\nocite{董肇君2007,越民义2014}
\printbibliography[title=全拼姓大写名之间用短横连接]
\end{refsection}

\begin{refsection}
\defbibentryset{董肇君2007}{董肇君2007en--,董肇君2007--}
\defbibentryset{越民义2014}{越民义2014en--,越民义2014--}
\nocite{董肇君2007,越民义2014}
\printbibliography[title=全拼姓和名均首字母大写]
\end{refsection}

\begin{refsection}
\def\gbquanpinlocalset{\renewrobustcmd*{\bibinitperiod}{}%
\renewcommand*{\revsdnamepunct}{}%
\renewrobustcmd*{\bibnamedelima}{\mbox{$\sim$}}}
\defbibentryset{董肇君2007}{董肇君2007en--,董肇君2007--}
\defbibentryset{越民义2014}{越民义2014en--,越民义2014--}
\nocite{董肇君2007,越民义2014}
\printbibliography[title=全拼姓和名均首字母大写]
\end{refsection}

\end{document} 

结果为:

图片

BlueeHole commented 1 year ago

太感谢啦,我们学校模板要求只有首字母大写,一开始在官方文档中没有找到