使用 biblatex 更改参考书目中的“系列”+“数字”条目

使用 biblatex 更改参考书目中的“系列”+“数字”条目

按照我正在撰写的文章的风格指南,我需要确保书籍系列的标题后面跟着逗号、该系列中的编号和句号。

例如

Sander,M.(2011 年)。市场营销管理 — 市场、市场研究和市场营销(2. 完整翻译版本)。 UTB,编号8251.康斯坦茨、慕尼黑:UVK/Lucius。

Saxer,U.(1999 年)。媒体科学的研究立场。在 J.-F.莱昂哈德 / H.-W.路德维希 (Ludwig) / D. 施瓦泽 (D. Schwarze) / E. 斯特拉斯纳 (E. Straßner) (Hrsg.)媒体科学——媒体与传播形式开发手册(第 1 室、第 3 室、第 1-14 节)。语言和通信科学手册,Nr. 15. 柏林、纽约:W. de Gruyter。

Schenk,M.(1989 年)。引入媒体经济。在 M. Schenk / J. Donnerstag (Hrsg.) 中,媒体经济学 — 信息和媒体体系经济学导论:读者(第 3-11 页)。英国媒体写作网 Nr. 6. 慕尼黑:R. Fischer。

但我目前得到的是:

Sander,M.(2011 年)。市场营销管理 — 市场、市场研究和市场营销(2. 完整翻译版本)。超高速。康斯坦茨、慕尼黑:UVK/Lucius。

Saxer,U.(1999 年)。媒体科学的研究立场。在 J.-F.莱昂哈德 / H.-W.路德维希 (Ludwig) / D. 施瓦泽 (D. Schwarze) / E. 斯特拉斯纳 (E. Straßner) (Hrsg.)。 A. Burkhardt / H. Stegen / HE Wiegand (打字员),媒体科学——媒体与传播形式开发手册(第 1 栋,第 15 号,第 3 栋,第 1-14 节)。语言和通信科学手册。柏林、纽约:W.de Gruyter。

Schenk,M.(1989 年)。引入媒体经济。在 M. Schenk / J. Donnerstag (Hrsg.) 中,媒体经济学 — 信息和媒体体系经济学导论:读者(第 6 号,第 3-11 页)。四、媒体写作。慕尼黑:R. Fischer。

我可以在 .tex 文件的序言中包含哪些命令来生成这样的参考书目?

梅威瑟:

