我和以下用戶有同樣的情況: biblatex:在可能嵌套腳註的情況下增強 \autocite
我想\autocite
在\footnote
.這導致引文被括在括號中。我想改變\autocite
使用內部的行為\footnote
來列印不帶括號的引文,就像簡單的呼叫一樣\cite
。
我怎樣才能改變 的\autocite
行為\footnote
?
答案1
解決方案取決於引文風格。對於像authortitle
,以及它們各自執行verbose
的變體(以及) ,我們只需要重新定義底層宏,這樣它就不會在腳註中添加括號(通過替換為)。biblatex-juradiss
autocite=footnote
\smartcite
\mkbibparens
\textnormal
\documentclass{article}
\usepackage[style=authortitle]{biblatex}
\DeclareCiteCommand{\smartcite}[\iffootnote\textnormal\mkbibfootnote]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareMultiCiteCommand{\smartcites}
[\iffootnote\textnormal\mkbibfootnote]{\smartcite}{\multicitedelim}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@misc{A01,
author = {Author, A.},
year = {2001},
title = {Alpha},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\null\vfill% just for the example
Some text \autocite{A01}.
Some text.\footnote{A footnote \autocite{A01}.}
\printbibliography
\end{document}
對於像authoryear
預設執行的樣式autocite=inline
(使用\parencite
),我們需要聲明一個新的autocite
選項值(例如,inlineplainfootnote
),它指向一個新的底層巨集(例如,\mysmartcite
),它可以執行您想要的操作(在普通文字中新增括號,不要將它們添加到腳註中)。
\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\DeclareAutoCiteCommand{inlineplainfootnote}{\mysmartcite}{\mysmartcites}
\DeclareCiteCommand{\mysmartcite}[\iffootnote\textnormal\mkbibparens]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareMultiCiteCommand{\mysmartcites}
[\iffootnote\textnormal\mkbibparens]{\mysmartcite}{\multicitedelim}
\ExecuteBibliographyOptions{autocite=inlineplainfootnote}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@misc{A01,
author = {Author, A.},
year = {2001},
title = {Alpha},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\null\vfill% just for the example
Some text \autocite{A01}.
Some text.\footnote{A footnote \autocite{A01}.}
\printbibliography
\end{document}