我对 Idem / Ibidem 进行了一些自定义设置,但当我引用作者也是该合集编辑的作品时,出现了问题。例如,在下面的 MWE 中,我得到了以下输出:
M. Gagliardi,《和子论:思辨神学》,载于 M. Gagliardi (a cura di),《和子论》。他在罗马的信仰中奋斗了一千年(1014-2014),梵蒂冈编辑图书馆,梵蒂冈城 2015 年,第 247-283 页。
但我想要的是这个输出:
M. Gagliardi,《和子论:思辨神学》,载于 Id. (a cura di),和子句。他在罗马的信仰中奋斗了一千年(1014-2014),梵蒂冈编辑图书馆,梵蒂冈城 2015 年,第 247-283 页。
我真的不知道该怎么解决这个问题
梅威瑟:
% !BIB TS-program = biber
% !BIB program = biber
% !TEX encoding = UTF-8 Unicode
% !TeX TS-program = xelatexmk
\begin{filecontents}{archivio.bib}
@incollection{Gag:Teo,
Address = {Città del Vaticano},
Author = {Mauro Gagliardi},
Crossref = {Gag:Fil},
Pages = {247-283},
Title = {Il \textit{Filioque}: teologia speculativa},
Year = {2015}}
@collection{Gag:Fil,
Booktitle = {Il Filioque. A mille anni dal suo inserimento nel credo a Roma (1014-2014)},
Editor = {Mauro Gagliardi},
Location = {Città del Vaticano},
Publisher = {Libreria Editrice Vaticana},
Shorttitle = {Il Filioque},
Title = {Il Filioque. A mille anni dal suo inserimento nel credo a Roma (1014-2014)},
Year = {2015}}
\end{filecontents}
\documentclass[11pt, openany]{book}
\usepackage{polyglossia}
\setmainlanguage[babelshorthands=true]{italian}
\setotherlanguages{latin, english, french}
\usepackage[]{csquotes}
\usepackage{xpatch}
\usepackage[style=verbose-trad2,
language=auto,
ibidpage=true,
autolang=other,% use new option name
useprefix=true,
giveninits=true,
indexing=true,% or cite?
citepages=separate,%
dateabbrev=false,
backend=biber,
]{biblatex}
\addbibresource{archivio.bib}
\DeclareFieldFormat[article, inbook, incollection, inproceedings]{title}{\mkbibemph{#1}}
\DeclareFieldFormat[book, inbook, incollection, inproceedings]{volume}{#1}
% the colon/comma issues for pages together with citepages=separate
\renewbibmacro*{cite:postnote:pages}{%
\setunit{\addcolon\space\nopunct}%
\printfield{postnote}}
\renewbibmacro*{byeditor+others}{%
\ifnameundef{editor}
{}
{\printnames[byeditor]{editor}%
\setunit{\addspace}%
\usebibmacro{editor+othersstrg}%
\clearname{editor}%
\newunit}%
\usebibmacro{byeditorx}%
\usebibmacro{bytranslator+others}}
\xpatchbibdriver{incollection}{%
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}%
}%
{%
\usebibmacro{byeditor+others}%
\setunit{\addcomma\space}\newblock
\usebibmacro{maintitle+booktitle}%
}%
{}{}%
% This is to kill a comma between Editor and (Ed.)
\DeclareDelimFormat{editortypedelim}{\addspace}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimFormat{translatortypedelim}{\addspace}
\DeclareFieldFormat{translatortype}{\mkbibparens{#1}}
\renewcommand*{\newunitpunct}{\addcomma\space}
\xpatchbibmacro{name:andothers}{%
\bibstring{andothers}%
}{%
\bibstring[\emph]{andothers}%
}{}{}
\renewbibmacro{in:}{\bibstring{in}\nopunct\space} %\nopunct aggiunto 30 mag 18 per evitare virgola in incollection
\NewBibliographyString{ibidemloccit,ibidemnoloccit}
\newcommand*{\mklangidem}[1]{%
\DefineBibliographyStrings{#1}{% era \DefineBibliographyStrings{italian}{%
idem = {Id\adddot},
idemsm = {Id\adddot},
idemsf = {Ead\adddot},
idemsn = {Id\adddot},
idempm = {Id\adddot},
idempf = {Id\adddot},
idempn = {Id\adddot},
idempp = {Id\adddot},
ibidemloccit = {\mkbibemph{\autocap{i}bid\adddot}},
ibidemnoloccit = {Ivi},
opcit = {cit\adddot}, %tolto \nopunct per avere la virgola 30 mag 2018
loccit = {loc\adddotspace cit\adddot},
}}
\forcsvlist{\mklangidem}{english,italian, german}
%%%%%%%%%%%%%%%%%%%%%%%%%%%CAMPO EDITOR TRA PARENTESI CON EDD%%%%%%%%%%%
\DefineBibliographyStrings{italian}{
editor = {a cura di},
editors={a cura di},
byeditor = {a cura di}
}
\xpatchbibmacro{author}
{\printnames{author}}
{\ifcitation
{\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
{\usebibmacro{cite:idem}}
{\printnames{author}}}
{\printnames{author}}}
{}{}
\xpatchbibmacro{bbx:editor}
{\printnames{editor}}
{\ifcitation
{\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
{\usebibmacro{cite:idem}}
{\printnames{editor}}}
{\printnames{editor}}}
{}{}
\xpatchbibmacro{bbx:translator}
{\printnames{translator}}
{\ifcitation
{\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
{\usebibmacro{cite:idem}}
{\printnames{translator}}}
{\printnames{translator}}}
{}{}
\renewbibmacro*{cite:ibid}{%
\printtext{%
\bibhyperlink{cite\csuse{cbx@lastcite@\thefield{entrykey}}}{%
\ifloccit
{\bibstring[\mkibid]{ibidemloccit}%
\global\toggletrue{cbx:loccit}}
{\bibstring[\mkibid]{ibidemnoloccit}}}}}
\DeclareFieldFormat[article, inbook, incollection, inproceedings]{citetitle}{\mkbibemph{#1}}
\renewbibmacro*{publisher+location+date}{%
\printlist{publisher}%
\setunit*{\addcomma\space}%
\printlist{location}%
\setunit*{\space}%
\usebibmacro{date}%
\newunit}
\renewbibmacro*{series+number}{%
\iffieldundef{series}
{}
{\setunit{\addspace}%
\printtext[parens]{%
\printfield{series}%
\setunit*{\addspace}%
\printfield{number}}}%
\newunit}
\begin{document}
I would like to have a Id. here\footcite{Gag:Teo}
\end{document}
答案1
您需要检查author
和是否editor
一致byeditor+others
\renewbibmacro*{byeditor+others}{%
\ifnameundef{editor}
{}
{\ifnamesequal{author}{editor}
{\bibstring[\mkibid]{idem\thefield{gender}}}
{\printnames[byeditor]{editor}}%
\setunit{\addspace}%
\usebibmacro{editor+othersstrg}%
\clearname{editor}%
\newunit}%
\usebibmacro{byeditorx}%
\usebibmacro{bytranslator+others}}