\documentclass[a4paper,12pt,toc=listof]{scrartcl} 
\linespread{1.25}
\usepackage[T1]{fontenc} 
\usepackage[utf8]{inputenc}
\usepackage{setspace}
\usepackage[english,ngerman]{babel}
\usepackage[babel,german=quotes,german=guillemets]{csquotes}
\usepackage[left=3.5cm, right=2cm, bottom=3.5cm]{geometry}
\usepackage[
style=apa,
sorting=nyt,
sortcites=true,
maxbibnames=99,
maxcitenames=2,
backend=biber,
bibliography=totoc,
isbn=false,
doi=true]{biblatex}
\DeclareLanguageMapping{german}{german-apa}
\DeclareFieldFormat{apacase}{#1}
\DefineBibliographyStrings{ngerman}{ 
   andothers = {{et\,al\adddot}},             
}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{Sander_2011,
  location = {{Konstanz, M{\"u}nchen}},
  edition = {2., komplett {\"u}berarb. Aufl.},
  title = {Marketing-{{Management}} \textemdash{} {{M{\"a}rkte}}, {{Marktforschung}} und {{Marktbearbeitung}}},
  number = {8251},
  series = {UTB},
  publisher = {{UVK/Lucius}},
  author = {Sander, Matthias},
  date = {2011}
}
@incollection{Saxer_1999,
  location = {{Berlin, New York}},
  title = {Der {{Forschungsgegenstand}} der {{Medienwissenschaft}}},
  volume = {1},
  volumes = {3},
  number = {15},
  booktitle = {Medienwissenschaft \textemdash{} {{Ein Handbuch}} zur {{Entwicklung}} der {{Medien}} und {{Kommunikationsformen}}},
  series = {Handb{\"u}cher zur Sprach- und Kommunikationswissenschaft},
  publisher = {{W. de Gruyter}},
  author = {Saxer, Ulrich},
  editor = {Leonhard, Joachim-Felix and Ludwig, Hans-Werner and Schwarze, Dietrich and Stra\ss{}ner, Erich},
  editorb = {Burkhardt, Armin and Steger, Hugo and Wiegand, Herbert Ernst},
  editorbtype = {redactor},
  date = {1999},
  pages = {1--14}
}
@incollection{Schenk_1989,
  location = {{M{\"u}nchen}},
  title = {Einf{\"u}hrung in die {{Medien{\"o}konomie}}},
  timestamp = {2016-08-11T10:23:03Z},
  number = {6},
  booktitle = {Medien{\"o}konomie \textemdash{} {{Einf{\"u}hrung}} in die {{{\"O}konomie}} der {{Informations}}- und {{Mediensysteme}}: ein {{Reader}}},
  series = {Reihe Medien-Skripten},
  publisher = {{R. Fischer}},
  author = {Schenk, Michael},
  editor = {Schenk, Michael and Donnerstag, Joachim},
  date = {1989},
  pages = {3--11}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\renewcommand*{\nameyeardelim}{\addspace}

\renewcommand*{\multinamedelim}[0]{\,/\,} 
\renewcommand*{\finalnamedelim}[0]{\,/\,}
\AtBeginBibliography{%
  \renewcommand*{\multinamedelim}[0]{\,/\,} 
  \renewcommand*{\finalnamedelim}[0]{\,/\,}
}

\setcounter{biburlnumpenalty}{100}  % allow breaks at numbers

\DeclareFieldFormat{number}{\bibstring{number}~#1}

% name sort always last, first
\AtBeginBibliography{%
    \DeclareNameAlias{editor}{last-first}
}

\begin{document}

That's important stuff (\cites{Sander_2011}{Saxer_1999}{Schenk_1989}).

\printbibliography

\end{document}

答案1

(在我们开始之前如果你修改biblatex-apa——你可能会失去APA合规性警告。由于biblatex-apa尝试严格遵循 APA 格式,如果您修改格式,则可能会失去 APA 合规性。此外,修改格式可能相当麻烦,因为biblatex-apa要竭尽全力遵循 APA 格式。)

显然,在某些类型中, inbiblatex-apa number被视为volumeand 的补充part。该字段在几个辅助宏中打印,因此我们需要首先将其删除

\renewbibmacro*{addinfo}{%
  \ifthenelse{\iffieldundef{edition}\AND%
              \iffieldundef{chapter}\AND%
              \iffieldundef{volumes}\AND%
              \iffieldundef{pages}\AND%
              \(\iffieldundef{volume}\OR\boolean{bbx:volseen}\)}
  {}
  {\printtext{\bibopenparen}%
   \printfield{edition}%
   \setunit*{\addcomma\addspace}%
   \printfield{chapter}%
   \setunit*{\addcomma\addspace}%
   \notbool{bbx:volseen}%
     {\iffieldundef{volume}{}{\global\booltrue{bbx:volseen}}%
      \printfield{volume}%
      \iffieldundef{part}{}{\printfield{part}}}{}%
   \setunit*{\addcomma\addspace}%
   \printfield{volumes}%
   \setunit*{\addcomma\addspace}%
   \printfield{pages}%
   \setunit{}%
   \printtext{\bibcloseparen}%
   \newunit}}

\renewbibmacro*{maintitle+title}{%
  \iffieldsequal{maintitle}{title}
    {\clearfield{maintitle}%
     \clearfield{mainsubtitle}%
     \clearfield{maintitleaddon}}
    {\iffieldundef{maintitle}
      {}
      {\usebibmacro{maintitle}%
       \newunit\newblock
       \iffieldundef{volume}
         {}
         {\setunit{\global\booltrue{bbx:volseen}}%
          \printfield{volume}%
          \printfield{part}%
          \setunit{\adddot\space}}}}%
  \usebibmacro{title}%
  \newunit}

\renewbibmacro*{maintitle+booktitle}{%
  \ifthenelse{\iffieldundef{maintitle}\AND\iffieldundef{booktitle}}
    {}
    {\usebibmacro{in}%
     \iffieldundef{maintitle}
      {}
      {\usebibmacro{maintitle}%
       \newunit\newblock
       \iffieldundef{volume}
         {}
         {\setunit{\addspace\global\booltrue{bbx:volseen}}%
          \printfield{volume}%
          \printfield{part}%
          \setunit{\adddot\addspace}}}%
    \usebibmacro{booktitle}}}

series然后我们可以为和定义自己的宏number(或多或少来自的宏standard.bbx

\renewbibmacro*{series+number}{%
  \printfield{series}%
  \setunit{\addcomma\space}%
  \printfield{number}%
  \newunit}

然后我们需要修改驱动程序,使用包最容易xpatch。我们删除显式的\printfield{nzumber}\printfield{series},后者被替换为对我们的新宏的调用。

\usepackage{xpatch}

\xpatchbibdriver{book}
  {\printfield{series}}
  {\usebibmacro{series+number}}
  {}{}
\xpatchbibdriver{inbook}
  {\printfield{series}}
  {\usebibmacro{series+number}}
  {}{}
\xpatchbibdriver{incollection}
  {\printfield{series}}
  {\usebibmacro{series+number}}
  {}{}

\xpatchbibdriver{collection}
  {\printfield{number}}
  {}
  {}{}
\xpatchbibdriver{collection}
  {\printfield{series}}
  {\usebibmacro{series+number}}
  {}{}

数学家协会

\documentclass[a4paper,12pt,toc=listof]{scrartcl} 
\usepackage[T1]{fontenc} 
\usepackage[utf8]{inputenc}
\usepackage[english,ngerman]{babel}
\usepackage[babel,german=quotes,german=guillemets]{csquotes}
\usepackage[
style=apa,
sorting=nyt,
sortcites=true,
maxbibnames=99,
maxcitenames=2,
backend=biber,
bibliography=totoc,
isbn=false,
doi=true]{biblatex}
\DeclareLanguageMapping{ngerman}{ngerman-apa}
\DeclareFieldFormat{apacase}{#1}
\DefineBibliographyStrings{ngerman}{%
   andothers = {{et\,al\adddot}},             
}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{Sander_2011,
  location   = {Konstanz and M{\"u}nchen},
  edition    = {2., komplett {\"u}berarb. Aufl.},
  title      = {Marketing-Management \textemdash{} M{\"a}rkte, Marktforschung und Marktbearbeitung},
  number     = {8251},
  series     = {UTB},
  publisher  = {{UVK/Lucius}},
  author     = {Sander, Matthias},
  date       = {2011},
}
@incollection{Saxer_1999,
  location    = {Berlin and New York},
  title       = {Der Forschungsgegenstand der Medienwissenschaft},
  volume      = {1},
  volumes     = {3},
  number      = {15},
  booktitle   = {Medienwissenschaft \textemdash{} Ein Handbuch zur Entwicklung der Medien und Kommunikationsformen},
  series      = {Handb{\"u}cher zur Sprach- und Kommunikationswissenschaft},
  publisher   = {W. de Gruyter},
  author      = {Saxer, Ulrich},
  editor      = {Leonhard, Joachim-Felix and Ludwig, Hans-Werner and Schwarze, Dietrich and Stra\ss{}ner, Erich},
  editorb     = {Burkhardt, Armin and Steger, Hugo and Wiegand, Herbert Ernst},
  editorbtype = {redactor},
  date        = {1999},
  pages       = {1--14},
}
@incollection{Schenk_1989,
  location  = {M{\"u}nchen},
  title     = {Einf{\"u}hrung in die Medien{\"o}konomie},
  number    = {6},
  booktitle = {Medien{\"o}konomie \textemdash{} Einf{\"u}hrung in die {\"O}konomie der Informations- und Mediensysteme: ein Reader},
  series    = {Reihe Medien-Skripten},
  publisher = {R. Fischer},
  author    = {Schenk, Michael},
  editor    = {Schenk, Michael and Donnerstag, Joachim},
  date      = {1989},
  pages     = {3--11},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\renewcommand*{\nameyeardelim}{\addspace}

\renewcommand*{\multinamedelim}{\,/\,} 
\renewcommand*{\finalnamedelim}{\,/\,}
\AtBeginBibliography{%
  \renewcommand*{\multinamedelim}{\,/\,}%
  \renewcommand*{\finalnamedelim}{\,/\,}%
}

\setcounter{biburlnumpenalty}{100}  % allow breaks at numbers

\DeclareFieldFormat{number}{\bibstring{number}~#1}

% name sort always last, first
\AtBeginBibliography{%
    \DeclareNameAlias{editor}{family-given}%
}

\renewbibmacro*{addinfo}{%
  \ifthenelse{\iffieldundef{edition}\AND%
              \iffieldundef{chapter}\AND%
              \iffieldundef{volumes}\AND%
              \iffieldundef{pages}\AND%
              \(\iffieldundef{volume}\OR\boolean{bbx:volseen}\)}
  {}
  {\printtext{\bibopenparen}%
   \printfield{edition}%
   \setunit*{\addcomma\addspace}%
   \printfield{chapter}%
   \setunit*{\addcomma\addspace}%
   \notbool{bbx:volseen}%
     {\iffieldundef{volume}{}{\global\booltrue{bbx:volseen}}%
      \printfield{volume}%
      \iffieldundef{part}{}{\printfield{part}}}{}%
   \setunit*{\addcomma\addspace}%
   \printfield{volumes}%
   \setunit*{\addcomma\addspace}%
   \printfield{pages}%
   \setunit{}%
   \printtext{\bibcloseparen}%
   \newunit}}

\renewbibmacro*{maintitle+title}{%
  \iffieldsequal{maintitle}{title}
    {\clearfield{maintitle}%
     \clearfield{mainsubtitle}%
     \clearfield{maintitleaddon}}
    {\iffieldundef{maintitle}
      {}
      {\usebibmacro{maintitle}%
       \newunit\newblock
       \iffieldundef{volume}
         {}
         {\setunit{\global\booltrue{bbx:volseen}}%
          \printfield{volume}%
          \printfield{part}%
          \setunit{\adddot\space}}}}%
  \usebibmacro{title}%
  \newunit}

\renewbibmacro*{maintitle+booktitle}{%
  \ifthenelse{\iffieldundef{maintitle}\AND\iffieldundef{booktitle}}
    {}
    {\usebibmacro{in}%
     \iffieldundef{maintitle}
      {}
      {\usebibmacro{maintitle}%
       \newunit\newblock
       \iffieldundef{volume}
         {}
         {\setunit{\addspace\global\booltrue{bbx:volseen}}%
          \printfield{volume}%
          \printfield{part}%
          \setunit{\adddot\addspace}}}%
    \usebibmacro{booktitle}}}

\renewbibmacro*{series+number}{%
  \printfield{series}%
  \setunit{\addcomma\space}%
  \printfield{number}%
  \newunit}

\usepackage{xpatch}

\xpatchbibdriver{book}
  {\printfield{series}}
  {\usebibmacro{series+number}}
  {}{}
\xpatchbibdriver{inbook}
  {\printfield{series}}
  {\usebibmacro{series+number}}
  {}{}
\xpatchbibdriver{incollection}
  {\printfield{series}}
  {\usebibmacro{series+number}}
  {}{}

\xpatchbibdriver{collection}
  {\printfield{number}}
  {}
  {}{}
\xpatchbibdriver{collection}
  {\printfield{series}}
  {\usebibmacro{series+number}}
  {}{}

\begin{document}
That's important stuff \parencites{Sander_2011}{Saxer_1999}{Schenk_1989}.

\printbibliography
\end{document}

给出

Sander,M.(2011 年)。市场营销管理——市场、市场研究和市场营销职责(2.,完整概述)。 UTB,编号8251.康斯坦茨:UVK/Lucius。

Saxer,U.(1999 年)。媒体科学的研究立场。在 J.-F.莱昂哈德/H.-W.路德维希/D.黑泽/E.斯特拉斯纳(Hrsg.)。 A. 伯克哈特/H. Steger/HE Wiegand(打字员),媒体科学——媒体和通信形式发展手册(Bd. 1、Bde. 3、S. 1-14)。语言和通信科学手册,Nr. 15.柏林:W.de Gruyter。

Schenk,M.(1989 年)。引入媒体经济。在 M. Schenk/J.星期四(Hrsg.),媒体经济学——信息和媒体系统经济学的介绍:读本(第 3-11 页)。英国媒体写作网 Nr. 6. 慕尼黑:R. Fischer。


redactor可以按如下方式删除s

\AtEveryBibitem{
  \iffieldequalstr{editortype}{redactor}
    {\global\clearname{editor}\typeout{delete editor (type: redactor) in \thefield{citekey}}}{}%
  \iffieldequalstr{editoratype}{redactor}
    {\global\clearname{editora}\typeout{delete editora (type: redactor) in \thefield{citekey}}}{}%
  \iffieldequalstr{editorbtype}{redactor}
    {\global\clearname{editorb}\typeout{delete editorb (type: redactor) in \thefield{citekey}}}{}%
  \iffieldequalstr{editorctype}{redactor}
    {\global\clearname{editorc}\typeout{delete editorc (type: redactor) in \thefield{citekey}}}{}%
}

相关内容