多年来,多亏了这个论坛,我成功地为我的论文实现了适合我需要的书目风格。然而,我现在才意识到它已经发展得很好了,这是一个排序问题。
我希望按我的标签而不是按名称排序。我希望首先按作者单独排序,然后按两位作者排序,最后按“作者等”排序,按升序排列
我在这里找到了一些答案:如何在 biblatex 中建立复杂的参考文献排序方案? 然而,这似乎造成的问题比它解决的问题还多。
这是我的问题的图片,会更容易理解。这是我所拥有的: 这就是我想要的:
谢谢,PS:抱歉,我的 MWE 太大了:
\documentclass{article}
\usepackage{csquotes}
\usepackage{polyglossia}
\setdefaultlanguage{french}
\usepackage[%
backend=biber,
style=authoryear,
autolang=langname,
uniquename=false, %%enleve le système pour désambiguiser les auteurs
uniquelist=false, %enleve le système pour désambiguiser les auteurs
giveninits,
mergedate=false,
sorting=nyt,
maxcitenames=2,
maxbibnames=999,
mincrossrefs=1, %permet de citer l'entrée mère dès la première mention
]{biblatex}
\begin{filecontents}{\jobname.bib}
@InProceedings{agusta-boularot2017,
author = {Agusta-Boularot, Sandrine},
title = {Title},
booktitle = {booktitle},
year = {2017},
crossref = {agusta-boularot.etal2017},
}
@InProceedings{agusta-boularot2016,
author = {Sandrine Agusta-Boularot},
title = {Title},
year = {2016},
booktitle = {booktitle},
}
@Book{agusta-boularot.lafon2004,
title = {title},
year = {2004},
editor = {Sandrine Agusta-Boularot and Xavier Lafon},
}
@Book{agusta-boularot.martin2006,
title = {title},
year = {2006},
editor = {Sandrine Agusta-Boularot and Marin Martin},
}
@InProceedings{augustat-boularot.etal2019,
author = {Sandrine Agusta-Boularot and Chausserie-Laprée, Jean and N\'uria Nin},
title = {Title},
booktitle = {booktitle},
year = {2019},
timestamp = {2019-09-11},
}
@Article{agusta-boularot.etal2004,
author = {Agusta-Boularot, Sandrine and Christol Martin and Pierre Jack},
title = {Title},
journal = {Journal},
year = {2004},
volume = {17},
}
@Article{agusta-boularot.etal2010,
author = {Sandrine Agusta-Boularot and Raphaël Golosetti and Delphine Isoardi},
title = {Title},
journal = {Journal},
year = {2010},
pages = {109-126},
volume = {43},
}
@Book{agusta-boularot.etal2017,
editor = {Sandrine Agusta-Boularot and Sandrine Huber and William Van Andringa},
title = {Title},
year = {2017},
}
@InProceedings{paillet.treziny2004,
author = {Paillet, Jean-Louis and Henri Tr\'eziny},
title = {Title},
booktitle = {booktitle},
year = {2004},
editor = {Agusta-Boularot, Sandrine},
crossref = {agusta-boularot.etal2004},
timestamp = {2019-12-09},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
%%%style
\renewcommand*{\revsdnamepunct}{}
\renewcommand*{\finalnamedelim}{\multinamedelim}
\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}}
\DeclareNameAlias{byeditor}{sortname}
\DeclareNameAlias{sortname}{family-given}
\renewcommand*{\labelnamepunct}{\space\textendash\space} %tiret après le label
\renewbibmacro*{date+extrayear}{}% rajoute date
\DeclareFieldFormat
[article,inbook,incollection,inproceedings,patent,unpublished]
{title}{#1}
\renewbibmacro{in:}{% enlève guillemets articles
\ifentrytype{article}
{}
{\printtext{\bibstring{in}\intitlepunct}}}
\renewbibmacro*{issue+date}{%
\printfield{issue}%
\setunit{\addcomma\space}%
\printdate%
\newunit}
\DeclareFieldFormat{postnote}{#1} %enlève le p. automatique pour le postnote dans les citations
\renewbibmacro*{publisher+location+date}{%
\printlist{location}%
\setunit*{\addcomma\space}%
\printlist{publisher}%
\setunit*{\addcomma\space}%
\usebibmacro{date}%
\newunit}
%permet de mettre des virgules à la place des deux points après l'adresse
\newbibmacro*{institution+location+date}{%
\printlist{location}%
{\setunit*{\addcomma\space}}
\printlist{institution}%
\newunit\addcomma
}
%Make all thesis/dissertation titles italic
\DeclareFieldFormat[thesis]{title}{\mkbibitalic{#1}}% %met les titres des theses en italique ; permet également d'enlever les guillements
%Enlever le tiret lorsqu'il y a une récurrence des auteurs
\makeatletter
\AtEveryBibitem{%
\global\undef\bbx@lasthash%
\clearfield{extraalpha}}
\makeatother
% "Et al." en ITALIQUE
\renewbibmacro*{name:andothers}{% Based on name:andothers from biblatex.def
\ifboolexpr{
test {\ifnumequal{\value{listcount}}{\value{liststop}}}
and
test \ifmorenames
}
{\ifnumgreater{\value{liststop}}{1}
{\finalandcomma}
{}%
\andothersdelim\bibstring[\emph]{andothers}}
{}}
%%% Histoire des noms et al...
\makeatletter
\renewbibmacro*{begentry}{%
\renewcommand*{\mkbibnamefamily}[1]{##1}%
\defcounter{maxnames}{\blx@maxcitenames}%
\printtext[bold]{\usebibmacro{cite}\addspace:\space}%
\defcounter{maxnames}{\blx@maxbibnames}
\renewcommand*{\mkbibnamefamily}[1]{\textsc{\textnohyphenation{##1}}}}
\makeatother
%minuscule citation
\AtBeginDocument{\renewcommand*{\mkbibnamefamily}[1]{#1}}
%Enlève parenthèse colloque
\renewbibmacro*{event+venue+date}{
\iffieldundef{eventtitle}
{}
{%
\bibstring{presentedat}%
\printfield{eventtitle}%
}%
\ifboolexpr{
test {\iffieldundef{venue}}
and
test {\iffieldundef{eventyear}}
}
{}
{\setunit*{\addspace}%
\printtext{%
\printfield{venue}%
\setunit*{\addcomma\space}%
\printeventdate}}%
\newunit
}
\DefineBibliographyStrings{french}{%
byeditor = \iffieldequalstr{keywords}{source}%
{Établit\space par}%
{dir\adddotspace\smartof},
in = {\textit{in}},% %et en italique
editor = {dir\adddotspace},%
editors = {dir\adddotspace},%
opcit = \iffieldequalstr{entrytype}{article}{art\adddotspace cit\adddot}{\emph{op\adddotspace cit}\adddot},%
idem = {\emph{idem}},%
byeditor = {dir\adddot},% Remplace sous la direction de pour les improceedings etc.
ibidem = {\emph{ibid\adddot}},%
mathesis = {Mém. de master\addcomma}, %permet de modifier en français le titre et de rajouter un point un espace et une virigule
phdthesis = {Thèse de doct\adddot\space\addcomma} %permet de modifier en français le titre et de rajouter un point un espace et une virigule
%pagetotal = {p\adddot},%
%pages = {pp\adddot},%
}
%%modifie les pages des articles ... par pp. au lieu de p.
%\DeclareFieldFormat[article,inbook,inproceedings,incollection]{pages}{pp\adddotspace #1}%
%enlève la virugule avant dir.
\makeatletter
\renewbibmacro*{bbx:editor}[1]{%
\ifboolexpr{
test \ifuseeditor
and
not test {\ifnameundef{editor}}
}
{\usebibmacro{bbx:dashcheck}
{\bibnamedash}
{\printnames{editor}%
% \setunit{\addcomma\space}% DELETED
\setunit{\addspace}% ADDED
\usebibmacro{bbx:savehash}}%
% \usebibmacro{#1}% DELETED
\printtext{\usebibmacro{#1}}% ADDED
\clearname{editor}}
{\global\undef\bbx@lasthash}}
\makeatother
% put (dir.) at the end (byeditor) pour tout ce qui est in : auteur dir.
\renewbibmacro*{byeditor+others}{%
\ifnameundef{editor}
{}
{%%%\usebibmacro{byeditor+othersstrg} %%%% suppress
\setunit{\addcomma\addspace}%
\printnames[byeditor]{editor}%
\setunit{\addspace}%
% \addspace %%%% suppress
% \usebibmacro{byeditor+othersstrg} %%%%
\usebibmacro{editor+othersstrg} %%%%
\clearname{editor}% %%%%%%%%%
\newunit}%
\usebibmacro{byeditorx}%
\usebibmacro{bytranslator+others}}
%met entre parenthèse la collection et le numéro dans la même parenthèse
\renewbibmacro*{series+number}{%
\iffieldundef{series}
{}
{\printtext[parens]{%
\printtext{}%
\printfield{series}%
\setunit*{\space}%
\printfield{number}%
\printtext{}}%
}} %%% il y a un point en enleveant \nopunct.
%Rajoute une virgule après le titre du journal et avant le numéro du volume
\renewbibmacro*{journal+issuetitle}{%
\usebibmacro{journal}%
\setunit*{\addcomma\space}%
\iffieldundef{series}
{}
{\newunit
\printfield{series}%
\setunit{\addspace}}%
\usebibmacro{volume+number+eid}%
\setunit{\addspace}%
\usebibmacro{issue+date}%
\setunit{\addcolon\space}%
\usebibmacro{issue}%
\newunit}
%Permet d'enlever le tiret après in si pas d'auteur.
\renewbibmacro{in:}{%
\ifentrytype{article}
{}
{\printtext{\bibstring{in}}%
\printunit{\intitlepunct}}}
%permet de mettre les initiales entre parenthèses et surtout les particules nobilaires
\renewcommand*{\revsdnamepunct}{\addspace}
\renewbibmacro*{name:family-given}[4]{%
\ifuseprefix
{\usebibmacro{name:delim}{#3#1}%
\usebibmacro{name:hook}{#3#1}%
\ifdefvoid{#3}{}{%
\ifcapital
{\mkbibnameprefix{\MakeCapital{#3}}\isdot}
{\mkbibnameprefix{#3}\isdot}%
\ifprefchar{}{\bibnamedelimc}}%
\mkbibnamefamily{#1}\isdot
\ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}%
\ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibparens{\mkbibnamegiven{#2}}\isdot}}% added \mkbibparens
{\usebibmacro{name:delim}{#1}%
\usebibmacro{name:hook}{#1}%
\mkbibnamefamily{#1}\isdot
\ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}%
% \ifdefvoid{#2#3}{}{\revsdnamepunct}%
\ifdefvoid{#2}{}{\bibnamedelimd\bibopenparen\mkbibnamegiven{#2}\isdot}% added \bibopenparen
\ifdefvoid{#3}{}{\bibnamedelimd\ifdefvoid{#2}{\bibopenparen}{}\mkbibnameprefix{#3}\isdot}% added \ifdefvoid{#2}{\bibopenparen}{}
\ifboolexpe{%
test {\ifdefvoid{#2}}
and
test {\ifdefvoid{#3}}}
{}
{\bibcloseparen}}}% this line is new
%permet de mettre en minustile les styles de citation
\DefineBibliographyExtras{french}{\restorecommand\mkbibnamefamily}
%rajoute origdate
\renewbibmacro*{cite:labelyear+extrayear}{%
\iffieldundef{labelyear}
{}
{\printtext[bibhyperref]{%
\iffieldundef{origyear}{}{[\printfield{origyear}]\addspace}% <--- added
\printfield{labelyear}%
\printfield{extrayear}}}}
\renewbibmacro*{date+extrayear}{%
\iffieldundef{year}
{}
{\printtext[parens]{%
\iffieldundef{origyear}{}{\printfield{origyear}]\addspace}% <--- added
\printdateextra}}}
%%%%Permet de trier la biblio en suivant l'ordre du label et non pas des noms
%\DeclareSourcemap{
% \maps[datatype=bibtex]{
% \map[overwrite]{
% \step[fieldsource=author,match=\regexp{\s+and\s.+\s+and\s},final]
% \step[fieldset=sortname,origfieldval]
% \step[fieldsource=sortname,match=\regexp{\s+and\s.+},replace={\ and\ Zzz}]
% }
% }
%}
%
%\DeclareSortingScheme{emi}{
% \sort{
% \field{sortname}
% \field{author}
% }
% \sort{\field{year}}
% \sort{\citeorder}
%}
\begin{document}
\cite{agusta-boularot2017,agusta-boularot2016,agusta-boularot.lafon2004,augustat-boularot.etal2019,agusta-boularot.etal2004,agusta-boularot.etal2010,agusta-boularot.etal2017,paillet.treziny2004,agusta-boularot.martin2006}
\printbibliography[sorting=emi]
\end{document}
答案1
maxsortnames=2,
如果我理解正确,设置(即设置为与 相同的值)就足够了maxcitenames
。请注意,maxsortnames
必须在 之后设置maxbibnames
(因为maxbibnames
设置是maxsortnames
为了向后兼容,请参阅https://github.com/plk/biblatex/issues/755)。maxsortnames
至少需要biblatex
v3.12 (2018-10-30)。
maxsortnames=2,
就足够了,因为它强制biblatex
按引用标签中出现的完全相同的名称进行排序。“ <Name>
et al.”总是排在后面<Name>
(除非nosortothers
设置为true
,请参阅https://github.com/plk/biblatex/issues/861)。并且<Name> <Name 2>
始终排序在 之后<Name>
但在 之前<Name> et al.
。
因此,您需要biblatex
使用以下名称选项进行加载
maxbibnames=999,
maxcitenames=2,
maxsortnames=2,
uniquename=false,
uniquelist=false,
giveninits,
我稍微更新了你的 MWE,删除了冗余代码。我还基于ext-authoryear
我的biblatex-ext
联邦(而不是authoryear
),因为这样可以让一些事情变得更容易(例如,可以使用选项生成引用标签的粗体重复introcite=true,
)。(不用说,我可能错过了一些东西,这并不能完全再现你现在的确切风格。如果你想进一步探究,只需就我错过的事情提出一个新问题。理想情况下,每个问题一个问题。)
\documentclass{article}
\usepackage{polyglossia}
\setdefaultlanguage{french}
\usepackage{csquotes}
\usepackage[%
backend=biber,
style=ext-authoryear,
maxbibnames=999,
maxcitenames=2,
maxsortnames=2,
uniquename=false,
uniquelist=false,
giveninits,
mincrossrefs=1,
mergedate=false,
dashed=false,
introcite=plain,
autolang=langname,
]{biblatex}
\DeclareFieldFormat{bbx@introcite}{\mkbibbold{#1}}
\renewcommand*{\introcitepunct}{\mkbibbold{\addcolon\space}}
\DefineBibliographyExtras{french}{\restorecommand\mkbibnamefamily}
\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}}
\AtEveryCitekey{\renewcommand*{\mkbibnamefamily}[1]{#1}}
\DeclareDelimAlias{finalnamedelim}{multinamedelim}
\DeclareNameAlias{byeditor}{sortname}
\DeclareNameAlias{sortname}{family-given}
\renewcommand*{\revsdnamepunct}{\addspace}
\renewbibmacro*{name:family-given}[4]{%
\ifuseprefix
{\usebibmacro{name:delim}{#3#1}%
\usebibmacro{name:hook}{#3#1}%
\ifdefvoid{#3}{}{%
\ifcapital
{\mkbibnameprefix{\MakeCapital{#3}}\isdot}
{\mkbibnameprefix{#3}\isdot}%
\ifprefchar{}{\bibnamedelimc}}%
\mkbibnamefamily{#1}\isdot
\ifboolexpe{%
test {\ifdefvoid{#2}}
and
test {\ifdefvoid{#4}}}
{}
{\bibnamedelimd\bibopenparen}%
\ifdefvoid{#2}{}{\mkbibnamegiven{#2}\isdot}%
\ifdefvoid{#4}{}{\ifdefvoid{#2}{}{\bibnamedelimd}\mkbibnamesuffix{#4}\isdot}%
\ifboolexpe{%
test {\ifdefvoid{#2}}
and
test {\ifdefvoid{#4}}}
{}
{\bibcloseparen}}
{\usebibmacro{name:delim}{#1}%
\usebibmacro{name:hook}{#1}%
\mkbibnamefamily{#1}\isdot
\ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}%
\ifboolexpe{%
test {\ifdefvoid{#2}}
and
test {\ifdefvoid{#3}}}
{}
{\revsdnamepunct\bibopenparen}%
\ifdefvoid{#2}{}{\mkbibnamegiven{#2}\isdot}%
\ifdefvoid{#3}{}{\ifdefvoid{#2}{}{\bibnamedelimd}\mkbibnameprefix{#3}\isdot}%
\ifboolexpe{%
test {\ifdefvoid{#2}}
and
test {\ifdefvoid{#3}}}
{}
{\bibcloseparen}}}
\renewbibmacro*{name:andothers}{% Based on name:andothers from biblatex.def
\ifboolexpr{
test {\ifnumequal{\value{listcount}}{\value{liststop}}}
and
test \ifmorenames
}
{\ifnumgreater{\value{liststop}}{1}
{\finalandcomma}
{}%
\andothersdelim\bibstring[\emph]{andothers}}
{}}
\DeclareFieldFormat{origdate}{\mkbibbrackets{#1}}
\renewbibmacro*{cite:labeldate+extradate}{%
\iffieldundef{labelyear}
{}
{\printtext[bibhyperref]{%
\printorigdate
\setunit*{\addspace}%
\printlabeldateextra}}}
\renewbibmacro*{date+extrayear}{%
\iffieldundef{year}
{}
{\printtext[parens]{%
\printorigdate
\setunit*{\addspace}%
\printdateextra}}}
\DeclareDelimFormat[bib]{nametitledelim}{\space\textendash\space}
\DeclareFieldFormat
[article,inbook,incollection,inproceedings,patent,unpublished]
{title}{#1}
\DeclareFieldFormat[thesis]{title}{\mkbibitalic{#1}}
\renewbibmacro{in:}{%
\ifentrytype{article}
{}
{\printtext{\bibstring{in}\intitlepunct}}}
\DeclareDelimFormat{editortypedelim}{\addspace}
\renewbibmacro*{byeditor+others}{%
\ifnameundef{editor}
{}
{\setunit{\addcomma\addspace}%
\printnames[byeditor]{editor}%
\setunit{\addspace}%
\usebibmacro{editor+othersstrg}
\clearname{editor}%
\newunit}%
\usebibmacro{byeditorx}%
\usebibmacro{bytranslator+others}}
\renewcommand*{\jourvoldelim}{\addcomma\space}
\renewbibmacro*{issue+date}{%
\printfield{issue}%
\setunit{\addcomma\space}%
\printdate%
\newunit}
\renewbibmacro*{series+number}{%
\iffieldundef{series}
{}
{\printtext[parens]{%
\printfield{series}%
\setunit*{\space}%
\printfield{number}}}}
\renewbibmacro*{publisher+location+date}{%
\printlist{location}%
\setunit*{\addcomma\space}%
\printlist{publisher}%
\setunit*{\addcomma\space}%
\usebibmacro{date}%
\newunit}
\newbibmacro*{institution+location+date}{%
\printlist{location}%
\setunit*{\addcomma\space}%
\printlist{institution}%
\setunit*{\addcomma\space}}
\renewbibmacro*{event+venue+date}{%
\iffieldundef{eventtitle}
{}
{\bibstring{presentedat}%
\printfield{eventtitle}}%
\ifboolexpr{
test {\iffieldundef{venue}}
and
test {\iffieldundef{eventyear}}
}
{}
{\setunit*{\addspace}%
\printfield{venue}%
\setunit*{\addcomma\space}%
\printeventdate}%
\newunit
}
%\DeclareFieldFormat[article,inbook,inproceedings,incollection]
% {pages}{\mkpageprefix[bookpagination]{#1}}
\DeclareFieldFormat{postnote}{\mknormrange{#1}}
\DefineBibliographyStrings{french}{%
byeditor = {\iffieldequalstr{keywords}{source}
{Établit\space par}%
{dir\adddotspace\smartof}},
in = {\textit{in}},
editor = {dir\adddot},%
editors = {dir\adddot},%
opcit = {\iffieldequalstr{entrytype}{article}
{art\adddotspace cit\adddot}
{\mkbibemph{op\adddotspace cit\adddot}}},
idem = {\mkbibemph{idem}},%
byeditor = {dir\adddot},
ibidem = {\emph{ibid\adddot}},%
mathesis = {Mém\adddotspace de master\addcomma},
phdthesis = {Thèse de doct\adddot\space\addcomma},
}
\begin{filecontents}{\jobname.bib}
@InProceedings{agusta-boularot2017,
author = {Agusta-Boularot, Sandrine},
title = {Title},
booktitle = {booktitle},
year = {2017},
crossref = {agusta-boularot.etal2017},
}
@InProceedings{agusta-boularot2016,
author = {Sandrine Agusta-Boularot},
title = {Title},
year = {2016},
booktitle = {booktitle},
}
@Book{agusta-boularot.lafon2004,
title = {title},
year = {2004},
editor = {Sandrine Agusta-Boularot and Xavier Lafon},
}
@Book{agusta-boularot.martin2006,
title = {title},
year = {2006},
editor = {Sandrine Agusta-Boularot and Marin Martin},
}
@InProceedings{augustat-boularot.etal2019,
author = {Sandrine Agusta-Boularot and Chausserie-Laprée, Jean and Núria Nin},
title = {Title},
booktitle = {booktitle},
year = {2019},
timestamp = {2019-09-11},
}
@Article{agusta-boularot.etal2004,
author = {Agusta-Boularot, Sandrine and Christol Martin and Pierre Jack},
title = {Title},
journal = {Journal},
year = {2004},
volume = {17},
}
@Article{agusta-boularot.etal2010,
author = {Sandrine Agusta-Boularot and Raphaël Golosetti and Delphine Isoardi},
title = {Title},
journal = {Journal},
year = {2010},
pages = {109-126},
volume = {43},
}
@Book{agusta-boularot.etal2017,
editor = {Sandrine Agusta-Boularot and Sandrine Huber and William Van Andringa},
title = {Title},
year = {2017},
}
@InProceedings{paillet.treziny2004,
author = {Paillet, Jean-Louis and Henri Tréziny},
title = {Title},
booktitle = {booktitle},
year = {2004},
editor = {Agusta-Boularot, Sandrine},
crossref = {agusta-boularot.etal2004},
timestamp = {2019-12-09},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\autocite{agusta-boularot2017, agusta-boularot2016, agusta-boularot.lafon2004,
augustat-boularot.etal2019, agusta-boularot.etal2004,
agusta-boularot.etal2010, agusta-boularot.etal2017,
paillet.treziny2004, agusta-boularot.martin2006}
\printbibliography
\end{document}