自从使用以来,我遇到了一些书目样式方面的困难authoryear-ext
。
我的第一个问题是,使用innamebeforetitle-true
它可以反转编辑器和标题。虽然很实用,但当我想要“Author (I.) dir”时,它会通过输入名字和姓氏来改变格式。我在文档中看到使用的格式是那样的,in:editor (+ others)
但我不知道如何更改它。
第二个问题:我想在标题(文章标题、论文集等)末尾加一个点。论文集和论文集中的标题无法加点。
第三个问题:我想在末尾将收藏和收藏编号放在括号中。我做到了,但在诉讼中,信息出现了两次。
谢谢你,
\documentclass{article}
\usepackage{polyglossia}
\setdefaultlanguage{french}
\usepackage{csquotes}
\usepackage{xpatch} %permet de bidouiller plus en profondeur le code pour la bibliographie
\usepackage[%
backend=biber,
style=ext-authoryear,
maxbibnames=999,
maxcitenames=2,
maxsortnames=2,
uniquename=false,
uniquelist=false,
giveninits,
mincrossrefs=1,
mergedate=false, %enleve le tiret
dashed=false,
introcite=plain,
autolang=langname,
innamebeforetitle=true, %inversion byeditor et titre
articlein=false, %enleve le in des articles
]{biblatex}
%Etiquette, gras, avec deux points.
\DeclareFieldFormat{bbx@introcite}{\mkbibbold{#1}}
\renewcommand*{\introcitepunct}{\mkbibbold{\addcolon\space}}
%permet de mettre en minustile les styles de citation
\DefineBibliographyExtras{french}{\restorecommand\mkbibnamefamily}
\AtEveryCitekey{\renewcommand*{\mkbibnamefamily}[1]{#1}}
\DeclareDelimAlias{finalnamedelim}{multinamedelim} %harmonise les étiquettes et les noms
\renewcommand*{\newunitpunct}{\addcomma\space} %met une virgule à la place de tous les segments
%tri
\DeclareNameAlias{byeditor}{sortname}
\DeclareNameAlias{sortname}{family-given}
\renewcommand*{\revsdnamepunct}{\addspace} %enleve ponctuation entre prénom et nom.
\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}}}
\DeclareDelimFormat[bib]{nametitledelim}{\space\textendash\space} %limite entre nom et titre
\DeclareDelimFormat{editortypedelim}{\addspace} %ponctuation pour dir. et prénom
%met en italique les titres
\DeclareFieldFormat
[article,inbook,incollection,inproceedings,patent,unpublished]
{title}{#1}
\DeclareFieldFormat[thesis]{title}{\mkbibitalic{#1}}
%gere la commande in
\renewbibmacro{in:}{%
\ifentrytype{inproceedings,incollection}
{}
{\printtext{\bibstring{in}\intitlepunct}}}
%rajoute la date à la fin
\renewbibmacro*{issue+date}{%
\printfield{issue}%
\setunit{\addcomma\space}%
\printdate%
\newunit}
%rajoute une virgule à la place des deux points
\renewbibmacro*{publisher+location+date}{%
\printlist{location}%
\setunit*{\addcomma\space}%
\printlist{publisher}%
\setunit*{\addcomma\space}%
\usebibmacro{date}%
\newunit}
%rajoute des virgule au lieu des deux points
\newbibmacro*{institution+location+date}{%
\printlist{location}%
\setunit*{\addcomma\space}%
\printlist{institution}%
\setunit*{\addcomma\space}
}
%enleve les parenthèses pour les dates et les lieux de colloque
\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
}
%permet de modifier citation
\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},%
byeditor = {dir\adddot},
mathesis = {Mém\adddotspace de master\addcomma},
phdthesis = {Thèse de doct\adddot\space\addcomma},
}
%% Pour avoir collaboration après l'auteur pour namea et enleve année supplémentaire
\makeatletter
\renewbibmacro*{author}{%
\ifboolexpr{
test \ifuseauthor
and
not test {\ifnameundef{author}}
}
{\usebibmacro{bbx:dashcheck}
{\bibnamedash}
{\printnames{author}%
\setunit{\addcomma\space}%
\usebibmacro{bbx:savehash}%
\usebibmacro{authorstrg}%
\ifnameundef{namea}
{}
{\setunit{\addcomma\space}%
\global\undef\bbx@lasthash%
\usebibmacro{authorstrg}%
\setunit{\addspace}%
\usebibmacro{bynameastrg}%
\setunit{\addspace}%
\printnames{namea}}}}
{\global\undef\bbx@lasthash}}
\newbibmacro*{bynameastrg}{%
\iffieldundef{nameatype}
{}
{\usebibmacro{bytypestrg}{namea}{editor}}}
\makeatother
%enlève la virugule avant dir. et permet d'enlever aussi la parenthèse et l'année supplémentaire
\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
%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.
%permet de mettre collection à la fin en rajouter une virgule avant.
\newcommand*\patchseries[1]{%
\xpatchbibdriver{#1}
{\usebibmacro{series+number}}
{}
{}
{\typeout{Warning: Failed to remove series+number from driver #1.}}
\xpatchbibdriver{#1}
{\usebibmacro{related}}
{\usebibmacro{related}%
\setunit{\addcomma\addspace}%
\usebibmacro{series+number}
\setunit{\addspace}}
{}
{\typeout{Warning: Failed to add series+number to driver #1.}}}
%permet de patcher pour les
\patchseries{book}
\patchseries{collection}\patchseries{incollection}
\patchseries{proceedings}
\patchseries{inproceedings}
\DeclareFieldFormat[article,inbook,inproceedings,incollection,Proceedings,report]
{pages}{\mkpageprefix[bookpagination]{#1}}
%permet de mettre un point à la fin du titre
\xpatchbibdriver{article}
{\usebibmacro{title}%
\newunit}
{\usebibmacro{title}%
\printunit{\adddot\space}}
{}
{}
%permet de mettre un point à la fin du titre
\xpatchbibdriver{thesis}
{\usebibmacro{title}%
\newunit}
{\usebibmacro{title}%
\printunit{\adddotspace}}
{}
{}
%permet de mettre un point à la fin du titre
\xpatchbibdriver{report}
{\usebibmacro{title}%
\newunit}
{\usebibmacro{title}%
\printunit{\adddotspace}}
{}
{}
%permet de mettre un point à la fin du titre
\xpatchbibdriver{book}
{\usebibmacro{maintitle+title}%
\newunit}
{\usebibmacro{maintitle+title}%
\printunit{\adddotspace}}
{}
{}
%%% permet de mettre un point pour les booktitles
\renewbibmacro*{maintitle+booktitle}{%
\usebibmacro{booktitle}%
\printunit{\adddot\space} %rajoute un point à la fin du titre du bouquin dans inprooceedings
}
%%%% permet de mettre un point pour les booktitles
%\renewbibmacro*{maintitle+booktitle}{%
% \usebibmacro{maintitle}%
% \printunit{\adddot\space} %rajoute un point à la fin du titre du bouquin dans inprooceedings
%}
\renewcommand*{\jourvoldelim}{\addcomma\space}
\begin{filecontents}{\jobname.bib}
@Inproceedings{Inproceedings2,
author = {de Vangelis, {\relax Cl}aire-Annie},
title = {Title},
booktitle = {Book 2},
year = {2000},
pages = {320-335},
crossref = {book2},
}
@Proceedings{book2,
author = {Hélène Henri},
title = {Book 2},
year = {2000},
pagetotal = {400},
editor = {Henri Point},
address = {Lieu},
publisher = {Publisher},
evendate = {1990-10},
series = {Serie},
number = {1},
venue = {Actes du colloque},
}
@Book{bookcollab,
title = {Title},
publisher = {Publisher},
year = {1999},
editor = {Michel Jean},
pagetotal = {680},
address = {Lieu},
number = {12},
series = {Serie},
namea = {Martin, Jean-Claude},
nameatype = {collaborator},
timestamp = {2019-06-15},
}
@Proceedings{proceedings1,
title = {Title},
year = {1990},
editor = {Michel René},
publisher = {Publisher},
address = {Lieu},
pagetotal = {294},
series = {Serie},
Number = {1},
venue = {Actes de la table-ronde},
eventdate = {1989-03-11},
}
@Phdthesis{these2013,
author = {Jean Martin},
title = {Title},
school = {Université},
year = {2013},
address = {Lieu},
institution = {Institution},
pagetotal = {721},
}
@TechReport{rapport1990,
author = {Jean Claude},
institution = {Institution},
pagetotal = {20},
title = {Title},
year = {1990},
type = {Rapport de fouille},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
答案1
你对 的理解是正确的in:editor
。bibmacro 称为in:editor
或in:editor+others
。名称格式称为ineditor
,因此你想要
\DeclareNameAlias{ineditor}{sortname}
代替\DeclareNameAlias{byeditor}{sortname}
。
对于标题之后的时期,您当前的修补方法有效,并且也可以扩展到其他条目类型。biblatex-ext
实现@in...
类型略有不同,因此必须单独处理它们(无论如何都需要修补两次)。
消除
%permet de mettre un point à la fin du titre
\xpatchbibdriver{article}
{\usebibmacro{title}%
\newunit}
{\usebibmacro{title}%
\printunit{\adddot\space}}
{}
{}
%permet de mettre un point à la fin du titre
\xpatchbibdriver{thesis}
{\usebibmacro{title}%
\newunit}
{\usebibmacro{title}%
\printunit{\adddotspace}}
{}
{}
%permet de mettre un point à la fin du titre
\xpatchbibdriver{report}
{\usebibmacro{title}%
\newunit}
{\usebibmacro{title}%
\printunit{\adddotspace}}
{}
{}
%permet de mettre un point à la fin du titre
\xpatchbibdriver{book}
{\usebibmacro{maintitle+title}%
\newunit}
{\usebibmacro{maintitle+title}%
\printunit{\adddotspace}}
{}
{}
%%% permet de mettre un point pour les booktitles
\renewbibmacro*{maintitle+booktitle}{%
\usebibmacro{booktitle}%
\printunit{\adddot\space} %rajoute un point à la fin du titre du bouquin dans inprooceedings
}
%%%% permet de mettre un point pour les booktitles
%\renewbibmacro*{maintitle+booktitle}{%
% \usebibmacro{maintitle}%
% \printunit{\adddot\space} %rajoute un point à la fin du titre du bouquin dans inprooceedings
%}
并将其替换为
\newcommand*{\patchtitleperiod}[2]{%
\xpatchbibdriver{#1}
{\usebibmacro{#2}%
\newunit}
{\usebibmacro{#2}%
\printunit{\addperiod\space}}
{}
{\PackageWarningNoLine{biblatex-ext}
{Failed to patch '@#1' driver for title period at '#2'}}}
\patchtitleperiod{article}{title}
\patchtitleperiod{book}{maintitle+title}
\patchtitleperiod{inbook}{title}
\patchtitleperiod{collection}{maintitle+title}
\patchtitleperiod{incollection}{title}
\patchtitleperiod{proceedings}{maintitle+title}
\patchtitleperiod{inproceedings}{title}
\patchtitleperiod{booklet}{title}
\patchtitleperiod{dataset}{title}
\patchtitleperiod{manual}{title}
\patchtitleperiod{online}{title}
\patchtitleperiod{misc}{title}
\patchtitleperiod{patent}{title}
\patchtitleperiod{periodical}{title+issuetitle}
\patchtitleperiod{report}{title}
\patchtitleperiod{thesis}{title}
\patchtitleperiod{unpublished}{title}
\newcommand*{\patchintitleperiod}[1]{%
\xpatchbibmacro{#1:parent}
{\usebibmacro{maintitle+booktitle}%
\newunit}
{\usebibmacro{maintitle+booktitle}%
\printunit{\addperiod\space}}
{}
{\PackageWarningNoLine{biblatex-ext}
{Failed to patch '@#1:parent' bibmacro for title period
at 'maintitle+booktitle'}}}
\patchintitleperiod{inbook}
\patchintitleperiod{incollection}
\patchintitleperiod{inproceedings}
如果你仔细查看该.log
文件,你会发现
Warning: Failed to remove series+number from driver incollection.
Warning: Failed to remove series+number from driver inproceedings.
在.log
文件中。这是因为如第二点所述,biblatex-ext
设置了和与标准样式略有不同。@inbook
@incollection
@inproceedings
更换块
%permet de mettre collection à la fin en rajouter une virgule avant.
\newcommand*\patchseries[1]{%
\xpatchbibdriver{#1}
{\usebibmacro{series+number}}
{}
{}
{\typeout{Warning: Failed to remove series+number from driver #1.}}
\xpatchbibdriver{#1}
{\usebibmacro{related}}
{\usebibmacro{related}%
\setunit{\addcomma\addspace}%
\usebibmacro{series+number}
\setunit{\addspace}}
{}
{\typeout{Warning: Failed to add series+number to driver #1.}}}
%permet de patcher pour les
\patchseries{book}
\patchseries{collection}\patchseries{incollection}
\patchseries{proceedings}
\patchseries{inproceedings}
和
%permet de mettre collection à la fin en rajouter une virgule avant.
\newcommand*\patchseries[1]{%
\xpatchbibdriver{#1}
{\usebibmacro{series+number}}
{}
{}
{\PackageWarningNoLine{biblatex-ext}
{Failed to remove series+number from '@#1' driver}}
\xpatchbibdriver{#1}
{\usebibmacro{related}}
{\usebibmacro{related}%
\setunit{\addcomma\addspace}%
\usebibmacro{series+number}%
\setunit{\addspace}}
{}
{\PackageWarningNoLine{biblatex-ext}
{Failed to add series+number to '@#1' driver}}}
%permet de patcher pour les
\patchseries{book}
\patchseries{collection}
\patchseries{proceedings}
\newcommand*\patchseriesin[1]{%
\xpatchbibmacro{#1:parent}
{\usebibmacro{series+number}}
{}
{}
{\PackageWarningNoLine{biblatex-ext}
{Failed to remove series+number from '#1:parent' bibmacro}}
\xpatchbibdriver{#1}
{\usebibmacro{related}}
{\usebibmacro{related}%
\setunit{\addcomma\addspace}%
\usebibmacro{series+number}%
\setunit{\addspace}}
{}
{\PackageWarningNoLine{biblatex-ext}
{Failed to add series+number to '#1:parent' bibmacro}}}
\patchseriesin{inbook}
\patchseriesin{incollection}
\patchseriesin{inproceedings}
总的来说(我注意到您的编辑器似乎完全破坏了代码块中的缩进,这让我很难阅读它们)。
\documentclass{article}
\usepackage{polyglossia}
\setdefaultlanguage{french}
\usepackage{csquotes}
\usepackage{xpatch} %permet de bidouiller plus en profondeur le code pour la bibliographie
\usepackage[%
backend=biber,
style=ext-authoryear,
maxbibnames=999,
maxcitenames=2,
maxsortnames=2,
uniquename=false,
uniquelist=false,
giveninits,
mincrossrefs=1,
mergedate=false, %enleve le tiret
dashed=false,
introcite=plain,
autolang=langname,
innamebeforetitle=true, %inversion byeditor et titre
articlein=false, %enleve le in des articles
]{biblatex}
\renewcommand*{\newunitpunct}{\addcomma\space} %met une virgule à la place de tous les segments
\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{sortname}{family-given}
\DeclareNameAlias{ineditor}{sortname}
\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}}
{}}
\DeclareDelimFormat{editortypedelim}{\addspace} %ponctuation pour dir. et prénom
\DeclareFieldFormat{origdate}{\mkbibbrackets{#1}}
\renewbibmacro*{cite:labeldate+extradate}{%
\iffieldundef{labelyear}
{}
{\printtext[bibhyperref]{%
\printorigdate
\setunit*{\addspace}%
\printlabeldateextra}}}
\DeclareDelimFormat[bib]{nametitledelim}{\space\textendash\space} %limite entre nom et titre
%met en italique les titres
\DeclareFieldFormat
[article,inbook,incollection,inproceedings,patent,unpublished]
{title}{#1}
\DeclareFieldFormat[thesis]{title}{\mkbibitalic{#1}}
\newcommand*{\aftertitlepunct}{\addperiod\space}
\newcommand*{\patchtitleperiod}[2]{%
\xpatchbibdriver{#1}
{\usebibmacro{#2}%
\newunit}
{\usebibmacro{#2}%
\printunit{\addperiod\space}}
{}
{\PackageWarningNoLine{biblatex-ext}
{Failed to patch '@#1' driver for title period at '#2'}}}
\patchtitleperiod{article}{title}
\patchtitleperiod{book}{maintitle+title}
\patchtitleperiod{inbook}{title}
\patchtitleperiod{collection}{maintitle+title}
\patchtitleperiod{incollection}{title}
\patchtitleperiod{proceedings}{maintitle+title}
\patchtitleperiod{inproceedings}{title}
\patchtitleperiod{booklet}{title}
\patchtitleperiod{dataset}{title}
\patchtitleperiod{manual}{title}
\patchtitleperiod{online}{title}
\patchtitleperiod{misc}{title}
\patchtitleperiod{patent}{title}
\patchtitleperiod{periodical}{title+issuetitle}
\patchtitleperiod{report}{title}
\patchtitleperiod{thesis}{title}
\patchtitleperiod{unpublished}{title}
\newcommand*{\patchintitleperiod}[1]{%
\xpatchbibmacro{#1:parent}
{\usebibmacro{maintitle+booktitle}%
\newunit}
{\usebibmacro{maintitle+booktitle}%
\printunit{\addperiod\space}}
{}
{\PackageWarningNoLine{biblatex-ext}
{Failed to patch '@#1:parent' bibmacro for title period
at 'maintitle+booktitle'}}}
\patchintitleperiod{inbook}
\patchintitleperiod{incollection}
\patchintitleperiod{inproceedings}
%gere la commande in
\renewbibmacro{in:}{%
\ifentrytype{article}
{}
{\bibstring{in}%
\printunit{\intitlepunct}}}
%rajoute la date à la fin
\renewbibmacro*{issue+date}{%
\printfield{issue}%
\setunit{\addcomma\space}%
\printdate%
\newunit}
%rajoute une virgule à la place des deux points
\renewbibmacro*{publisher+location+date}{%
\printlist{location}%
\setunit*{\addcomma\space}%
\printlist{publisher}%
\setunit*{\addcomma\space}%
\usebibmacro{date}%
\newunit}
%rajoute des virgule au lieu des deux points
\renewbibmacro*{institution+location+date}{%
\printlist{location}%
\setunit*{\addcomma\space}%
\printlist{institution}%
\setunit*{\addcomma\space}
}
%enleve les parenthèses pour les dates et les lieux de colloque
\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
}
%permet de modifier citation
\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},%
byeditor = {dir\adddot},
mathesis = {Mém\adddotspace de master\addcomma},
phdthesis = {Thèse de doct\adddot\space\addcomma},
}
%% Pour avoir collaboration après l'auteur pour namea et enleve année supplémentaire
\makeatletter
\renewbibmacro*{author}{%
\ifboolexpr{
test \ifuseauthor
and
not test {\ifnameundef{author}}
}
{\usebibmacro{bbx:dashcheck}
{\bibnamedash}
{\printnames{author}%
\setunit{\addcomma\space}%
\usebibmacro{bbx:savehash}%
\usebibmacro{authorstrg}%
\ifnameundef{namea}
{}
{\setunit{\addcomma\space}%
\global\undef\bbx@lasthash%
\usebibmacro{authorstrg}%
\setunit{\addspace}%
\usebibmacro{bynameastrg}%
\setunit{\addspace}%
\printnames{namea}}}}
{\global\undef\bbx@lasthash}}
\newbibmacro*{bynameastrg}{%
\iffieldundef{nameatype}
{}
{\usebibmacro{bytypestrg}{namea}{editor}}}
\makeatother
%enlève la virugule avant dir. et permet d'enlever aussi la parenthèse et l'année supplémentaire
\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
%met entre parenthèse la collection et le numéro dans la même parenthèse
\renewbibmacro*{series+number}{%
\iffieldundef{series}
{}
{\printtext[parens]{%
\printfield{series}%
\setunit*{\space}%
\printfield{number}}}}
%permet de mettre collection à la fin en rajouter une virgule avant.
\newcommand*\patchseries[1]{%
\xpatchbibdriver{#1}
{\usebibmacro{series+number}}
{}
{}
{\PackageWarningNoLine{biblatex-ext}
{Failed to remove series+number from '@#1' driver}}
\xpatchbibdriver{#1}
{\usebibmacro{related}}
{\usebibmacro{related}%
\setunit{\addcomma\addspace}%
\usebibmacro{series+number}%
\setunit{\addspace}}
{}
{\PackageWarningNoLine{biblatex-ext}
{Failed to add series+number to '@#1' driver}}}
%permet de patcher pour les
\patchseries{book}
\patchseries{collection}
\patchseries{proceedings}
\newcommand*\patchseriesin[1]{%
\xpatchbibmacro{#1:parent}
{\usebibmacro{series+number}}
{}
{}
{\PackageWarningNoLine{biblatex-ext}
{Failed to remove series+number from '#1:parent' bibmacro}}
\xpatchbibdriver{#1}
{\usebibmacro{related}}
{\usebibmacro{related}%
\setunit{\addcomma\addspace}%
\usebibmacro{series+number}%
\setunit{\addspace}}
{}
{\PackageWarningNoLine{biblatex-ext}
{Failed to add series+number to '#1:parent' bibmacro}}}
\patchseriesin{inbook}
\patchseriesin{incollection}
\patchseriesin{inproceedings}
\DeclareFieldFormat[article,inbook,inproceedings,incollection,Proceedings,report]
{pages}{\mkpageprefix[bookpagination]{#1}}
\renewcommand*{\jourvoldelim}{\addcomma\space}
\begin{filecontents}{\jobname.bib}
@Inproceedings{Inproceedings2,
author = {de Vangelis, {\relax Cl}aire-Annie},
title = {Title},
booktitle = {Book 2},
year = {2000},
pages = {320-335},
crossref = {book2},
}
@Proceedings{book2,
author = {Hélène Henri},
title = {Book 2},
year = {2000},
pagetotal = {400},
editor = {Henri Point},
address = {Lieu},
publisher = {Publisher},
evendate = {1990-10},
series = {Serie},
number = {1},
venue = {Actes du colloque},
}
@Book{bookcollab,
title = {Title},
publisher = {Publisher},
year = {1999},
editor = {Michel Jean},
pagetotal = {680},
address = {Lieu},
number = {12},
series = {Serie},
namea = {Martin, Jean-Claude},
nameatype = {collaborator},
timestamp = {2019-06-15},
}
@Proceedings{proceedings1,
title = {Title},
year = {1990},
editor = {Michel René},
publisher = {Publisher},
address = {Lieu},
pagetotal = {294},
series = {Serie},
Number = {1},
venue = {Actes de la table-ronde},
eventdate = {1989-03-11},
}
@Phdthesis{these2013,
author = {Jean Martin},
title = {Title},
school = {Université},
year = {2013},
address = {Lieu},
institution = {Institution},
pagetotal = {721},
}
@TechReport{rapport1990,
author = {Jean Claude},
institution = {Institution},
pagetotal = {20},
title = {Title},
year = {1990},
type = {Rapport de fouille},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}