Gruppieren von Booktile und Serien in Biblatex-Chicago

Gruppieren von Booktile und Serien in Biblatex-Chicago

Ich verwende biblatex-chicago für meine Referenzen. Meine Bib-Datei enthält viele Referenzen zu Konferenzbeiträgen, die ich aus der digitalen Bibliothek von ACM importiert habe. Die Abkürzungen dieser Konferenzen sind oft bekannter als die vollständigen Titel der Konferenzen selbst. Daher inproceedingshabe ich für Einträge die Abkürzung mithilfe des Felds eingefügt series. Ich möchte die Felder booktitleund serieszusammen gruppieren.

\documentclass{article}
\usepackage[
    authordate,
    backend=biber,
    ]{biblatex-chicago} % biblatex setup

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@inproceedings{paper2012,
    author = {Smith, John},
date = {2012},
    title = {Paper Title},
    booktitle = {Proceedings of the 2012 ACM annual conference on Human Factors in Computing Systems},
    series = {CHI '12},
    pages = {937-946},
    location = {New York, NY, USA},    
    publisher = {{ACM}},    
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}

Dieses Beispiel gibt derzeit Folgendes aus:

Smith, John. 2012. „Titel des Artikels“ InProceedings der ACM-Jahreskonferenz 2012 zum Thema „Human Factors in Computing Systems“, 937–946. CHI '12. New York, NY, USA: ACM.

stattdessen möchte ich die Ausgabe der inproceedingsEinträge so ändern, dass booktitledie seriesFelder wie folgt gruppiert werden:

Smith, John. 2012. „Titel des Artikels“ InProceedings der ACM-Jahreskonferenz 2012 zu menschlichen Faktoren in Computersystemen — CHI '12, 937–46. New York, NY, USA: ACM.

ein wichtiger Vorbehalt besteht darin, dass nicht alle inproceedingsEinträge ein seriesFeld haben.

ist dies mit Biblatex-Chicago möglich?

Antwort1

Die anderen vorgeschlagenen Lösungen sollten booktitleaddonanstelle von verwendet werden series. Ich persönlich glaube nicht, dass dies seriesdas richtige Feld ist. Betrachten Sie beispielsweise die Springer Lecture Notes in Computer Science-Reihe, die die Protokolle von Computerkonferenzen veröffentlicht. Jedes Buch hat seinen Titel (der sich oft vom Konferenztitel unterscheidet), aber die Protokolle sind unter dem Konferenznamen oder häufiger unter dem Akronym bekannt. Und dann ist es üblich, einen Verweis auf die LNCS-Reihe und die Nummer in der Reihe aufzunehmen.

Biblatex bietet in Verbindung mit biberdie Möglichkeit, ein neues Feld zu erstellen. Ich schlage vor, das acronymFeld hinzuzufügen.

Dies kann erreicht werden mit

\begin{filecontents}{biblatex-dm.cfg}
\DeclareDatamodelFields[type=field,datatype=literal,skipout=false]{acronym}
\end{filecontents}

Es erstellt eine lokale Biblatex-Konfigurationsdatei.

Dann müssen wir die Anweisungen geben, wie das neue Feld gesetzt werden soll (kursiv für in proceedings).

\DeclareFieldFormat[inproceedings]{acronym}{\textit{#1}}

Der letzte Schritt besteht darin, das entsprechende zu ändern bibmacro, in diesem Fall btitle+bstitle.

\newbibmacro*{btitle+bstitle}{% 
  \iffieldundef{booktitle}
  {}
  {\ifthenelse{\ifentrytype{audio}\OR\ifentrytype{music}\OR%
      \ifentrytype{video}}%
    {}%
    {\usebibmacro{cms-in:}}%
    \printtext{%
      \printfield{booktitle}%
      \setunit{\addcolon\addspace}%
      \printfield[booktitle]{booksubtitle}}%
      \setunit{\addspace---\addspace}%
      \ifentrytype{inproceedings}
        {\printfield{acronym}}
        {}%
    \newcunit
    \printfield{booktitleaddon}%
    \setunit*{\addcomma\addspace}}}

Beachten Sie, dass wir \ifentrytype{inproceedings}die Änderung nur auf diesen Eintragstyp lokalisieren.

Hier ist das vollständige MWE

\documentclass{article}
\usepackage[
    authordate,
    backend=biber,
    ]{biblatex-chicago} % biblatex setup

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@inproceedings{paper201x,
    author = {Smith, John},
date = {2012},
    title = {Paper Title},
    booktitle = {Long Title of the Confererence},
    acronym = {CONF'2012},
    pages = {937-946},
    series = {LNCS},
    number = {1234},
    location = {Heidelberg},    
    publisher = {Springer},    
}

@inproceedings{paper2012a,
    author = {Smith, John},
date = {2012},
    title = {Paper Title},
    booktitle = {Proceedings of the 2012 ACM annual conference on Human Factors in Computing Systems},
    series = {CHI '12},
    pages = {937-946},
    location = {New York, NY, USA},    
    publisher = {{ACM}},    
}

@inproceedings{paper2012b,
    author = {Smith, John},
date = {2012},
    title = {Paper Title},
    booktitle = {Proceedings of the 2012 ACM annual conference on Human Factors in Computing Systems},
    acronym = {CHI '12},
    pages = {937-946},
    location = {New York, NY, USA},    
    publisher = {{ACM}},    
}

\end{filecontents}

\begin{filecontents}{biblatex-dm.cfg}
\DeclareDatamodelFields[type=field,datatype=literal,skipout=false]{acronym}
\end{filecontents}

\DeclareFieldFormat[inproceedings]{acronym}{\textit{#1}}

\newbibmacro*{btitle+bstitle}{% InIn fix from N&B
  \iffieldundef{booktitle}
  {}
  {\ifthenelse{\ifentrytype{audio}\OR\ifentrytype{music}\OR%
      \ifentrytype{video}}%
    {}%
    {\usebibmacro{cms-in:}}%
    \printtext{%
      \printfield{booktitle}%
      \setunit{\addcolon\addspace}%
      \printfield[booktitle]{booksubtitle}}%
      \setunit{\addspace---\addspace}%
      \ifentrytype{inproceedings}
        {\printfield{acronym}}
        {}%
    \newcunit
    \printfield{booktitleaddon}%
    \setunit*{\addcomma\addspace}}}



\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}

Bildbeschreibung hier eingeben

Antwort2

Ich würde Ihnen raten, booktitleaddonstattdessen das Feld zu verwenden, da es bereits so konzipiert ist, dass es an der gewünschten Stelle gedruckt wird. Allerdings sind diese Arten von Feldern normalerweise ziemlich „tief“ im Treiber, sodass Sie darauf achten müssen, dass Ihre Änderungen nur inproceedingsEinträge betreffen, da dieselben Bibmacros wie andere „In-“ verwendet werden.

Ich würde es so machen: Neue Bibmacros erstellen und das xpatchPaket verwenden, um das zu ersetzen, was benötigt wird.

\documentclass{article}
\usepackage[
    authordate,
    backend=biber,
    ]{biblatex-chicago} % biblatex setup

\usepackage{xpatch}
\usepackage{xcolor}
\newcommand{\diff}[1]{\textcolor{red}{#1}}% <-- just to highlight differences

\usepackage{filecontents}

\begin{filecontents*}{\jobname.bib}% we need more entries...
@inproceedings{paper2012,
    author = {Smith, John},
    date = {2012},
    title = {Paper Title},
    booktitle = {Proceedings of the 2012 ACM annual conference on Human Factors in Computing Systems},
    booktitleaddon = {\diff{CHI '12}},
    number = 33,
    series = {\diff{This is the series}},
    pages = {937-946},
    location = {New York, NY, USA},
    publisher = {{ACM}},
}

@inproceedings{paper2013,
    author = {Smith, John},
    date = {2013},
    title = {Different Paper Title},
    booktitle = {Proceedings of the 2012 ACM annual conference on Human Factors in Computing Systems},
    booksubtitle = {\diff{With a Subtitle}},
    booktitleaddon = {CHI '12},
    number = 34,
    series = {\diff{This is the series}},
    pages = {937-946},
    location = {New York, NY, USA},
    publisher = {{ACM}},
}

@inproceedings{paper2011,
    author = {Smith, John},
    date = {2011},
    title = {Another Paper Title},
    booktitle = {Proceedings of the 2012 ACM annual conference on Human Factors in Computing Systems},
    booksubtitle = {\diff{With a Subtitle \& No Booktitleaddon}},
    pages = {937-946},
    location = {New York, NY, USA},
    publisher = {{ACM}},
}

@incollection{paper2014,
    author = {Doe, Jane},
    date = {2014},
    title = {Jane's Paper Title},
    booktitle = {Collected Essays},
    booksubtitle = {\diff{With a Series and a Booktitleaddon}},
    series = {CHI '13},
    booktitleaddon = {\diff{This is the booktitleaddon (which is preceded by the normal comma)}},
    pages = {937-946},
    location = {New York, NY, USA},
    publisher = {{ACM}},
}

\end{filecontents*}

% we need our own bibmacros
\newbibmacro*{INP-btitle+bstitle}{%
  \iffieldundef{booktitle}
    {}
    {\printtext{%
       \printfield{booktitle}%
       \setunit{\addcolon\addspace}%
       \printfield[booktitle]{booksubtitle}}%
     \newcunit
     \setunit{\addspace ---\addspace}%
     \printfield{booktitleaddon}}}

\newbibmacro*{INP-mtitle+mstitle+vol+part+btitle+bstitle}{%
  \usebibmacro{INP-btitle+bstitle}%
  \iffieldundef{booktitle}
  {\setunit{\addperiod\addspace}}% Fix customc?
  {\setunit{\addcomma\addspace}}%
  \iffieldundef{maintitle}
  {}
  {\iffieldundef{volume}
    {\printtext{%
        \printfield{maintitle}%
      \setunit{\addcolon\addspace}%
      \printfield[maintitle]{mainsubtitle}}%
    \newcunit
    \printfield{maintitleaddon}}
  {\printfield{volume}%
    \printfield{part}%
    \setunit{\addspace}
    \bibstring{ofseries}%
    \setunit{\addspace}
    \printtext{%
      \printfield{maintitle}%
      \setunit{\addcolon\addspace}%
      \printfield[maintitle]{mainsubtitle}}%
    \newcunit
    \printfield{maintitleaddon}}}}


\addbibresource{\jobname.bib}

% this puts the booktitleaddon field in 'italics' only for @inproceedings entry types
\DeclareFieldFormat[inproceedings]{booktitleaddon}{\emph{#1}}
% this replaces a portion of the default inproceedings bibdriver with the macrs we defined above.
\xpatchbibmacro{inproceedings}{mtitle+mstitle+vol+part+btitle+bstitle}{INP-mtitle+mstitle+vol+part+btitle+bstitle}

\nocite{*}

\begin{document}

\printbibliography

\end{document}

... Und während ich das hier schrieb, sah ich, dass Moewe eine andere Lösung gepostet hatte. Ein Teil davon könnte hier kombiniert werden, sodass Sie Ihre Bibliographieeinträge nicht neu schreiben müssen. Ich denke jedoch immer noch, dass die Zuordnung zu booktitleaddonstandardmäßig das bessere Feld ist, schon allein deshalb, weil Bücher viel eher einen Untertitel als bibliografische Informationen haben, die in das titleaddonFeld eingegeben werden müssen.

Antwort3

Ich glaube, die Position für den Kurztitel (Ihr seriesFachgebiet) ist die von booksubtitle, daher können wir Folgendes tun:

Wir ändern einfach das seriesFeld für @inproccedingsin booksubtitle. Das funktioniert natürlich nur, wenn kein Eintrag vorhanden ist, der eigentlich einen richtigen seriesEintrag hat, also auch booksubtitleleer sein muss.

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \pertype{inproceedings}
        \step[fieldsource=series, fieldtarget=booksubtitle]
    }
    \map{
      \pertype{proceedings}
        \step[fieldsource=series, fieldtarget=subtitle]
    }
  }
}

MWE

\documentclass{article}
\usepackage[
    authordate,
    backend=biber,
    ]{biblatex-chicago} % biblatex setup
\usepackage{filecontents}

\begin{filecontents*}{\jobname.bib}
@inproceedings{paper2012,
    author = {Smith, John},
date = {2012},
    title = {Paper Title},
    booktitle = {Proceedings of the 2012 ACM annual conference on Human Factors in Computing Systems},
    series = {CHI '12},
    pages = {937-946},
    location = {New York, NY, USA},    
    publisher = {{ACM}},    
}
\end{filecontents*}

\addbibresource{\jobname.bib}
\nocite{*}

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \pertype{inproceedings}
        \step[fieldsource=series, fieldtarget=booksubtitle]
    }
    \map{
      \pertype{proceedings}
        \step[fieldsource=series, fieldtarget=subtitle]
    }
  }
}

\begin{document}
  \printbibliography
\end{document}

Bildbeschreibung hier eingeben

verwandte Informationen