如何让 \edcite 使用 shorteditor(如果 biblatex-chicago 中可用)

如何让 \edcite 使用 shorteditor(如果 biblatex-chicago 中可用)

这个问题是关于\edcite命令的创建David Purton (@DavidPurton),后来更新了它biblatex-chicago与的选择一致short

如果可能的话,我想进一步更新该\edcite命令,以便当它应该生成简短形式时(无论是由于重复引用还是因为short选择了该选项),它首先检查是否存在非空shorteditor字段,如果是则使用它,如果不是则默认为\printnames[given-family]{editor}

梅威瑟:

\documentclass{article}

\usepackage[notes,short]{biblatex-chicago}

\begin{filecontents*}{\jobname.bib}
@book{basil:hex:mendieta.rudberg1997,
    Address = {Berlin},
    Author = {Basil of Caesarea},
    Editor = {Emmanuel Amand de Mendieta and Rudberg, Stig Y.},
    Publisher = {Akademie Verlag},
    Shortauthor = {Basil},
    Shorteditor = {Mend./Rud.},
    Title = {Homilien zum Hexaemeron},
    Year = {1997}}
\end{filecontents*}
\addbibresource{\jobname.bib}

\newbibmacro*{edcite}{%
  \ifboolexpr{
    test {\ifciteibid}
    and
    not test {\iffirstonpage}
  }
    {\usebibmacro{cite:ibid}}
    {\ifboolexpr{
      test {\ifciteseen}
      or
      togl {cms@allshort}
     }
       {\printnames[labelname]{editor}}
       {\printnames[given-family]{editor}%
        \newcunit
        \usebibmacro{cpubl+loc+year}}}}

\DeclareCiteCommand{\edcite}
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{edcite}}
  {\multicitedelim}
  {\usebibmacro{cite:postnote}}

\DeclareMultiCiteCommand{\edcites}{\edcite}{\multicitedelim}
\newrobustcmd*{\edvolcite}{\volcitecmd\edcite}
\newrobustcmd*{\edvolcites}{\volcitecmd\edcites}

\begin{document}
\edcite{basil:hex:mendieta.rudberg1997}
\end{document}

电流输出:

门迪埃塔和鲁德伯格

期望输出:

修补/修整。

答案1

最简单的解决方案是调整edcite宏来测试该字段是否存在shorteditor

\newbibmacro*{edcite}{%
  \ifboolexpr{
    test {\ifciteibid}
    and
    not test {\iffirstonpage}
  }
    {\usebibmacro{cite:ibid}}
    {\ifboolexpr{
      test {\ifciteseen}
      or
      togl {cms@allshort}
     }
       {\ifnameundef{shorteditor}
          {\printnames[labelname]{editor}}
          {\printnames[labelname]{shorteditor}}}
       {\printnames[given-family]{editor}%
        \newcunit
        \usebibmacro{cpubl+loc+year}}}}

相关内容