2

I made some custom settings on the Idem / Ibidem, but something goes wrong when I'm citing a work whose author is also the editor of the collection. In the following MWE, for instance, I get this output:

M. Gagliardi, Il Filioque: teologia speculativa, in M. Gagliardi (a cura di), Il Filioque. A mille anni dal suo inserimento nel credo a Roma (1014-2014), Libreria Editrice Vaticana, Città del Vaticano 2015, pp. 247–283.

but I would like to have this output, instead:

M. Gagliardi, Il Filioque: teologia speculativa, in Id. (a cura di), Il Filioque. A mille anni dal suo inserimento nel credo a Roma (1014-2014), Libreria Editrice Vaticana, Città del Vaticano 2015, pp. 247–283.

I really have no idea about how to fix the thing

MWE:

% !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}
2

You need to check if the author and editor coincide in 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}}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.