最近我在我的电脑上重新安装了 Windows 10,所以我重新安装了 texlive、texstudio 等。
感谢这个论坛,我有一个完美的参考书目风格,但是昨天当我编译时,我惊恐地发现我的参考书目风格已经改变。
确实,正如您在图片中看到的,作者和编者姓名首字母没有括号,而且引用样式和标签都是小写,而我希望是小写。我不明白为什么要改变。
为了成功编译,我必须将 firstinit 替换为 giveninits
您有什么想法吗?我猜这是 biblatex 更新的原因,但我的代码太差,不知道问题出在哪里?
谢谢,PS:抱歉,我的 MWE 太大了......
\documentclass[10pt]{article}
\RequirePackage{polyglossia}
\setdefaultlanguage{french}
\setmainfont[Mapping=tex-text]{Times New Roman}
\RequirePackage{xpatch}
\usepackage{csquotes}
%MACRO
\providecommand{\ier}{\textsuperscript{er}}
\providecommand{\iers}{\textsuperscript{ers}}
\providecommand{\iere}{\textsuperscript{ère}}
\providecommand{\ieres}{\textsuperscript{ères}}
\providecommand{\ieme}{\textsuperscript{e}}
\providecommand{\iemes}{\textsuperscript{es}}
\providecommand{\nd}{\textsuperscript{nd}}
\providecommand{\nds}{\textsuperscript{nds}}
\providecommand{\nde}{\textsuperscript{nde}}
\providecommand{\ndes}{\textsuperscript{ndes}}
\providecommand{\no}{\textsuperscript{o}}
\providecommand{\nos}{\textsuperscript{os}}
\providecommand{\mme}{M\textsuperscript{me}\space}
\providecommand{\mmes}{M\textsuperscript{mes}\space}
\providecommand{\mr}{M.\space}
\providecommand{\mrs}{MM.\space}
%bibliography
\usepackage[%
backend=bibtex,%
style=authoryear,%
autolang=hyphen,%
giveninits,%
mergedate=false,%
style=authoryear,
maxcitenames=2,%
maxbibnames=999%
]{biblatex}
\addbibresource{bibliographie/fusion}
\renewcommand*{\revsdnamepunct}{}
\renewcommand*{\finalnamedelim}{\multinamedelim}
\renewcommand*{\mkbibnamelast}[1]{\textsc{#1}}
\DeclareNameAlias{byeditor}{sortname}
\DeclareNameAlias{sortname}{last-first}
\renewcommand*{\labelnamepunct}{\space\textendash\space} %tiret après le label
\renewbibmacro*{date+extrayear}{}% rajoute date
\DeclareFieldFormat
[article,inbook,incollection,inproceedings,patent,thesis,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}
%Met les abréviations des revues
\renewbibmacro*{journal}{%
\iffieldundef{shortjournal}
{%
\iffieldundef{journaltitle}
{}
{%
\printtext[journaltitle]
{%
\printfield[titlecase]{journaltitle}%
\setunit{\subtitlepunct}%
\printfield[titlecase]{journalsubtitle}%
}%
}%
}
{\printtext[journaltitle]{\printfield[titlecase]{shortjournal}}}%
}
%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*{\mkbibnamelast}[1]{##1}%
\defcounter{maxnames}{\blx@maxcitenames}%
\printtext[bold]{\usebibmacro{cite}\addspace:\space}%
\defcounter{maxnames}{\blx@maxbibnames}
\renewcommand*{\mkbibnamelast}[1]{\textsc{\textnohyphenation{##1}}}}
\makeatother
%minuscule citation
\AtBeginDocument{\renewcommand*{\mkbibnamelast}[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}},%
%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}}
%%modifié book pour virgule
\DeclareBibliographyDriver{book}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor+others/translator+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{maintitle+title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\printfield{edition}%
\newunit
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}%
\newunit
\printfield{volumes}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\usebibmacro{publisher+location+date}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit\addcomma
\printfield{pagetotal}%
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{isbn}}
{}%
\newunit\newblock
\usebibmacro{doi+eprint+url}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\usebibmacro{series+number}% rajoute a la fin series + nomber pour avoir la collection a la fin de la ligne. La modification du style est plus bas.
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}
%Change ordre des entrées pour les in quelquechoses :
\DeclareBibliographyDriver{incollection}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor+others}%
\setunit{\space\textendash\space}\newblock
\usebibmacro{maintitle+title}%
\newunit\newblock
\usebibmacro{in:}%
\usebibmacro{bybookauthor}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\setunit{\textendash\space}\newblock %%%remplace \newunit\newblock pour rajouter un tiret entre le dir. et le mainttille des bouquins
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\printfield{edition}%
\newunit
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}%
\newunit
\printfield{volumes}%
\newunit\newblock
\usebibmacro{series+number}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\usebibmacro{publisher+location+date}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{isbn}}
{}%
\newunit\newblock
\usebibmacro{doi+eprint+url}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{inproceedings}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor+others}%
\setunit{\space\textendash\space}\newblock
\usebibmacro{maintitle+title}%
\newunit\newblock
\usebibmacro{in:}%
\usebibmacro{byeditor+others}%
\setunit{\textendash\space}\newblock %%%remplace \newunit\newblock pour rajouter un tiret entre le dir. et le mainttille des bouquins
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{event+venue+date}%
\newunit\newblock
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}%
\newunit
\printfield{volumes}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\printlist{organization}%
\newunit
\usebibmacro{publisher+location+date}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{isbn}}
{}%
\newunit\newblock
\usebibmacro{doi+eprint+url}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\usebibmacro{series+number}%
% \newunit\newblock %%%% enlever
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{inbook}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor+others}%
\setunit{\space\textendash\space}\newblock
\usebibmacro{maintitle+title}%
\newunit\newblock
\usebibmacro{in:}%
\usebibmacro{byeditor+others}%
\setunit{\textendash\space}\newblock %%%remplace \newunit\newblock pour rajouter un tiret entre le dir. et le mainttille des bouquins
\usebibmacro{maintitle+booktitle}%
\usebibmacro{bybookauthor}%
\newunit\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\printfield{edition}%
\newunit
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}%
\newunit
\printfield{volumes}%
\newunit\newblock
\usebibmacro{series+number}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\usebibmacro{publisher+location+date}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{isbn}}
{}%
\newunit\newblock
\usebibmacro{doi+eprint+url}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{proceedings}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{editor+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{maintitle+title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{event+venue+date}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}%
\newunit
\printfield{volumes}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\printlist{organization}%
\newunit
\usebibmacro{publisher+location+date}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit\addcomma
\printfield{pagetotal}%
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{isbn}}
{}%
\newunit\newblock
\usebibmacro{doi+eprint+url}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\usebibmacro{series+number}% rajoute collection
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}
%% Pour avoir collaboration après l'auteur pour namea
\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
%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:last-first}[4]{%
\ifuseprefix
{\usebibmacro{name:delim}{#3#1}%
\usebibmacro{name:hook}{#3#1}%
\ifblank{#3}{}{%
\ifcapital
{\mkbibnameprefix{\MakeCapital{#3}}\isdot}
{\mkbibnameprefix{#3}\isdot}%
\ifpunctmark{'}{}{\bibnamedelimc}}%
\mkbibnamelast{#1}\isdot
\ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
\ifblank{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibparens{\mkbibnamefirst{#2}}\isdot}}% added \mkbibparens
{\usebibmacro{name:delim}{#1}%
\usebibmacro{name:hook}{#1}%
\mkbibnamelast{#1}\isdot
\ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
\ifblank{#2#3}{}{\revsdnamepunct}%
\ifblank{#2}{}{\bibnamedelimd\bibopenparen\mkbibnamefirst{#2}\isdot}% added \bibopenparen
\ifblank{#3}{}{\bibnamedelimd\ifblank{#2}{\bibopenparen}{}\mkbibnameprefix{#3}\isdot}% added \ifblank{#2}{\bibopenparen}{}
\ifblank{#2#3}{}{\bibcloseparen}}}% this line is new
%%%
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{arnaud2005,
title = {Les routes de la navigation antique. Itinéraires en Méditerranée},
publisher = {Errance},
year = {2005},
author = {Pascal Arnaud},
pagetotal = {248},
address = {Paris},
}
@Inproceedings{arcelin1976,
author = {Patrice Arcelin},
title = {Les civilisations de l'âge du Fer en Provence},
booktitle = {La préhistoire française, II. Les civilisations néolithiques et protohistoriques de la France},
year = {1976},
pages = {657-675},
editor = {Guilaine, Jean},
address = {Paris},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\cite{arnaud2005, arcelin1976}
\printbibliography
\end{document}
编辑 1:我刚刚发现了最后一个问题,它在某些情况下出现,它是如何出现在你身上的:
@Book{roman.roman1997,
title = {Histoire de la Gaule (VI\ieme{} s. av. J.-C. -- I\ier{} s. ap. J.-C.). Une confrontation culturelle},
publisher = {Fayard},
year = {1997},
author = {Daniele Roman and Yves Roman},
pagetotal = {791},
address = {Paris},
owner = {Axel},
}
这个首字母问题在其他一些情况下也会出现,而我的参考书目包含 500 多个条目,效果很好。你有什么想法吗?我尝试重新创建条目、删除重音、更改标题等。但都不起作用!
答案1
如果你使用 Biber,你将需要重新定义以下内容name:family-given
\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}}}
除了 cfr 已经应用的更改(这些更改也在Biblatex 3.3 名称格式)我们需要将\ifblank
s改为\ifdefvoid
(这与您当前在 3.3 版本中看到的相反,但\ifempty
存在一些问题因此将被删除)。
由于名称处理发生了巨大变化,旧代码和当前 BibTeX 代码需要使用\ifblank
,而当前 Biber 需要\ifdefvoid
。
答案2
以下似乎有效。这使用 Latin Modern,因为我非常怀疑我是否有一种带有Times New Roman
小写字母等的字体。
我必须切换到 Biber 后端才能使其正常工作。如果没有它,Biblatex 会拒绝支持 UTF-8 编码的数据库文件,而在本例中你大概会想要它。
\begin{filecontents}{\jobname.bib}
@Book{arnaud2005,
title = {Les routes de la navigation antique. Itinéraires en Méditerranée},
publisher = {Errance},
year = {2005},
author = {Pascal Arnaud},
pagetotal = {248},
address = {Paris},
}
@Inproceedings{arcelin1976,
author = {Patrice Arcelin},
title = {Les civilisations de l'âge du Fer en Provence},
booktitle = {La préhistoire française, II. Les civilisations néolithiques et protohistoriques de la France},
year = {1976},
pages = {657-675},
editor = {Guilaine, Jean},
address = {Paris},
}
\end{filecontents}
\documentclass[10pt]{article}
\usepackage{polyglossia}
\setdefaultlanguage{french}
\usepackage{xpatch}
\usepackage{csquotes}
\providecommand{\ier}{\textsuperscript{er}}
\providecommand{\iers}{\textsuperscript{ers}}
\providecommand{\iere}{\textsuperscript{ère}}
\providecommand{\ieres}{\textsuperscript{ères}}
\providecommand{\ieme}{\textsuperscript{e}}
\providecommand{\iemes}{\textsuperscript{es}}
\providecommand{\nd}{\textsuperscript{nd}}
\providecommand{\nds}{\textsuperscript{nds}}
\providecommand{\nde}{\textsuperscript{nde}}
\providecommand{\ndes}{\textsuperscript{ndes}}
\providecommand{\no}{\textsuperscript{o}}
\providecommand{\nos}{\textsuperscript{os}}
\providecommand{\mme}{M\textsuperscript{me}\space}
\providecommand{\mmes}{M\textsuperscript{mes}\space}
\providecommand{\mr}{M.\space}
\providecommand{\mrs}{MM.\space}
%bibliography
\usepackage[%
backend=biber,
style=authoryear,
autolang=hyphen,
uniquename=init,
giveninits,
mergedate=false,
maxcitenames=2,
maxbibnames=999,
]{biblatex}
\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,thesis,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}
%Met les abréviations des revues
\renewbibmacro*{journal}{%
\iffieldundef{shortjournal}
{%
\iffieldundef{journaltitle}
{}
{%
\printtext[journaltitle]
{%
\printfield[titlecase]{journaltitle}%
\setunit{\subtitlepunct}%
\printfield[titlecase]{journalsubtitle}%
}%
}%
}
{\printtext[journaltitle]{\printfield[titlecase]{shortjournal}}}%
}
%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}},%
%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}}
%%modifié book pour virgule
\DeclareBibliographyDriver{book}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor+others/translator+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{maintitle+title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\printfield{edition}%
\newunit
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}%
\newunit
\printfield{volumes}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\usebibmacro{publisher+location+date}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit\addcomma
\printfield{pagetotal}%
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{isbn}}
{}%
\newunit\newblock
\usebibmacro{doi+eprint+url}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\usebibmacro{series+number}% rajoute a la fin series + nomber pour avoir la collection a la fin de la ligne. La modification du style est plus bas.
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}
%Change ordre des entrées pour les in quelquechoses :
\DeclareBibliographyDriver{incollection}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor+others}%
\setunit{\space\textendash\space}\newblock
\usebibmacro{maintitle+title}%
\newunit\newblock
\usebibmacro{in:}%
\usebibmacro{bybookauthor}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\setunit{\textendash\space}\newblock %%%remplace \newunit\newblock pour rajouter un tiret entre le dir. et le mainttille des bouquins
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\printfield{edition}%
\newunit
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}%
\newunit
\printfield{volumes}%
\newunit\newblock
\usebibmacro{series+number}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\usebibmacro{publisher+location+date}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{isbn}}
{}%
\newunit\newblock
\usebibmacro{doi+eprint+url}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{inproceedings}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor+others}%
\setunit{\space\textendash\space}\newblock
\usebibmacro{maintitle+title}%
\newunit\newblock
\usebibmacro{in:}%
\usebibmacro{byeditor+others}%
\setunit{\textendash\space}\newblock %%%remplace \newunit\newblock pour rajouter un tiret entre le dir. et le mainttille des bouquins
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{event+venue+date}%
\newunit\newblock
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}%
\newunit
\printfield{volumes}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\printlist{organization}%
\newunit
\usebibmacro{publisher+location+date}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{isbn}}
{}%
\newunit\newblock
\usebibmacro{doi+eprint+url}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\usebibmacro{series+number}%
% \newunit\newblock %%%% enlever
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{inbook}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor+others}%
\setunit{\space\textendash\space}\newblock
\usebibmacro{maintitle+title}%
\newunit\newblock
\usebibmacro{in:}%
\usebibmacro{byeditor+others}%
\setunit{\textendash\space}\newblock %%%remplace \newunit\newblock pour rajouter un tiret entre le dir. et le mainttille des bouquins
\usebibmacro{maintitle+booktitle}%
\usebibmacro{bybookauthor}%
\newunit\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\printfield{edition}%
\newunit
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}%
\newunit
\printfield{volumes}%
\newunit\newblock
\usebibmacro{series+number}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\usebibmacro{publisher+location+date}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{isbn}}
{}%
\newunit\newblock
\usebibmacro{doi+eprint+url}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{proceedings}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{editor+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{maintitle+title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{event+venue+date}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}%
\newunit
\printfield{volumes}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\printlist{organization}%
\newunit
\usebibmacro{publisher+location+date}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit\addcomma
\printfield{pagetotal}%
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{isbn}}
{}%
\newunit\newblock
\usebibmacro{doi+eprint+url}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\usebibmacro{series+number}% rajoute collection
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}
%% Pour avoir collaboration après l'auteur pour namea
\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
%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}%
\ifblank{#3}{}{%
\ifcapital
{\mkbibnameprefix{\MakeCapital{#3}}\isdot}
{\mkbibnameprefix{#3}\isdot}%
\ifpunctmark{'}{}{\bibnamedelimc}}%
\mkbibnamefamily{#1}\isdot
\ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
\ifblank{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibparens{\mkbibnamegiven{#2}}\isdot}}% added \mkbibparens
{\usebibmacro{name:delim}{#1}%
\usebibmacro{name:hook}{#1}%
\mkbibnamefamily{#1}\isdot
\ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
\ifblank{#2#3}{}{\revsdnamepunct}%
\ifblank{#2}{}{\bibnamedelimd\bibopenparen\mkbibnamegiven{#2}\isdot}% added \bibopenparen
\ifblank{#3}{}{\bibnamedelimd\ifblank{#2}{\bibopenparen}{}\mkbibnameprefix{#3}\isdot}% added \ifblank{#2}{\bibopenparen}{}
\ifblank{#2#3}{}{\bibcloseparen}}}% this line is new
\addbibresource{\jobname.bib}
\begin{document}
\cite{arnaud2005, arcelin1976}
\printbibliography
\end{document}