@inreference 類型的自訂格式

@inreference 類型的自訂格式

對於一篇論文,我需要採用看起來與其他來源(例如專著、集合)完全不同的百科全書參考文獻的引文風格:

<LastName>, <FirstName>, Art. <ArticleTitle>, in: <Encyclopedia>^<Edition> <Volume> (<Year>), <Pages>.

使用 BibLatex 可以嗎?我的文件的其餘部分工作正常,因此解決方案需要僅適用於此條目類型。

在我使用的文檔中style=ext-verbose-inote進行了一些修改:

\documentclass[paper=A4,12pt, parskip=half, pointednumbers]{scrartcl} 
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc} 
\usepackage[ngerman]{babel} 
\usepackage{setspace}
\usepackage{lmodern} 
\usepackage[left=25mm, right=50mm, top=25mm, bottom=20mm]{geometry} 
\setlength{\parindent}{0pt}
\onehalfspacing 

\usepackage[
    backend=biber,
    style=ext-verbose-inote,
    autocite=footnote,
    sortlocale=de_DE,
    innamebeforetitle=true,
    natbib=true,
    url=false, 
    doi=true,
    eprint=false
]{biblatex}
\addbibresource{literatur.bib}

\renewcommand{\footnotesize}{\fontsize{10pt}{12pt}\selectfont}


