如何让 notes2bib 与 biblatex 协同工作?

如何让 notes2bib 与 biblatex 协同工作?

我一直在使用一款名为 的出色软件包,notes2bib它与 配合得非常好natbib。但是,当我尝试使用biber/biblatex时,它就无法正常工作了。从技术上讲,它运行良好,但是它忽略了我将所有引文放入上标的设置。

以下是与 完美配合的 MWE natbib

\documentclass{article}

\begin{filecontents}{MWEnatbib.bib}
@Article{Brown,
    author ="Brown, Matthew L. and Van Wieren, Ken and Tailor, Hamel N. and Hartling, David and Jean, Anthony and Merbouh, Nabyl",
    title  ="Three-dimensional printing of ellipsoidal structures using Mercury",
    journal  ="CrystEngComm",
    year  ="2018",
    doi  ="10.1039/C7CE01901G",
}
\end{filecontents}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{notes2bib}

\usepackage[super]{natbib} 

\begin{document}
This is example text\cite{Brown}.
Now this is text that needs a bibnote\bibnote[calipers]{Structure measured with calipers and rounded to the nearest}.
Now I need to refer to that bibnote again.\citenote{calipers}

\bibliographystyle{unsrtnat}
\bibliography{MWEnatbib}


\end{document}

这里将引用保留为 [1],而不是将其设为上标:

\documentclass{article}

\begin{filecontents}{MWEbiblatex.bib}
@Article{Brown,
    author ="Brown, Matthew L. and Van Wieren, Ken and Tailor, Hamel N. and Hartling, David and Jean, Anthony and Merbouh, Nabyl",
    title  ="Three-dimensional printing of ellipsoidal structures using Mercury",
    journal  ="CrystEngComm",
    year  ="2018",
    doi  ="10.1039/C7CE01901G",
}
\end{filecontents}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{notes2bib}

\usepackage[backend=biber,style=chem-rsc]{biblatex}
\addbibresource{MWEbiblatex.bib}

\begin{document}
This is example text\autocite{Brown}.
Now this is text that needs a bibnote\bibnote[calipers]{Structure measured with calipers and rounded to the nearest}.
Now I need to refer to that bibnote again.\citenote{calipers}

\printbibliography

\end{document}

我怀疑这是因为一个重新定义了\cite命令而另一个使用了\autocite,但我不知道如何解决这个问题。

答案1

cite-function文档 (第 4 页)中有一个选项notes2bib,用于设置内部使用的引用命令notes2bib。它默认为使用\cite,但为了您的目的,您可以将其设置为使用\autocite,这将为您提供所需的输出。

因此,可以将其指定为包选项:

% Make sure the biblatex package is loaded before the notes2bib package
%  or the commands won't be defined
\usepackage[backend=biber,style=chem-rsc]{biblatex}
\addbibresource{MWEbiblatex.bib}
  
\usepackage[cite-function=\autocite]{notes2bib}

或者您可以使用 notes2bib 包设置命令随后指定它:

\usepackage{notes2bib}
\bibnotesetup{cite-function=\autocite}

是的,据我所知,该natbib示例有效,因为您对包的选项重新定义了 cite 命令,否则该命令将使用基本数字[1]格式。chem-rsc样式将样式设置\autocite为上标,但不触及基本\cite命令。

相关内容