在埃塞俄比亚的命名惯例中,一个人的名字后面是父亲的名字和祖父的名字。即使在正式场合,通常也会用自己的名字来称呼这个人。因此,一位名叫 Kebede Daniel Demeke 的教授在专业上被称为 Kebede 教授,而不是 Demeke 教授。如果我要引用 Kebede 博士的一本书,我的理解是引用应该写“(Kebede 2012)”,参考书目条目应该是“Kebede Daniel Demeke。2012”。一本重要的书“……”
我正在撰写一份报告,其中将包含埃塞俄比亚和非埃塞俄比亚来源。有没有办法构造我的 Bibtex 文件中的条目,以便埃塞俄比亚名称按上述方式处理,而非埃塞俄比亚名称则以通常的方式处理(例如,“(Smith 2012)”;“Smith, John Q. 2012.另一本重要的书……”)?
如果相关的话,我会使用 Biber 和 XeLaTeX。
感谢您的帮助。
答案1
从biblatex
3.8/Biber 2.8 开始,您可以执行以下操作。
biblatex
使文件中的新名称部分为人所知.dbx
(在下面的示例中,它是ethiopian.dbx
通过调用和创建的filecontents
,您不需要这样做,它只需要放在 LaTeX 可以找到它的地方)
\DeclareDatamodelConstant[type=list]{nameparts}{prefix,family,suffix,given,patronymic,papponymic}
patronymic
我们添加了父亲的名字和papponymic
祖父的名字的两个部分。
然后我们需要调整埃塞俄比亚人姓名的排序
\DeclareSortingNamekeyTemplate[ethiopian]{
\keypart{
\namepart{given}
}
\keypart{
\namepart{patronymic}
}
\keypart{
\namepart{papponymic}
}
}
如果需要消除歧义,唯一性规则也可以更改为包括名字和父名。
\DeclareUniquenameTemplate[ethiopian]{
\namepart[base=true]{given}
\namepart[disambiguation=full]{patronymic}
\namepart[disambiguation=full]{papponymic}
}
名字是用name:
宏打印的
\newbibmacro*{name:ethiopian}[3]{%
\usebibmacro{name:delim}{#1#2#3}%
\usebibmacro{name:hook}{#1#2#3}%
\mkbibethgiven{#1}%
\ifdefvoid{#2}{}{\bibnamedelimd\mkbibethpat{#2}\isdot}%
\ifdefvoid{#3}{}{\bibnamedelimd\mkbibethpap{#3}\isdot}}
\let\mkbibethgiven\mkbibnamefamily
\let\mkbibethpat\mkbibnamegiven
\let\mkbibethpap\mkbibnamegiven
使用\ifsortingnamekeytemplatename
,\ifuniquenametemplatename
然后我们可以分支名称格式的定义
\DeclareNameAlias{sortname}{family-given}
\DeclareNameFormat{given-family}{%
\ifsortingnamekeytemplatename{ethiopian}
{\usebibmacro{name:ethiopian}
{\namepartgiven}
{\namepartpatronymic}
{\namepartpapponymic}}
{\ifgiveninits
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}}%
\usebibmacro{name:andothers}}
\DeclareNameFormat{family-given}{%
\ifsortingnamekeytemplatename{ethiopian}
{\usebibmacro{name:ethiopian}
{\namepartgiven}
{\namepartpatronymic}
{\namepartpapponymic}}
{\ifgiveninits
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}}%
\usebibmacro{name:andothers}}
\DeclareNameFormat{labelname}{%
\ifuniquenametemplatename{ethiopian}
{\usebibmacro{labelname:ethiopian}}
{\usebibmacro{labelname:western}}%
\usebibmacro{name:andothers}}
\newbibmacro{labelname:ethiopian}{%
\iffieldequalstr{uniquepart}{base}
{\usebibmacro{name:ethiopian}
{\namepartgiven}
{\empty}
{\empty}}
{\iffieldequalstr{uniquepart}{patronymic}
{\usebibmacro{name:ethiopian}
{\namepartgiven}
{\namepartpatronymic}
{\empty}}
{\usebibmacro{name:ethiopian}
{\namepartgiven}
{\namepartpatronymic}
{\namepartpapponymic}}}}
\newbibmacro{labelname:western}{%
\ifcase\value{uniquename}%
\usebibmacro{name:family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}%
\or
\ifuseprefix
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffixi}}
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefixi}
{\namepartsuffixi}}%
\or
\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}%
\fi}
在您的.bib
文件中,您可以按如下方式命名
author = {given=Kebede, patronymic=Daniel, papponymic=Demeke, nametemplates=ethiopian},
这是必要的,因为 BibTeX 的传统命名规则无法正确解析名称。
总共
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{ethiopian.dbx}
\DeclareDatamodelConstant[type=list]{nameparts}{prefix,family,suffix,given,patronymic,papponymic}
\end{filecontents*}
\begin{filecontents*}{\jobname.bib}
@BOOK{kebede,
author = {given=Kebede, patronymic=Daniel, papponymic=Demeke, nametemplates=ethiopian},
title = {One},
date = {1983}
}
@BOOK{two,
author = {given=Daniel, patronymic=Demeke, nametemplates=ethiopian},
title = {Two},
date = {1984}
}
@BOOK{three,
author = {given=Daniel, patronymic=Kebede, nametemplates=ethiopian},
title = {Three},
date = {1985}
}
\end{filecontents*}
\usepackage[style=authoryear,datamodel=ethiopian]{biblatex}
\addbibresource{biblatex-examples.bib}
\addbibresource{\jobname.bib}
\DeclareSortingNamekeyTemplate[ethiopian]{
\keypart{
\namepart{given}
}
\keypart{
\namepart{patronymic}
}
\keypart{
\namepart{papponymic}
}
}
\DeclareUniquenameTemplate[ethiopian]{
\namepart[base=true]{given}
\namepart[disambiguation=full]{patronymic}
\namepart[disambiguation=full]{papponymic}
}
\DeclareNameAlias{sortname}{family-given}
\DeclareNameFormat{given-family}{%
\ifsortingnamekeytemplatename{ethiopian}
{\usebibmacro{name:ethiopian}
{\namepartgiven}
{\namepartpatronymic}
{\namepartpapponymic}}
{\ifgiveninits
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}}%
\usebibmacro{name:andothers}}
\DeclareNameFormat{family-given}{%
\ifsortingnamekeytemplatename{ethiopian}
{\usebibmacro{name:ethiopian}
{\namepartgiven}
{\namepartpatronymic}
{\namepartpapponymic}}
{\ifgiveninits
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}}%
\usebibmacro{name:andothers}}
\DeclareNameFormat{labelname}{%
\ifuniquenametemplatename{ethiopian}
{\usebibmacro{labelname:ethiopian}}
{\usebibmacro{labelname:western}}%
\usebibmacro{name:andothers}}
\newbibmacro{labelname:ethiopian}{%
\iffieldequalstr{uniquepart}{base}
{\usebibmacro{name:ethiopian}
{\namepartgiven}
{\empty}
{\empty}}
{\iffieldequalstr{uniquepart}{patronymic}
{\usebibmacro{name:ethiopian}
{\namepartgiven}
{\namepartpatronymic}
{\empty}}
{\usebibmacro{name:ethiopian}
{\namepartgiven}
{\namepartpatronymic}
{\namepartpapponymic}}}}
\newbibmacro{labelname:western}{%
\ifcase\value{uniquename}%
\usebibmacro{name:family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}%
\or
\ifuseprefix
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffixi}}
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefixi}
{\namepartsuffixi}}%
\or
\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}%
\fi}
\newbibmacro*{name:ethiopian}[3]{%
\usebibmacro{name:delim}{#1#2#3}%
\usebibmacro{name:hook}{#1#2#3}%
\mkbibethgiven{#1}%
\ifdefvoid{#2}{}{\bibnamedelimd\mkbibethpat{#2}\isdot}%
\ifdefvoid{#3}{}{\bibnamedelimd\mkbibethpap{#3}\isdot}}
\let\mkbibethgiven\mkbibnamefamily
\let\mkbibethpat\mkbibnamegiven
\let\mkbibethpap\mkbibnamegiven
\begin{document}
\textcite{sigfridsson,knuth:ct:a,knuth:ct:b,knuth:ct:c,cicero,geer}
\textcite{kebede}
\textcite{two}
\textcite{three}
\printbibliography
\end{document}
得出