如何通过引用相同的 bib 条目来生成新的参考标识符

如何通过引用相同的 bib 条目来生成新的参考标识符

我正在为一个目前没有 LaTeX 模板的期刊准备一篇文章,但我的所有材料都是 LaTeX 格式的。它有一个我还没有见过的比较特殊的参考引用指南,所以也许我的问题有一个简单的答案,而且已经有可用的软件包了,因为我不是所有样式的专家,所以我不知道该搜索什么。如果不存在,我想在bibtex或中创建一个biblatex

规则是每个都会在文本和参考文献部分\cite{}生成一个新条目[x]。如果引用键在过去已经被引用,那么它只会引用带有注释的第一个引用。对于下面的 MWE,这应该导致参考文献列表呈现为(当然带有适当的内联编号,其中[1, Lemelisk et. al, Chapter 3, p. 123]应该替换为[2]):

参考

[1] B. 勒梅利斯克、W. 塔金、D. 维达和 D. 西迪厄斯。死星。奥德朗和雅文 4,0 BBY。

[2] Lemelisk 等,第 3 章,第 174 页。 123 [1]

[3] B. 勒梅利斯克,W. 塔金,D. 维达,D. 西迪厄斯。《死星 II》。恩多,4 ABY。

平均能量损失

\documentclass{article}

\usepackage{lipsum}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc
{
  death-star,
  author       = {Bevel Lemelisk and Wilhuff Tarkin and Darth Vader and Darth Sidious},
  title        = {{Death Star}},
  howpublished = {Alderaan and Yavin 4},
  year         = {0 BBY}
}
@misc
{
  death-star-2,
  author       = {Bevel Lemelisk and Wilhuff Tarkin and Darth Vader and Darth Sidious},
  title        = {{Death Star II}},
  howpublished = {Endor},
  year         = {4 ABY}
}
\end{filecontents}

\begin{document}

They first built \emph{Death Star}~\cite{death-star}.

\lipsum[1]

The design flaw was found in \cite[Lemelisk et al., Chapter 3, p. 123]{death-star}.

\lipsum[2]

To address the flaw, they designed \emph{Death Star 2}~\cite{death-star-2}
that featured many smaller diameter heat exhaust vents.

\bibliographystyle{abbrv}
\bibliography{\jobname}

\end{document}

答案1

这不是一个完整的解决方案,但我希望它能为您提供一个基础。要调整格式(例如,如果您只想要首字母或其他格式),请参阅手册biblatex

\documentclass{article}

\usepackage{lipsum}
\usepackage{filecontents}
\usepackage{endnotes}
\usepackage[citestyle=verbose-note, notetype=endonly, singletitle=false, backend=biber]{biblatex}    
% I haven't tested with BibTeX, so I don't want this code uncommented here. However, I gather from an edit that Serguei has determined it to work with the BibTeX backend. To use this, comment the previous line and uncomment the next. Note, however, that some features are not supported by the legacy backend.  
% \usepackage[citestyle=verbose-note, notetype=endonly, singletitle=false, backend=bibtex]{biblatex}

\bibliography{\jobname}
\begin{filecontents}{\jobname.bib}
    @misc
    {
        death-star,
        author       = {Bevel Lemelisk and Wilhuff Tarkin and Darth Vader and Darth Sidious},
        title        = {{Death Star}},
        howpublished = {Alderaan and Yavin 4},
        year         = {0 BBY}
    }
    @misc
    {
        death-star-2,
        author       = {Bevel Lemelisk and Wilhuff Tarkin and Darth Vader and Darth Sidious},
        title        = {{Death Star II}},
        howpublished = {Endor},
        year         = {4 ABY}
    }
\end{filecontents}

\def\enotesize{\normalsize}
\renewcommand{\notesname}{References}
\renewcommand{\makeenmark}{\mkbibbrackets{\theenmark}}

\makeatletter
\renewbibmacro*{footcite:note}{% adapted from verbose-note.cbx
    \ifnameundef{labelname}
    {\printfield{label}}{}%
    \setunit*{\addspace}%
    \printtext{%
        \mkbibbrackets{%
            \ref{cbx@\csuse{cbx@f@\thefield{entrykey}}}}%
        \iftoggle{cbx:pageref}
        {\ifsamepage{\the\value{instcount}}
            {\csuse{cbx@f@\thefield{entrykey}}}
            {}
            {\addcomma\space\bibstring{page}\addnbspace
                \pageref{cbx@\csuse{cbx@f@\thefield{entrykey}}}}}
        {}}}
\makeatother

\begin{document}

    They first built \emph{Death Star}~\autocite{death-star}.

    \lipsum[1]

    The design flaw was found in \autocite[Lemelisk et al., Chapter 3, p. 123][]{death-star}.

    \lipsum[2]

    To address the flaw, they designed \emph{Death Star 2}~\autocite{death-star-2}
    that featured many smaller diameter heat exhaust vents.

    \renewcommand{\makeenmark}{\mkbibbrackets{\theenmark}\addspace}
    \theendnotes

\end{document}

将参考文献调整为尾注

编辑[作者:Serguei]

  • AGitHub 风格的项目forleonardo.cls已启动并用于基于此答案的几篇文章提交。欢迎进一步贡献。

答案2

我认为 bibtex 的 crossref 字段就是您要找的。使用 crossref,bibitem 会从父级中复制缺少的字段(这使得这里的杂项工作变得非常糟糕……),添加在参考文献中添加的字段(“注释”),并在参考书中引用它。

以你的例子来说:

\documentclass{article}

\usepackage{lipsum}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
    @misc{death-star-a,
      author       = {Bevel Lemelisk and Wilhuff Tarkin and Darth Vader and Darth Sidious},
      title        = {{Death Star}},
      howpublished = {Alderaan and Yavin 4},
      year         = {0 BBY}
    }
    @misc{death-star-b,
      crossref     = {death-star-a},
      chapter      = {3},
      pages        = {123}
    }
    @misc{death-star-2,
      title        = {{Death Star II}},
      howpublished = {Endor},
      year         = {4 ABY}
    }
\end{filecontents}

\begin{document}

They first built \emph{Death Star}~\cite{death-star-a}.

\lipsum[1]

The design flaw was found in \cite{death-star-b}.

\lipsum[2]

To address the flaw, they designed \emph{Death Star 2}~\cite{death-star-2}
that featured many smaller diameter heat exhaust vents.

\bibliographystyle{abbrv}
\bibliography{\jobname}

\end{document}

相关内容