Biblatex 缩写,表示无需编辑,第二次尝试

Biblatex 缩写,表示无需编辑,第二次尝试

参考我之前的问题我现在尝试解决缺少正在进行或正在进行的条目的编辑器的问题。因此,如果我将命令写入\noeditor字段,editor应该会得到结果,s.ed.而无需, ed.为正在进行的条目添加附加内容,也无需Ed. by.为正在进行的条目添加附加内容。

我设法editor+otherstring在 *.bbx 文件中找到了 bibmacro。但是,我不确定是否需要编辑此 bibmacro,或者是否有更简单的方法允许我切换 bib 样式而无需编辑每个样式的 bibmacro?

梅威瑟:

\documentclass{article}
\usepackage[backend=biber,style=alphabetic, autocite=footnote]{biblatex}


\begin{filecontents*}{bibliography.bib}
% Example for no editor
@Proceedings{10,
    title                       = {Proceedings of the 1st International Conference on sth},
    year                        = {2010},
    publisher               = {A Publisher},
    editor                  =   {\noeditor},
    venue                       = {London, England},
    eventdate               = {2010-01-01/2010-01-03},
    eventtitle          = {1st International Conference on sth}
}
@Inproceedings{XY10,
 crossref                   = {10},
 author                     = {LastName, FirstName and Lastname2, FirstName2},
 title                      = {Some nice title},
 pages                      = {10--20},
 bookpagination     = {page}
}
\end{filecontents*}


\addbibresource{bibliography.bib}
\nocite{*} 

\begin{document}
\null
\vfill

\printbibliography
\end{document}

答案1

您可以尝试以下操作,如果您缺少编辑器字段(并且useeditor已打开:比较和对比britannica以及10下面的 MWE),它将始终显示“S.ed.”

就像 cfr 一样,我们

\NewBibliographyString{noeditor}
\DefineBibliographyStrings{english}{%
  noeditor      =   {s\adddot ed\adddot},
}

但是之后

\renewbibmacro*{editor+others}{%
  \ifuseeditor
    {\ifnameundef{editor}
      {\bibstring{noeditor}}
      {\printnames{editor}%
       \setunit{\addcomma\space}%
       \usebibmacro{editor+othersstrg}%
       \clearname{editor}}}
    {}}

\renewbibmacro*{editor}{%
  \ifuseeditor
    {\ifnameundef{editor}
      {\bibstring{noeditor}}
      {\printnames{editor}%
       \setunit{\addcomma\space}%
       \usebibmacro{editorstrg}%
       \clearname{editor}}}
    {}}

noeditor当没有编辑器时打印。

平均能量损失

\documentclass{article}
\usepackage[backend=biber,style=alphabetic, autocite=footnote]{biblatex}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
% Example for no editor
@Proceedings{10,
  title      = {Proceedings of the 1st International Conference on sth},
  year       = {2010},
  publisher  = {A Publisher},
  venue      = {London, England},
  eventdate  = {2010-01-01/2010-01-03},
  eventtitle = {1st International Conference on sth},
}
@Inproceedings{XY10,
  crossref  = {10},
  author    = {LastName, FirstName and Lastname2, FirstName2},
  title     = {Some nice title},
  pages     = {10--20},
}
@collection{britannica,
  editor       = {Preece, Warren E.},
  title        = {The {New Encyclop{\ae}dia Britannica}},
  date         = 2003,
  edition      = 15,
  volumes      = 32,
  publisher    = {Encyclop{\ae}dia Britannica},
  location     = {Chicago, Ill.},
  options      = {useeditor=false},
  label        = {EB},
}
\end{filecontents*}


\addbibresource{\jobname.bib}
\nocite{*} 

\NewBibliographyString{noeditor}
\DefineBibliographyStrings{english}{%
  noeditor      =   {s\adddot ed\adddot},
}


\renewbibmacro*{editor+others}{%
  \ifuseeditor
    {\ifnameundef{editor}
      {\bibstring{noeditor}}
      {\printnames{editor}%
       \setunit{\addcomma\space}%
       \usebibmacro{editor+othersstrg}%
       \clearname{editor}}}
    {}}

\renewbibmacro*{editor}{%
  \ifuseeditor
    {\ifnameundef{editor}
      {\bibstring{noeditor}}
      {\printnames{editor}%
       \setunit{\addcomma\space}%
       \usebibmacro{editorstrg}%
       \clearname{editor}}}
    {}}


\begin{document}
\printbibliography
\end{document}

参考书目示例

相关内容