通过输入
Some text \autocite[88]{A01}.
Now Textcite \textcite[88]{A01}
使用这回答,我确实把脚注写对了。不幸的是,使用时有括号\textcite
,我认为这是错误的排版。
使用这答案,\textcite
按预期工作。但是,脚注中的括号现在跨越年份和页码。
使用其中一个丰富的例子并没有让我更接近。剩下的是我的 MWE。
\documentclass{article}
\usepackage[style=authoryear-icomp,autocite=footnote]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{A01,
author = {Author, A.},
year = {2001},
title = {Alpha},
journaltitle = {A Journal},
volume = {1},
number = {1},
}
@misc{B02,
author = {Buthor, B.},
year = {2002},
title = {Bravo},
location = {There},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\textheight=120pt% only for the example
\begin{document}
Some text \autocite[88]{A01}.
Some text \autocite[88]{B02}.
Some text \autocite[88]{B02}.
Now Textcite \textcite[88]{A01}
\printbibliography
\end{document}
答案1
修改authoryear-icomp
年份周围的括号并不是那么简单,所以我可以让你对\DeclareInnerCiteDelims
我的biblatex-ext
包裹? 只需使用样式style=ext-<yourstyle>
而不是style=<yourstyle>
。ext-...
样式的编写方式使其可以用作标准样式的直接替代品。
将\DeclareInnerCiteDelims{footcite}{\bibopenparen}{\bibcloseparen}
年份括在圆括号中\footcite
(如果以\autocite
结尾)。\footcite
autocite=footnote
\documentclass{article}
\usepackage[style=ext-authoryear-icomp,autocite=footnote]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{A01,
author = {Author, A.},
year = {2001},
title = {Alpha},
journaltitle = {A Journal},
volume = {1},
number = {1},
}
@misc{B02,
author = {Buthor, B.},
year = {2002},
title = {Bravo},
location = {There},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\textheight=120pt% only for the example
\DeclareInnerCiteDelims{footcite}{\bibopenparen}{\bibcloseparen}
\begin{document}
Some text \autocite[88]{A01}.
Some text \autocite[88]{B02}.
Some text \autocite[88]{B02}.
Now Textcite \textcite[88]{A01}
\printbibliography
\end{document}
编辑0.4 版本中的名称变更的biblatex-ext
。
如果你不想使用外部包,则必须按如下方式修改cite
和bibmacroscite:postnote
\makeatletter
\renewbibmacro*{cite}{%
\iffieldundef{shorthand}
{\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
{\usebibmacro{cite:ibid}}
{\ifboolexpr{test {\ifnameundef{labelname}}
or test {\iffieldundef{labelyear}}}
{\usebibmacro{cite:label}%
\setunit{%
\global\booltrue{cbx:parens}%
\printdelim{nonameyeardelim}%
\bibopenparen}%
\usebibmacro{cite:labeldate+extradate}%
\usebibmacro{cite:reinit}}
{\iffieldequals{namehash}{\cbx@lasthash}
{\ifboolexpr{test {\iffieldequals{labelyear}{\cbx@lastyear}}
and (test {\ifnumequal{\value{multicitecount}}{0}}
or test {\iffieldundef{postnote}})}
{\setunit{\addcomma}%
\usebibmacro{cite:extradate}}
{\setunit{\compcitedelim}%
\usebibmacro{cite:labeldate+extradate}%
\savefield{labelyear}{\cbx@lastyear}}}
{\printnames{labelname}%
\setunit{%
\global\booltrue{cbx:parens}%
\printdelim{nameyeardelim}%
\bibopenparen}%
\usebibmacro{cite:labeldate+extradate}%
\savefield{namehash}{\cbx@lasthash}%
\savefield{labelyear}{\cbx@lastyear}}}}}
{\usebibmacro{cite:shorthand}%
\usebibmacro{cite:reinit}}%
\setunit{%
\ifbool{cbx:parens}
{\bibcloseparen
\global\boolfalse{cbx:parens}}
{}%
\multicitedelim}}
\renewbibmacro*{cite:postnote}{%
\setunit{}%
\printtext{%
\ifbool{cbx:parens}
{\bibcloseparen
\global\boolfalse{cbx:parens}}
{}}%
\ifbool{cbx:loccit}
{}
{\usebibmacro{postnote}}}
\makeatother