![使用 Biblatex,我如何以不同的方式引用不同的來源?](https://rvso.com/image/420742/%E4%BD%BF%E7%94%A8%20Biblatex%EF%BC%8C%E6%88%91%E5%A6%82%E4%BD%95%E4%BB%A5%E4%B8%8D%E5%90%8C%E7%9A%84%E6%96%B9%E5%BC%8F%E5%BC%95%E7%94%A8%E4%B8%8D%E5%90%8C%E7%9A%84%E4%BE%86%E6%BA%90%EF%BC%9F.png)
我正在編寫一份文檔,我想以特定的方式引用一個來源,並以不同的方式引用所有其他來源。更具體地說,我想引用名為“戲劇”的來源,如下所示:
「戲劇中的一些引言」(第 54 頁)
而所有其他來源應這樣引用:
「現在是別的事」(莎士比亞,哈姆雷特,第 123 頁)
我怎樣才能實現這個目標?
目前,我所有的引用都是透過該\autocite
命令完成的。
答案1
您可以嘗試抑制特定作品的所有引文輸出。但是你必須小心,只能透過頁面引用來引用這項工作。
在下面的範例中,我們抑制sigfridsson
.這裡的實作是針對authoryear
樣式的。其他樣式可以類似地處理(至少原則上),但確切的實現看起來會有所不同,並且可能要複雜得多。
\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=authoryear, backend=biber]{biblatex}
\newcommand*{\ifhidecite}{\iffieldequalstr{entrykey}{sigfridsson}}
\renewbibmacro*{cite}{%
\ifhidecite
{}
{\iffieldundef{shorthand}
{\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
{\usebibmacro{cite:label}%
\setunit{\printdelim{nonameyeardelim}}}
{\printnames{labelname}%
\setunit{\printdelim{nameyeardelim}}}%
\usebibmacro{cite:labeldate+extradate}}
{\usebibmacro{cite:shorthand}}}}
\renewbibmacro*{postnote}{%
\iffieldundef{postnote}
{\ifhidecite
{\PackageWarning{biblatex}{%
Hidden citation without postnote.\MessageBreak
The citation outout may look weird}}
{}}
{\setunit{\printdelim{postnotedelim}}%
\printfield{postnote}}}
\addbibresource{biblatex-examples.bib}
\begin{document}
\autocite[45]{sigfridsson}
\autocite[380]{worman}
\printbibliography
\end{document}
答案2
您可能不想在索引中包含主題劇的每個頁面引用。在這種情況下,您可以使用類似以下程式碼片段的 hack:
。 。 。摘自戲劇》(第~54頁)