我使用具有以下选项名称长度选项的authoryear
样式:biblatex
maxcitenames=1, mincitenames=1, maxbibnames=999, minbibnames=999
因此,引用(通常以 发出\cite
)会正确排版,且只有一个作者,例如
莎士比亚等人,……
不过,我想排版一个\fullcite
带有所有作者的引文(通过),例如。
W. 莎士比亚、J. 奥斯汀和D. 亚当斯,《……》
我怎么能够暂时地maxcitenames
增加和的值mincitenames
?或者还有其他方法可以仅排版\fullcite
包含所有名称的引文吗?
答案1
如果您希望能够充分利用 的所有biblatex
功能\fullcite
,其中包括前注和后注,您可能想尝试此版本。
我们暂时设置maxcitenames
为maxbibnames
;显然,没有必要重新设置计数器,因为所有内容都包装在一个组中,因此分配是在本地进行的。
比下面的包装器更简单的解决方案是
\makeatletter
\DeclareCiteCommand{\longfullcite}
{\usebibmacro{prenote}}
{\usedriver
{\c@maxnames\blx@maxbibnames\relax
\DeclareNameAlias{sortname}{default}}
{\thefield{entrytype}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\makeatother
\makeatletter
\newcommand{\tempmaxup}[1]{\def\blx@maxcitenames{\blx@maxbibnames}#1}
\makeatother
\DeclareCiteCommand{\longfullcite}[\tempmaxup]
{\usebibmacro{prenote}}
{\usedriver
{\DeclareNameAlias{sortname}{default}}
{\thefield{entrytype}}}
{\multicitedelim}
{\usebibmacro{postnote}}
不幸的是,我发现没有比通过该包装命令更好的方法来实现这一点。
数学家协会
\begin{filecontents}{\jobname.bib}
@Article{Reference:1994,
author = {First I. Last and Second Y. Author and Third Z. Author and Fourth Q. Author},
title = {This is the article title},
journal = {T Journal T},
journallongtitle = {The Journal Title},
year = 1994,
volume = 50,
number = 6,
pages = {30--40},
}
\end{filecontents}
\documentclass{article}
\usepackage[style=authoryear, maxcitenames=1, maxbibnames=999]{biblatex}
\addbibresource{\jobname.bib}
\makeatletter
\newcommand{\tempmaxup}[1]{\def\blx@maxcitenames{\blx@maxbibnames}#1}
\makeatother
\DeclareCiteCommand{\longfullcite}[\tempmaxup]
{\usebibmacro{prenote}}
{\usedriver
{\DeclareNameAlias{sortname}{default}}
{\thefield{entrytype}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\begin{document}
\begin{tabular}{ l p{8cm} }
\verb|\autocite| & \autocite{Reference:1994}\\
\verb|\longfullcite| &\longfullcite{Reference:1994}\\
\verb|\longfullcite| & \longfullcite[see][14]{Reference:1994}\\
\verb|\fullcite| & \fullcite{Reference:1994}\\
\verb|\autocite| &\autocite{Reference:1994}\\
\end{tabular}
\printbibliography
\end{document}
% end of file comment
产量
答案2
如果只想更改maxnames
一个引用,您可以使用计数器:
\AtNextCite{\defcounter{maxnames}{99}}\fullcite{Reference:1994}
这将同时设置maxcitenames
和,但对于你的情况,这可能不是问题所在。不幸的是,中maxbibnames
没有计数器。maxcitenames
biblatex
您还可以为此类引用定义专用命令:
\newcommand{\longfullcite}{%
\AtNextCite{\defcounter{maxnames}{99}}%
\fullcite}
答案3
这是一种比较老套的方法。由于命令参数的复杂性\cite
,很难用代码包裹它们。因此,以下解决方案假设您只使用\fullcite
一个参数,而不使用任何可选参数。我很想看看一种更优雅的方法。
\begin{filecontents}{\jobname.bib}
@Article{Reference:1994,
author = {First I. Last and Second Y. Author and Third Z. Author and Fourth Q. Author },
title = {This is the article title},
journal = {T Journal T},
journallongtitle = {The Journal Title},
year = 1994,
volume = 50,
number = 6,
pages = {30--40}
}
\end{filecontents}
\documentclass{article}
\usepackage[style=authoryear,maxcitenames=1, mincitenames=1, maxbibnames=999,
minbibnames=999]{biblatex}
\addbibresource{\jobname.bib}
\makeatletter
\newcommand{\upmax}{\def\blx@maxcitenames{99}}
\newcommand{\dnmax}{\def\blx@maxcitenames{1}}
\makeatother
\newcommand\myfullcite[1]{\upmax\fullcite{#1}\dnmax} % does not allow pre or postnotes
\begin{document}
\autocite{Reference:1994}
\myfullcite{Reference:1994}
\autocite{Reference:1994}
\printbibliography
\end{document}