针对作者和编辑的不同文内引用和参考书目风格

针对作者和编辑的不同文内引用和参考书目风格

我想在文内引用中显示作者和编辑的姓名首字母,在参考书目中显示全名。仅针对作者的类似问题和解决方案是这里。现在我希望编辑器也能有同样的功能。

梅威瑟:

\documentclass{article}

\usepackage[style=verbose-trad1]{biblatex}

\ExecuteBibliographyOptions[book]{useeditor=false}

\renewbibmacro*{cite:full}{%
  \usebibmacro{cite:full:citepages}%
  \printtext[bibhypertarget]{%
    \usedriver
      {\DeclareNameAlias{sortname}{default}}
      {\thefield{entrytype}}}%
  \usebibmacro{shorthandintro}}

\DeclareNameFormat{labelname-revinit}{%
  \ifnum\value{uniquename}<2%
    \ifuseprefix
        {\usebibmacro{name:family-given}
        {\namepartgiveni}
        {\namepartfamily}
        {\namepartprefix}
        {\namepartsuffixi}}
        {\usebibmacro{name:family-given}
        {\namepartgiveni}
        {\namepartfamily}
        {\namepartprefixi}
        {\namepartsuffixi}}
  \else
    {\usebibmacro{name:family-given}
          {\namepartfamily}
          {\namepartgiven}
          {\namepartprefix}
          {\namepartsuffix}}%
  \fi
  \usebibmacro{name:andothers}}
  
\DeclareNameAlias{default}{labelname-revinit}  

\begin{filecontents}{\jobname.bib}
@book{authoronly,
  author        = {Aniston, John},
  title         = {Make my day},
  location      = {London},
  date          = {1953},
  pagetotal     = {100},
}

@book{authorandeditor,
  author        = {Clinton, Matthew},
  editor        = {Smakowski, Andrew AND Bronson, William},
  title         = {Good things},
  location      = {Torronto},
  date          = {2014},
  pagetotal     = {200},
}

@book{editoronly,
  editor        = {Lejba, Mose},
  title         = {Big brother},
  location      = {Boston},
  date          = {2020},
  pagetotal     = {300},
}
\end{filecontents}
\addbibresource{\jobname.bib}


\begin{document}
Lorem \autocite{authoronly}

ipsum \autocite{authorandeditor}

dolor\autocite{editoronly}

\printbibliography
\end{document}

因此,现在我在所有地方都拥有良好的名字/姓氏顺序。我对作者的风格很好。但我希望出现的编辑\printbibliography也用全名书写(但顺序与作者相反)。结果: 编辑全名

在带下划线的地方应使用完整的编辑者姓名。

答案1

labelname-revinit问题中显示的定义在某些情况下将名字换成了姓氏,但没有biblatex说明这一点。这会导致不寻常的输出,例如名字和姓氏之间的逗号,这对于自然“给定家族”顺序的西方名字来说是不寻常的。

如果您对所看到的内容大致满意,但希望在引文中看到名字的首字母,在参考书目中看到完整的名字,您可能需要尝试以下操作,我们使用切换按钮abx@bool@giveninits切换到引文中的首字母。

\documentclass{article}
\usepackage[style=verbose-trad1]{biblatex}
\ExecuteBibliographyOptions[book]{useeditor=false}

\renewbibmacro*{cite:full}{%
  \usebibmacro{cite:full:citepages}%
  \printtext[bibhypertarget]{%
    \usedriver
      {\toggletrue{abx@bool@giveninits}%
       \DeclareNameAlias{sortname}{default}}
      {\thefield{entrytype}}}%
  \usebibmacro{shorthandintro}}

\DeclareNameAlias{sortname}{family-given}

\begin{filecontents}{\jobname.bib}
@book{authoronly,
  author        = {Aniston, John},
  title         = {Make my day},
  location      = {London},
  date          = {1953},
  pagetotal     = {100},
}
@book{authorandeditor,
  author        = {Clinton, Matthew},
  editor        = {Smakowski, Andrew AND Bronson, William},
  title         = {Good things},
  location      = {Torronto},
  date          = {2014},
  pagetotal     = {200},
}
@book{editoronly,
  editor        = {Lejba, Mose},
  title         = {Big brother},
  location      = {Boston},
  date          = {2020},
  pagetotal     = {300},
}
\end{filecontents}
\addbibresource{\jobname.bib}


\begin{document}
Lorem \autocite{authoronly}

ipsum \autocite{authorandeditor}

dolor\autocite{editoronly}

\printbibliography
\end{document}

安妮斯顿,约翰。《让我开心》。伦敦,1953 年。100 页。《老大哥》。莫斯·莱巴编辑。波士顿,2020 年。300 页。克林顿,马修。《好事》。安德鲁·斯马科夫斯基和威廉·布朗森编辑。多伦多,2014 年。200 页。1 J. 安妮斯顿。《让我开心》。伦敦,1953 年。100 页。2 M. 克林顿。《好事》。A. 斯马科夫斯基和 W. 布朗森编辑。多伦多,2014 年。200 页。3 《老大哥》。M. 莱巴编辑。波士顿,2020 年。300 页。

相关内容