\renewbibmacro*{pubinstorg+location+date}[1]{%
  \setunit{\addcomma\space}%
  \printlist{location}%
  \iflistundef{#1}
    {\setunit*{\locdatedelim}}
    {\setunit*{\locpubdelim}}%
  \printlist{#1}%
  \setunit*{\pubdatedelim}%
  \usebibmacro{date}%
  \newunit}


\renewbibmacro*{in:}{%
  \setunit{\addcomma\space}%
  \printtext{%
    \bibstring{in}\intitlepunct}}
\DeclareDelimFormat[bib]{nametitledelim}{\addcomma\space}


\DeclareNameAlias{default}{family-given}
\DeclareNameAlias{sortname}{default}
\DeclareDelimFormat[bib]{nametitledelim}{\addcomma\space}
\DeclareDelimFormat{multinamedelim}{\addspace\slash\space}
\DeclareDelimAlias{finalnamedelim}{multinamedelim}


\DeclareDelimFormat{editortypedelim}{\space}

\DeclareFieldFormat[incollection]{title}{#1}
\DeclareFieldFormat[incollection]{booktitle}{#1}

\DeclareFieldFormat[book]{title}{#1}
\DeclareFieldFormat[book]{booktitle}{#1}

\DeclareFieldFormat{edition}{\textsuperscript{#1}} 

  \DefineBibliographyStrings{ngerman} {% 
      andothers = {et al.},               % "et al." statt "u. a." 
      editor = {\mkbibparens{Hg.\adddot}},   % Hrsg. in Klammern 
      editors = {\mkbibparens{Hg.\adddot}}    % Hrsg. in Klammern 
      } 




\begin{document} 

\begin{titlepage}
\begin{spacing}{1}   
   \centering 
    Some Text
  \end{spacing} 
\end{titlepage} 

\newpage 
\tableofcontents
\addtocontents{toc}{\protect\thispagestyle{empty}}
\newpage
\setcounter{page}{1}
% TEXT BEGINNT HIER
\section{Introduction}
\section{Part 1}
\subsection{Section}
\subsection{Section}
\subsection{Section}
Testtext\Footcite[Vgl.][100-105]{kampf}
\subsection{Section}
Testext\Footcite[Vgl.][]{dbwnf}\Footcite[Vgl.][]{nachfolge}\Footcite[Vgl.][100-200]{rgggnade}
\section{Schluss}

\newpage 
\printbibliography[keyword=pl, title={Primärliteratur}]
\printbibliography[keyword=sl, title={Sekundärliteratur}]
\end{document}

參考書目文件:

@inreference{rgggnade,
    Author = {Saarinen, Risto},
    Booktitle = {RGG},
    Date-Modified = {2019-08-04 19:13:13 +0200},
    Edition = {4},
    Keywords = {sl},
    Title = {Gnade/Gnade Gottes. V. Systematisch-theologisch},
    Volume = {3},
    Year = {2000}}

@book{nachfolge,
    Address = {Stuttgart},
    Author = {Liebend{\"o}rfer, Bernd},
    Date-Added = {2019-08-04 17:32:06 +0200},
    Date-Modified = {2019-08-04 17:45:58 +0200},
    Keywords = {sl},
    Title = {Der Nachfolge-Gedanke Dietrich Bonhoeffers und seine Potentiale in der Gegenwart},
    Year = {2016}}

@book{kampf,
    Address = {Osnabr{\"u}ck},
    Author = {Schlegel, Thomas and Schwarze, Andreas},
    Date-Added = {2019-08-04 16:53:38 +0200},
    Date-Modified = {2019-08-04 16:57:04 +0200},
    Keywords = {sl},
    Subtitle = {Studien zu Dietrich Bonhoeffer},
    Title = {Der Kampf um die teure Gnade},
    Year = {2002}}

@incollection{dbwnf,
    Address = {M{\"u}nchen},
    Author = {Dietrich Bonhoeffer},
    Booktitle = {Dietrich Bonnhoeffer Werke (DBW 4)},
    Date-Added = {2019-08-04 14:01:21 +0200},
    Date-Modified = {2019-08-04 17:31:25 +0200},
    Editor = {Kuske, Martin and T{\"o}dt, Ilse},
    Keywords = {pl},
    Title = {Nachfolge},
    Year = {1989}}

答案1

通常@inreference是 的別名@incollection,但所需的輸出與它如此不同,@incollection因此定義一個專門用於產生所需輸出的新書目驅動程式是有意義的。

\DeclareBibliographyDriver{inreference}只是一個副本\DeclareBibliographyDriver{incollection}(ll. 338-369 in v0.7a of ext-standard.bbx)替換incollectioninreference.inreference:parent完成所有繁重的工作。

一個@inreference條目幾乎總是應該有一個@pages字段,所以我添加了一個。我還稍微重新排序了定義,以便我更容易追蹤正在發生的事情並修改了一些小東西。 (例如,sortlocale=de_DE,如果您載入babel文件語言,則不需要ngerman)。

\documentclass[paper=A4,12pt, parskip=half, numbers=enddot]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[ngerman]{babel}
\usepackage{csquotes}

\usepackage[
  backend=biber,
  style=ext-verbose-inote,
  autocite=footnote,
  innamebeforetitle=true,
  natbib=true,
  url=false,
  doi=true,
  eprint=false,
]{biblatex}

\DeclareNameAlias{default}{family-given}
\DeclareNameAlias{sortname}{default}

\DeclareDelimFormat{multinamedelim}{\addspace\slash\space}
\DeclareDelimAlias{finalnamedelim}{multinamedelim}

\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimFormat{editortypedelim}{\addspace}

\DeclareDelimFormat[bib]{nametitledelim}{\addcomma\space}

\DeclareFieldFormat[incollection,inbook,book]{title}{#1}
\DeclareFieldFormat[inreference]{title}{\bibstring{article}~#1}

\DeclareFieldFormat[incollection,inbook]{booktitle}{#1}

\DeclareFieldFormat[reference,inreference]{date}{\mkbibparens{#1}}
\DeclareFieldFormat{superedition}{\textsuperscript{#1}}

\renewbibmacro*{in:}{%
  \setunit{\addcomma\space}%
  \printtext{%
    \bibstring{in}\intitlepunct}}

\renewbibmacro*{pubinstorg+location+date}[1]{%
  \setunit{\addcomma\space}%
  \printlist{location}%
  \iflistundef{#1}
    {\setunit*{\locdatedelim}}
    {\setunit*{\locpubdelim}}%
  \printlist{#1}%
  \setunit*{\pubdatedelim}%
  \usebibmacro{date}%
  \newunit}

\DeclareBibliographyDriver{inreference}{%
  \usebibmacro{introcite:plain}%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \newunit
  \usebibmacro{language}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{in:}%
  \usebibmacro{crosscite}{inreference:parent}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit\newblock
  \usebibmacro{isbn}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \ifboolexpr{togl {bbx:related} and not test {\iffieldxref{related}}}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}

\newbibmacro*{inreference:parent}{%
  \iftoggle{bbx:innamebeforetitle}
    {\usebibmacro{in:editor+others}%
     \setunit{\printdelim{innametitledelim}}\newblock}
    {}%
  \ifboolexpr{
    test {\iffieldundef{booktitle}}
    and
    test {\iffieldundef{booksubtitle}}
  }
    {}
    {\printtext[booktitle]{%
       \printfield[titlecase]{booktitle}%
       \setunit{\subtitlepunct}%
       \printfield[titlecase]{booksubtitle}}%
     \setunit{}%
     \printfield[superedition]{edition}}%
  \printfield{booktitleaddon}%
  \setunit{\addspace}%
  \printfield{volume}%
  \printfield{part}%
  \setunit{\addspace}%
  \printdate}


\NewBibliographyString{article}
\DefineBibliographyStrings{german}{%
  article   = {Art\adddot},
  andothers = {et al\adddot},
  editor    = {Hg\adddot},
  editors   = {Hg\adddot},
}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@inreference{rgggnade,
  author    = {Saarinen, Risto},
  booktitle = {RGG},
  edition   = {4},
  keywords  = {sl},
  title     = {Gnade/Gnade Gottes. V. Systematisch-theologisch},
  volume    = {3},
  year      = {2000},
  pages     = {100-103},
}
@book{nachfolge,
  address  = {Stuttgart},
  author   = {Liebendörfer, Bernd},
  keywords = {sl},
  title    = {Der Nachfolge-Gedanke Dietrich Bonhoeffers
              und seine Potentiale in der Gegenwart},
  year     = {2016},
}
@book{kampf,
  address  = {Osnabrück},
  author   = {Schlegel, Thomas and Schwarze, Andreas},
  keywords = {sl},
  subtitle = {Studien zu Dietrich Bonhoeffer},
  title    = {Der Kampf um die teure Gnade},
  year     = {2002},
}
@incollection{dbwnf,
  address   = {München},
  author    = {Dietrich Bonhoeffer},
  booktitle = {Dietrich Bonnhoeffer Werke (DBW 4)},
  editor    = {Kuske, Martin and Tödt, Ilse},
  keywords  = {pl},
  title     = {Nachfolge},
  year      = {1989},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
Testtext\Autocite[Vgl.][100-105]{kampf}
Testext\Autocite[Vgl.][]{dbwnf}
dolor\Autocite[Vgl.][]{nachfolge}
sit\Autocite[Vgl.][100-200]{rgggnade}

\printbibliography[keyword=pl, title={Primärliteratur}]
\printbibliography[keyword=sl, title={Sekundärliteratur}]
\end{document}

薩裡寧,里斯托,藝術。格納德/格納德·戈特斯。 V. 系統神學,見:RGG 4 Bd。 3 (2000),S.100–103。

相關內容