2

I have inbook entry where author is the same as bookauthor. By default a bookauthor is omitted in citations in such a case. It can be changed by

\renewbibmacro*{bybookauthor}{%
\printnames{bookauthor}
}

But now we have the same name printed twice. How can I enable idemtracker inside of inbook entry? MWE:

\documentclass{article}

\usepackage[style=verbose-trad1]{biblatex}
\addbibresource{\jobname.bib}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}

@inbook{mybook,
  author={Done, John},
  bookauthor={Done, John},
  title={Chapter title},    
  booktitle={Main book title},
crossref={mainbook},
}
\end{filecontents}

\renewbibmacro*{bybookauthor}{%
 \printnames{bookauthor}
}

\begin{document}
\cite{mybook}
\end{document}

Result: result

Expected result: expectation

UPD:

I've found partial solution:

\renewbibmacro*{bybookauthor}{%
  \ifnamesequal{author}{bookauthor}
    {\bibstring[\mkibid]{idem\thefield{gender}}%
      \setunit{\printdelim{nametitledelim}}}
    {\printnames{bookauthor}}

} Or even

\renewbibmacro*{bybookauthor}{%
  \ifnamesequal{author}{bookauthor}
    {\usebibmacro{cite:idem}}
    {\printnames{bookauthor}}}

results: result2 But now the problem is the dot between idem and booktitle. A comma is expected.

4
  • It is usually not expected for an @inbook, but might be possible for @suppbook (which is aliased to @inbook) or in very specific situations that author and bookauthor are not equal (so you wouldn't get an idem), do you want the comma in that case as well or would you want a period?
    – moewe
    Sep 28 '19 at 10:47
  • I thought @suppbook is rather preferred when citing the preface, afterwords etc. In my case it is totally independent chapter. The book himself is a kind of collection of an independent articles (chapters) written by the same author and published as a book. There must be a comma in this place, even if I use some other delimiter between author, title, publisher etc.
    – andc
    Sep 29 '19 at 11:51
  • Sure, the thing is that I wanted to know what would happen if author and bookauthor are not the same (and you get no idem but the full bookauthor), do you want a comma in that case as well or a period? (The comment about @suppbook was just to emphasise that this is not a purely academic question, but a real possibility.)
    – moewe
    Sep 29 '19 at 11:59
  • Oh, sorry, I misunderstood you. In that case (author and bookauthor are not equal) a default blocks delimiter (\newunitpunct) must be used.
    – andc
    Sep 29 '19 at 13:01
2

Getting the delimiter right is a bit tricky, because the punctuation tracker usually prints the last punctuation it gets and the drivers add \newunitpunct after executing the bookauthor bibmacro. We can use \printunit instead of the normal \setunit to work around that.

\documentclass{article}

\usepackage[style=verbose-trad1]{biblatex}

\renewbibmacro*{bybookauthor}{%
  \ifnamesequal{author}{bookauthor}
    {\bibstring[\mkibid]{idem\thefield{gender}}%
     \printunit{\addcomma\space}}
    {\printnames{bookauthor}}}


\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@inbook{mybook,
  author     = {Done, John},
  bookauthor = {Done, John},
  title      = {Chapter title},
  booktitle  = {Main book title},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\cite{mybook}
\end{document}

John Done. “Chapter title”. In: idem, Main book title

1
  • Great as always. Many thanks!
    – andc
    Sep 29 '19 at 13:20

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.