goLaTeX - Mein LaTeX-Forum

Mein LaTeX-Forum


Login  | Registrieren
Direktlinks:
Zuletzt aktive Beiträge
Unbeantwortete Beiträge
[Erweitert]

Forenstatistik:
Beiträge: 97232
Top-Poster: Johannes_B (5047)

Wir begrüßen unseren neuesten Benutzer Tethys.

Links:


Mit Unterstützung von DANTE e.V.: Deutschsprachige Anwendervereinigung TeX. Danke den Mitgliedern!





Forum
      Option
[Erweitert]
  • Diese Seite weiterempfehlen
     


Gehe zu:  
Neues Thema eröffnen Neue Antwort erstellen

Neuer Bib-Typ Interview

 

Gast


Beiträge: ---
Anmeldedatum: ---
Wohnort: ---
Version: ---
     Beitrag Verfasst am: 07.04.2019, 20:10     Titel: Neuer Bib-Typ Interview
  Antworten mit Zitat      
Hallo und guten Abend,

Kann mir jemand helfen - irgendwie wird das Jahr hier nicht ausgegeben:

Code • Öffne in Overleaf

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@interview{homer,
  interviewee = {Homer Simpson
},
  interviewer = {Bart Simpson},
  date        = {2018-07-25},
  address     = {Springfield},
  year        = {2018}
}
\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 durch Autor},
}

\DeclareNameAlias{interviewee}{author}

\DeclareBibliographyDriver{interview}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \printnames{interviewee}%
  \newunit\newblock
  \usebibmacro{year}%
  \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}
 


Vielen Dank für die Hilfe!

Gast


Beiträge: ---
Anmeldedatum: ---
Wohnort: ---
Version: ---
     Beitrag Verfasst am: 07.04.2019, 20:13     Titel:
  Antworten mit Zitat      
Sollte irgendwie so aussehen:

SIMPSON, Homer, 2018. Interview durch Autor. Springfield, 25.07.2018

Gast


Beiträge: ---
Anmeldedatum: ---
Wohnort: ---
Version: ---
     Beitrag Verfasst am: 07.04.2019, 20:43     Titel:
  Antworten mit Zitat      
Wenn ich das richtig sehe, ist der Code von dieser exzellenten Antwort inspiriert.

Für eine authoryear-Anpassung würde ich das Folgende nutzen.
Code • Öffne in Overleaf
\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,style=authoryear,mergedate=false,backend=biber]{biblatex}
\usepackage{hyperref}
\addbibresource{\jobname.bib}

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

\DeclareLabelname{%
  \field{shortauthor}
  \field{author}
  \field{shorteditor}
  \field{editor}
  \field{translator}
  \field{interviewee}
}

\ExecuteBibliographyOptions{useinterviewee}
\DeclareNameAlias{interviewee}{author}

\makeatletter
\newbibmacro*{interviewee}{%
  \ifboolexpr{
    test \ifuseinterviewee
    and
    not test {\ifnameundef{interviewee
}}
  }
    {\usebibmacro{bbx:dashcheck}
       {\bibnamedash}
       {\usebibmacro{bbx:savehash}%
        \printnames{interviewee}%
        \setunit{\printdelim{nameyeardelim}}}}%
    {\global\undef\bbx@lasthash
     \usebibmacro{labeltitle
}%
     \setunit*{\printdelim{nonameyeardelim}}}%
  \usebibmacro{date+extradate}}
\makeatother

\DeclareBibliographyDriver{interview}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{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}


Ich habe aber das Gefühl, dass Du der Gast mit biblatex-iso und Overleaf bist. Da muss es natürlich anders aussehen. Aufbauend auf das, was wir schon in https://golatex.de/access-date-and-publish-date-t21734.html erarbeitet haben, wäre das in etwa
Code • Öffne in Overleaf
\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[backend=biber, datamodel=interview,
  style=iso-authoryear,
  date=edtf, labeldate=year,
  maxbibnames=3, shortnumeration
]{biblatex}
\usepackage{hyperref}
\addbibresource{\jobname.bib}


\DeclareNameAlias{default}{given-family}
\DeclareNameAlias{sortname}{family-given/given-family}
\DeclareNameAlias{author}{sortname}
\DeclareNameAlias{editor}{sortname}
\DeclareNameAlias{translator}{sortname}

\DeclareDelimFormat{multinamedelim}{\addcomma\space}
\DeclareDelimFormat{finalnamedelim}{%
  \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
  \addspace\bibstring{and}\space}

