使用 biblatex 对每个部分的书目进行样式化

使用 biblatex 对每个部分的书目进行样式化

我在用着

bibstyle=alphabetic,
maxnames=3,.
minnames=2,
maxalphanames=1, 

在某一节中,我有一些引用希望\fullcite。对于这些,我希望每一个列出作者(令人恼火的是,它们包含 4 到 9 位作者)。如果我设置得maxnames更高,\citet则文内引用在文档的其余部分中难以阅读。

我可以maxnames针对文档的特定部分进行设置,然后稍后再将其改回来吗?


这是一个 MWE,显示\fullcite不是列出所有作者姓名。在这个例子中,的行为\citet是好的,但我想maxnames按指示增加。

\documentclass{article}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{A+04,
  author = {Author, Aa and Buthor, Bb and Cuthor, Cc and Duthor, Dd},
  title = {Title},
  journal = {Journal title},
  year = {2001},
  volume = {1},
  number = {2},
  pages = {101--109},
  month = jan,
  note = {This is an article entry},
}
@article{A+02,
  author = {Author, Aa and Buthor, Bb},
  title = {Title},
  journal = {Journal title},
  year = {2001},
  volume = {1},
  number = {2},
  pages = {101--109},
  month = jan,
  note = {This is an article entry},
}
@article{A+03,
  author = {Author, Aa and Buthor, Bb and Cuthor, Cc},
  title = {Title},
  journal = {Journal title},
  year = {2001},
  volume = {1},
  number = {2},
  pages = {101--109},
  month = jan,
  note = {This is an article entry},
}
\end{filecontents}

\usepackage[bibstyle=alphabetic,maxnames=3,minnames=2,maxalphanames=1,natbib=true]{biblatex}
\addbibresource{\jobname.bib}

\begin{document}

\section{Fullcite}
% I want to increase maxnames here somehow:
% maxnames=10
\fullcite{A+04}
% and then I want to drop it again for the rest of the document. 
% maxnames=3

\section{In-text}
\citet{A+04} says interesting things.

\citet{A+02} says other things. 

\citet{A+03} disagree.
\end{document}

答案1

这里有几种方法:

  1. 你可以发出命令来设置maxcitenames

    \makeatletter
    \newcommand{\setmaxcitenames}[1]{%
      \numdef\blx@maxcitenames{#1}}
    \makeatother
    

    \setmaxcitenames{10}然后在部分的开始和\setmaxcitenames{3}结束处使用。

  2. 你可以创建一个新\fullauthorcite命令

    \DeclareCiteCommand{\fullauthorcite}
      {\usebibmacro{prenote}}
      {\usedriver
         {\setcounter{maxnames}{10}% use up to 10 authors
          \DeclareNameAlias{sortname}{default}}
         {\thefield{entrytype}}}
      {\multicitedelim}
      {\usebibmacro{postnote}}
    

    您也可以\fullcite像这样重新定义。

答案2

这是一个可行的想法。但我相信其他人很有可能会想出更简洁、更好的方法。无论如何,在此期间,您可以fullcite在要更改的部分重新定义maxnames,然后稍后恢复它。像这样:

\documentclass{article}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{A+04,
  author = {Author, Aa and Buthor, Bb and Cuthor, Cc and Duthor, Dd},
  title = {Title},
  journal = {Journal title},
  year = {2001},
  volume = {1},
  number = {2},
  pages = {101--109},
  month = jan,
  note = {This is an article entry},
}
@article{A+02,
  author = {Author, Aa and Buthor, Bb},
  title = {Title},
  journal = {Journal title},
  year = {2001},
  volume = {1},
  number = {2},
  pages = {101--109},
  month = jan,
  note = {This is an article entry},
}
@article{A+03,
  author = {Author, Aa and Buthor, Bb and Cuthor, Cc},
  title = {Title},
  journal = {Journal title},
  year = {2001},
  volume = {1},
  number = {2},
  pages = {101--109},
  month = jan,
  note = {This is an article entry},
}
\end{filecontents}

\usepackage[bibstyle=alphabetic,maxnames=3,minnames=2,maxalphanames=1,natbib=true]{biblatex}
\addbibresource{\jobname.bib}

\begin{document}


\let\origfullcite\fullcite
\preto\fullcite{\AtNextCite{\defcounter{maxnames}{10}}}

\section{Fullcite}
% I want to increase maxnames here somehow:
% maxnames=10
\fullcite{A+04}
% and then I want to drop it again for the rest of the document. 
% maxnames=3

\let\fullcite\origfullcite

\section{In-text}
\citet{A+04} says interesting things.

\citet{A+02} says other things. 

\citet{A+03} disagree.

\fullcite{A+04}.
\end{document}

相关内容