
我在文件中有一個 biblatex 項目列表,其中還包含參考書目部分。在這一部分中,我想列出一些參考書目,\fullcite
但其風格與主要參考書目不同。
我可以這樣更改作者數量:
\begingroup
\defcounter{minnames}{2}
\fullcite{key}
\endgroup
如何進一步修改 的樣式\fullcite
?
行動網路
\documentclass[en-US,de-DE]{article}
\usepackage[
style=authoryear-ibid,
maxnames=2,
backend=biber,
safeinputenc,
isbn=false,
doi=false,
maxcitenames=2,
urldate=iso8601,
date=iso8601
]{biblatex}
\addbibresource{\jobname.bib}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{key,
author = {Author, A.},
year = {2001},
title = {Title},
publisher = {Publisher},
pagetotal = {383},
edition = {1},
pages = {151--154},
url = {http://www.google.com},
}
\end{filecontents}
\begin{document}
text1
\fullcite{key}
text2
\cite{key}
text3
\printbibliography[heading=bibintoc]
\end{document}
我想刪除列出的這些項目的年份、網址\fullcite
以及任何頁碼和書籍版本?
答案1
有兩種方法可以做到這一點:您可以重新定義命令\fullcite
來清除您不需要的字段,或者如註釋中所述,您可以用來\AtEverycitekey
執行相同的操作。
從概念上講,修改\fullcite
似乎是更好的解決方案,因為使用\AtEveryCitekey
修改了任何引用,因此如果您想從\fullcite
通常包含在常規中的任何資訊中刪除,\cite
那麼您必須使用此解決方案。
如果您只是從 中刪除 URL、版本和頁面,\fullcite
則不會有任何不良的副作用,\AtEveryCitekey
因為只有\fullcite
引用命令才會輸出這些欄位。但如果您也想刪除年份(正如您在評論中提到的),那麼修改\fullcite
是唯一的方法。為此,我已從\AtEveryCitekey
程式碼中刪除了解決方案,但將其單獨放在最後。
根據您需要抑制的訊息類型,您可能需要使用\clearfield
、\clearlist
或之一\clearname
。例如,對於publisher
, 或location
,它們的類型是列表,因此您需要使用\clearlist
來清除它們。文件第 2.2.2 節biblatex
描述了每個欄位及其資料類型。
\documentclass[en-US,de-DE]{article}
\usepackage[
style=authoryear-ibid,
maxnames=2,
backend=biber,
safeinputenc,
isbn=false,
doi=false,
maxcitenames=2,
urldate=iso8601,
date=iso8601
]{biblatex}
\addbibresource{\jobname.bib}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{key,
author = {Author, A.},
year = {2001},
title = {Title},
publisher = {Publisher},
pagetotal = {383},
edition = {1},
pages = {151--154},
url = {http://www.google.com},
}
\end{filecontents}
\DeclareCiteCommand{\fullcite}
{\usebibmacro{prenote}}
{\clearfield{url}%
\clearfield{pages}%
\clearfield{pagetotal}%
\clearfield{edition}%
\clearfield{labelyear}%
\usedriver
{\DeclareNameAlias{sortname}{default}}
{\thefield{entrytype}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\begin{document}
text1
\cite{key}
\fullcite{key}
text2
\cite{key}
text3
\printbibliography[heading=bibintoc]
\end{document}
使用\AtEveryCitekey
如上所述,\AtEveryCitekey
如果常規引用中所需的資訊與\fullcite
.這是使用該方法的程式碼:
\AtEveryCitekey{
\clearfield{url}
\clearfield{pages}
\clearfield{pagetotal}
\clearfield{edition}
\clearfield{labelyear}
}