2

I need to modify the custom interview citation style from this post. The bibliography looks like it should. In the citation the authors name is given as "Given Family". However, the citation should look like the bibliography ("Family, Given"). How can I change that?

"Homer Simpson. Interview Bart Simpson, 25. Juli 2018, Springfield."

How the citation should look like: "Simpson, Homer. Interview Bart Simpson, 25. Juli 2018, Springfield."

 \RequirePackage{filecontents}
    \begin{filecontents*}{\jobname.bib}
      @interview{homer,
        interviewee = {Homer Simpson},
        interviewer = {Bart Simpson},
        date        = {2018-07-25},
        address     = {Springfield},
      }
    \end{filecontents*}


\begin{filecontents}{interview.dbx}
  \DeclareDatamodelEntrytypes{interview}
  \DeclareDatamodelFields[type=list,datatype=name]{
    interviewer,
    interviewee,
  }

  \DeclareDatamodelEntryfields[interview]{
    addendum,
    doi,
    eprint,
    eprintclass,
    eprinttype,
    interviewer,
    interviewee,
    location,
    note,
    pubstate,
  }
\end{filecontents}
\documentclass[ngerman]{article}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[datamodel=interview,backend=biber, style=verbose]{biblatex}
\usepackage{hyperref}
\addbibresource{\jobname.bib}

\NewBibliographyString{interview}
\DefineBibliographyStrings{german}{%
  interview   = {Interview},
}

\DeclareNameAlias{interviewee}{author}

\DeclareBibliographyDriver{interview}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \printnames{interviewee}%
  \newunit\newblock
  \bibstring{interview}%
  \setunit{\addspace}%
  \printnames{interviewer}%
  \setunit{\addcomma\space}%
  \usebibmacro{date}%
  \setunit{\addcomma\space}%
  \printlist{location}%
  \newunit\newblock
  \printfield{note}%
  \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}}

\newbibmacro*{cite:short:interview}{%
    \usebibmacro{cite:full:citepages}%
    \printtext[bibhyperlink]{%
        \usedriver
        {\DeclareNameAlias{sortname}{default}}
        {\thefield{entrytype}}}}

\renewbibmacro*{cite:short}{%
    \ifbibmacroundef{cite:short:\strfield{entrytype}}
    {\printnames{labelname}%
        \setunit*{\printdelim{nametitledelim}}%
        \printtext[bibhyperlink]{%
            \printfield[citetitle]{labeltitle}}}
    {\usebibmacro*{cite:short:\strfield{entrytype}}}}

\begin{document}
    Lorem\footcite{homer}
    ipsum\footcite{homer}
\printbibliography
\end{document}
  • Remove the line \DeclareNameAlias{sortname}{default}. – moewe Dec 16 '18 at 10:01
  • For first citations I think it would be conceptually nicer to redefine cite:full instead, see the answer below. – moewe Dec 16 '18 at 10:12
4

verbose's cite:full macros usually call \usedriver as

\usedriver
  {\DeclareNameAlias{sortname}{default}}
  {\thefield{entrytype}}}%

which means that they change the format for sortname (the name format of the 'primary' name associated with an entry, the name before the title, usually author, editor or translator in that order) to default. The idea behind that is that default (which in the end is given-family) is the 'natural' name order and that family-given/given-family or family-given is only used in the bibliography to make it easier to spot the right part of the name for sorting. In the footnotes there is little issue with sorting and so given-family is used.

The implementation of cite:short:interview follows that practice to call \usedriver with \DeclareNameAlias{sortname}{default}.

In the following code \DeclareNameAlias{sortname}{default} is removed for cite:short:interview (for subsequent citations) and also cite:full (for the first citation)

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@interview{homer,
  interviewee = {Homer Simpson},
  interviewer = {Bart Simpson},
  date        = {2018-07-25},
  address     = {Springfield},
}
\end{filecontents*}
\begin{filecontents}{interview.dbx}
\DeclareDatamodelEntrytypes{interview}
\DeclareDatamodelFields[type=list,datatype=name]{
  interviewer,
  interviewee,
}

\DeclareDatamodelEntryfields[interview]{
  addendum,
  doi,
  eprint,
  eprintclass,
  eprinttype,
  interviewer,
  interviewee,
  location,
  note,
  pubstate,
}
\end{filecontents}
\documentclass[ngerman]{article}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[datamodel=interview,backend=biber, style=verbose]{biblatex}
\usepackage{hyperref}
\addbibresource{\jobname.bib}

\NewBibliographyString{interview}
\DefineBibliographyStrings{german}{%
  interview   = {Interview},
}

\DeclareNameAlias{interviewee}{author}

\DeclareBibliographyDriver{interview}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \printnames{interviewee}%
  \newunit\newblock
  \bibstring{interview}%
  \setunit{\addspace}%
  \printnames{interviewer}%
  \setunit{\addcomma\space}%
  \usebibmacro{date}%
  \setunit{\addcomma\space}%
  \printlist{location}%
  \newunit\newblock
  \printfield{note}%
  \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}}

\newbibmacro*{cite:short:interview}{%
    \usebibmacro{cite:full:citepages}%
    \printtext[bibhyperlink]{%
      \usedriver
        {}
        {\thefield{entrytype}}}}

\renewbibmacro*{cite:short}{%
  \ifbibmacroundef{cite:short:\strfield{entrytype}}
    {\printnames{labelname}%
     \setunit*{\printdelim{nametitledelim}}%
     \printtext[bibhyperlink]{%
       \printfield[citetitle]{labeltitle}}}
    {\usebibmacro*{cite:short:\strfield{entrytype}}}}

\renewbibmacro*{cite:full}{%
  \usebibmacro{cite:full:citepages}%
  \printtext[bibhypertarget]{%
    \usedriver
      {}
      {\thefield{entrytype}}}%
  \usebibmacro{shorthandintro}}

\begin{document}
    Lorem\footcite{homer}
    ipsum\footcite{homer}
\printbibliography
\end{document}

Fn.1: "Simpson, Homer. Interview Bart Simpson, 25. Juli 2018, Springfield."//Fn. 2 "Simpson, Homer. Interview Bart Simpson, 25. Juli 2018, Springfield."

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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