\DeclareNameAlias[incollection]{editor}{default}
\makeatletter
\renewbibmacro*{bbx:editor}[1]{%
  \ifboolexpr{
    test \ifuseeditor
    and
    not test {\ifnameundef{editor
}}
  }
    {\usebibmacro{bbx:savehash}%
     \printnames{editor}%
     \setunit{\addcomma\space}%
     \usebibmacro{#1}%
     \clearname{editor}}
    {\global\undef\bbx@lasthash
     \usebibmacro{labeltitle
}}}%
\makeatother

%%% EMULATION RELEVANTER BEFEHLE
%%% NUR FÜR VERALTETE SYSTEME WIE BEI Overleaf
%%% BEI NEUEREN SYSTEMEN IST DIESER BLOCK ZU ENTFERNEN
\makeatletter
\def\blx@imc@iflabeldateisdate{%
  \ifboolexpr{%
    togl {blx@labeldateparts}
    and not test {\iffieldundef{labeldatesource}}
    and
    (test {\iffieldequalstr{labeldatesource}{}}
     or test {\iffieldequalstr{labeldatesource}{year}})}}

\def\blx@imc@ifdatehasyearonlyprecision#1{%
  \ifboolexpr{not test {\iffieldundef{#1year}}
              and (test {\ifcsstring{blx@dateformat@#1date}{year}}
                   or (test {\iffieldundef{#1month}}
                       and test {\iffieldundef{#1season}}))}}

\def\blx@imc@ifdatehastime#1{%
  \ifboolexpr{togl {blx@#1dateusetime}
                 and not test {\iffieldundef{#1hour}}}}

\def\blx@imc@ifdateshavedifferentprecision#1#2{%
  \ifboolexpr{   (test {\ifdatehasyearonlyprecision{#1}}
                  and not test {\ifdatehasyearonlyprecision{#2}})
              or (not test {\ifdatehasyearonlyprecision{#1}}
                  and test {\ifdatehasyearonlyprecision{#2}})
              or (test {\ifdatehastime{#1}}
                  and not test {\ifdatehastime{#2}})
              or (not test {\ifdatehastime{#1}}
                  and test {\ifdatehastime{#2}})}}

\def\blx@imc@ifdateyearsequal#1#2{%
  \ifboolexpr{ test {\iffieldsequal{#1year}{#2year}}
               and test {\iffieldsequal{#1dateera}{#2dateera}}}}

\blx@regimcs{%
  \iflabeldateisdate \ifdatehasyearonlyprecision \ifdatehastime
  \ifdateshavedifferentprecision
  \ifdateyearsequal}
\makeatother
%%% EMULATION ENDE

\renewbibmacro*{date}{%
  \ifboolexpr{
    test {\iflabeldateisdate
}
    and
    not test {\ifdateshavedifferentprecision{label}{}}
  }%
    {}
    {\printdate
}}

\DefineBibliographyStrings{german}{%
  andothers = {und andere},
  urlseen   = {Zugriff am:},
  urlfrom   = {Verfügbar unter:},
}

\DeclareFieldFormat*{pages}{\mkmlpageprefix[bookpagination]{#1}}

\renewcommand{\finentrypunct}{}

\urlstyle{same
}


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

\DeclareLabelname{%
  \field{shortauthor}
  \field{author}
  \field{shorteditor}
  \field{editor}
  \field{translator}
  \field{interviewee}
}

\ExecuteBibliographyOptions{useinterviewee}
\DeclareNameAlias{interviewee}{author}

\makeatletter
\newbibmacro*{interviewee}{%
  \ifboolexpr{
    test \ifuseinterviewee
    and
    not test {\ifnameundef{interviewee
}}
  }
    {\usebibmacro{bbx:dashcheck}
       {\bibnamedash}
       {\usebibmacro{bbx:savehash}%
        \printnames{interviewee}%
        \setunit{\printdelim{nameyeardelim}}}}%
    {\global\undef\bbx@lasthash
     \usebibmacro{labeltitle
}%
     \setunit*{\printdelim{nonameyeardelim}}}%
  \printextrayear}
\makeatother

\DeclareBibliographyDriver{interview}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{interviewee}%
  \newunit\newblock
  \bibstring{interview}%
  \setunit{\addspace}%
  \printnames{interviewer}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{location+publisher+date}%
  \newunit
  \printfield{version}%
  \setunit{\addspace}%
  \usebibmacro{urldate}%
  \newunit\newblock
  \usebibmacro{series+number}%
  \newunit\newblock
  \usebibmacro{identifier}%
  \newunit\newblock
  \usebibmacro{availability+access}%
  \newunit\newblock
  \printfield{note}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}


\begin{document}
\cite{homer}

\printbibliography
\end{document}

Neues Thema eröffnen Neue Antwort erstellen



Options and Permissions
Beiträge der letzten Zeit anzeigen:

Du kannst Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum antworten.
Du kannst deine Beiträge in diesem Forum nicht bearbeiten.
Du kannst deine Beiträge in diesem Forum nicht löschen.
Du kannst an Umfragen in diesem Forum nicht mitmachen.
Du kannst Dateien in diesem Forum nicht posten
Du kannst Dateien in diesem Forum herunterladen
.

goLaTeX ist Teil der goForen
goForen.de goMATLAB.de goLaTeX.de


  Datenschutzerklärung | Impressum | FAQ | goLaTeX RSS Button RSS-Feed

Copyright © 2008 - 2019 goLaTeX.de