如果我使用 bibtext 文件,则在参考文献开头添加引文

如果我使用 bibtext 文件,则在参考文献开头添加引文

我有一个 bibtex 文件(library.bib),看起来像

Automatically generated by Mendeley Desktop 1.19.4 
Any changes to this file will be lost if it is regenerated by Mendeley.
BibTeX export options can be customized via Options -> BibTeX in Mendeley Desktop


@article{Article,
author = {Author,A}}

等等。该文件从主文件调用:\printbibliography[heading=bibintoc] 结果如下:

 References 
 [1] Article, Author, Journal (2019) etc

现在,我想在参考文献的开头,也就是第一个参考文献出现之前添加一个引文;也就是说,我想要类似这样的内容:

  References 
                 Funny sentence
                 Author of funny sentence

 [1] Article, Author, Journal (2019) etc

在章节开头,我只需添加

\epigraph{\textit{funny sentence}}{author}.

但在 bibtex 文件的参考文献中这似乎是不可能的。我该如何实现它?

答案1

最简单的方法可能是将题词代码注入参考书目标题定义中,类似于文档epigraph建议thebibliography在第 2.5 节中。

下面的标题定义基于bibintocfor book/ report(参见biblatex.def,ll. 1911-1914 于 v3.16

\documentclass[british]{book}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage{epigraph}

\usepackage[backend=biber, style=authoryear]{biblatex}

\makeatletter
% based on 'bibintoc' for book/report
\defbibheading{bibintocWithEpigraph}[\bibname]{%
  \chapter*{#1}%
  \addcontentsline{toc}{chapter}{#1}%
  \@mkboth{\abx@MakeMarkcase{#1}}{\abx@MakeMarkcase{#1}}%
  \csuse{bibepi}}
\makeatother

\newcommand*{\bibepi}{}

\addbibresource{biblatex-examples.bib}

\begin{document}
\chapter{Lorem}
\epigraph{\textit{funny sentence}}{author}
Lorem \autocite{sigfridsson}

\renewcommand*{\bibepi}{\epigraph{\textit{funny sentence}}{author}}
\printbibliography[heading=bibintocWithEpigraph]
\end{document}

书目的题词。


不需要重新定义任何参考书目标题的替代方法是使用\printbibheading\printbibliography[heading=none]

\documentclass[british]{book}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage{epigraph}

\usepackage[backend=biber, style=authoryear]{biblatex}

\addbibresource{biblatex-examples.bib}

\begin{document}
\chapter{Lorem}
\epigraph{\textit{funny sentence}}{author}
Lorem \autocite{sigfridsson}

\printbibheading[heading=bibintoc]
\epigraph{\textit{funny sentence}}{author}
\printbibliography[heading=none]
\end{document}

相关内容