1

The output from the code here is already quite close to the requirements I need to meet. However, there are two small things that are missing.

Currently the bibliography entry looks like: Simpson, Homer. Interview Bart Simpson. Springfield, 25/7/2018.

However, it should look like: Simpson, Homer. Interview Bart Simpson, 25/7/2018, Springfield.

So there are two things that need to be changed:

  1. add a comma after the interviewer not a point
  2. change location of date and address

With my very bumbling knowledge of biblatex I just tried to change the location of date and addres in the usebibmacro and to add \isdot to print a comma. Not very surprisingly both didn't work and unfortunately I also didn't find the answer to my questions in the biblatex manual (or to be more precise I didn't understand it).

So how do I have to change the code so it works?

    \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]{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}%
      \newunit\newblock
      \printfield{note}%
      \newunit\newblock
      \usebibmacro{location+date}%
      \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}}

    \begin{document}
    \cite{homer}

    \printbibliography
    \end{document}
derd
  • 107

1 Answers1

3

Just tweaking the bibdriver from moewe's answer:

\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]{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}}

\begin{document}
\cite{homer}

\printbibliography
\end{document}

enter image description here

gusbrs
  • 13,740