bibliographydriver - 错误更正

bibliographydriver - 错误更正

我已经编写了一个书目驱动程序来输出书目中的@jurisdiction。@jurisdiction 已在 jura2 中定义。只缺少驱动程序。

我的解决方法存在机构和第一个 \textendash 不显示的问题。

IS:结论自 1952 年 3 月 27 日起 - IV R 356/51 U,BStBl。 III 1952,S. 122.应该:BFH-Urteil 从 1952 年 3 月 27 日开始 - iV R 356/51 U,BStBl。 III 1952,第 122 页。

\documentclass[paper=a4, 12pt, parskip=half]{scrreprt}

\begin{filecontents}{literatur.bib}
  @jurisdiction{IV35651U,
gericht = {BFH},
dokumententyp = {Urteil},
entscheidungsdatum = {1952-03-27},
aktenzeichen = {IV R 356/51 U},
fundstelle = {BStBl. III 1952, S. 122},
}
\end{filecontents}

\usepackage{polyglossia}
\setdefaultlanguage[spelling=new,babelshorthands=true]{german}
\usepackage{luacode}
%\setromanfont{Arial}
%\setsansfont{Arial}
\usepackage[backend=biber,style=jura2,sorting=nty]{biblatex}  
\addbibresource{literatur.bib}


% ----------------------------------------------------------------------------
% Driver; @jurisdiction;biblatex backend=biber style=jura2
% ----------------------------------------------------------------------------
\DeclareBibliographyDriver{jurisdiction}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \printfield{institution}%
  \setunit{\textendash}%
  \printfield{usera}%
  \setunit{\addspace}%
  \printtext{vom}%
  \setunit{\addspace}%
  \usebibmacro{date}%
  \setunit{\addspace\textendash\addspace}%
   \printfield{userb}%
   \setunit{\addcomma\addspace}%
   \printfield{userd}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}} 
  
  \begin{document}
 
 Referenz\footcite[][]{IV35651U} 
 
  \printbibliography %[nottype=jurisdiction]
  \end {document}

从 jura 2 的 .bbx 文件中提取

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Änderungen betr. 'jurisdiction'
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\DeclareStyleSourcemap{
  \maps[datatype=bibtex]{
  \map[overwrite=false]{
    \pertype{jurisdiction}
    \step[fieldsource=gericht,
          fieldtarget=institution]
    \step[fieldsource=dokumententyp,
          fieldtarget=usera]
    \step[fieldsource=entscheidungsdatum,
          fieldtarget=date]
    \step[fieldsource=aktenzeichen,
          fieldtarget=userb]
    \step[fieldsource=datenbank,
          fieldtarget=userc]
    \step[fieldsource=fundstelle,
          fieldtarget=userd]
    \step[fieldsource=ecli,
          fieldtarget=usere]
    \step[fieldsource=entscheidungsname,
          fieldtarget=userf]
  }}}

答案1

你需要

  \printlist{institution}%

而不是\printfield{institution}%在驱动程序中。您需要将\print<type>命令与<type>相关字段的匹配。institution是一个文字列表,因此\printlist这里是必需的。

我无法使用您的代码进行测试,因为我没有 Arial,这是一种我无法访问的商业字体。但是,使用默认字体,可以看到此修改解决了该问题。

书目条目中的机构

\documentclass[paper=a4, 12pt, parskip=half]{scrreprt}

\begin{filecontents}{literatur.bib}
  @jurisdiction{IV35651U,
gericht = {BFH},
dokumententyp = {Urteil},
entscheidungsdatum = {1952-03-27},
aktenzeichen = {IV R 356/51 U},
fundstelle = {BStBl. III 1952, S. 122},
}
\end{filecontents}

\usepackage{polyglossia}
\setdefaultlanguage[spelling=new,babelshorthands=true]{german}
\usepackage{luacode}
\usepackage[backend=biber,style=jura2,sorting=nty]{biblatex}  
\addbibresource{literatur.bib}
\DeclareBibliographyDriver{jurisdiction}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \printlist{institution}%
  \setunit{\textendash}%
  \printfield{usera}%
  \setunit{\addspace}%
  \printtext{vom}%
  \setunit{\addspace}%
  \usebibmacro{date}%
  \setunit{\addspace\textendash\addspace}%
  \printfield{userb}%
  \setunit{\addcomma\addspace}%
  \printfield{userd}%
  \iftoggle{bbx:related}
  {\usebibmacro{related:init}%
    \usebibmacro{related}}
  {}%
  \usebibmacro{finentry}} 

\begin{document}
  
Referenz\footcite[][]{IV35651U} 

\printbibliography 
\end{document}

相关内容