如何更改 biblatex 专利驱动程序(不显示日期)

如何更改 biblatex 专利驱动程序(不显示日期)

我正在使用 biblatex,我想改变类型专利的格式。

我查看了驱动程序,首先我想知道为什么日期在驱动程序中,但没有显示在条目中。我还尝试更改持有人和作者的顺序,但这不知何故不起作用。有没有一本好的手册解释如何调整驱动程序?

附件中您可以找到一个最小工作示例,其中展示了专利目前的呈现方式,并附有一个我希望得到的示例。

谢谢您的帮助。

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Patent{Murata2007,
    author = {Murata, Yutaka and Ogawa, Masao},
    title  = {Sitzkonstruktion für ein Motorrad},
    number = {DE602004003996T2},
    year   = {2007},
    date   = {2007-05-10},
    holder = {{HONDA MOTOR LTD.}},
    type   = {patentde},
}
\end{filecontents}


\documentclass[a4paper,11pt,DIV=calc, titlepage]{scrartcl} 

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[%
  left=4cm,right=2.5cm,top=2.0cm,bottom=2cm,
  includeheadfoot
]{geometry} 

\usepackage[babel, german=quotes]{csquotes}
\usepackage[%
  style=authoryear-ibid,
  natbib=true, 
  maxbibnames=3,
  maxcitenames=2,
  uniquelist=false, 
  uniquename=false, 
  backend=biber
]{biblatex}
\addbibresource{\jobname.bib}

\usepackage[hidelinks]{hyperref}


\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}} %Zitat und Lit in Kapitätlchen

\DefineBibliographyStrings{ngerman}{ % et al instead of "und" with 3 or more authors
   andothers = {{et\,al\adddot}},  }

\renewcommand{\multinamedelim}{\addsemicolon\space} % <=================
%\renewcommand{\finalnamedelim}{\multinamedelim} % <=====================

\DeclareNameAlias{sortname}{family-given} %Sort: Last name, first name
\DeclareNameAlias{default}{family-given}  %Sort: Last name, first name

\DeclareFieldFormat[%
  article,inbook,incollection,inproceedings,patent,thesis,unpublished,
  report, norm, phdthesis, other, misc
]{citetitle}{#1} %Remove quotation marks from title
\DeclareFieldFormat[%
  article,inbook,incollection,inproceedings,patent,thesis,unpublished,
  report, norm, phdthesis, other, misc
]{title}{#1} %Remove quotation marks from title


%Driver for patent:
%------------
\DeclareBibliographyDriver{patent}{%
    \usebibmacro{bibindex}%
    \usebibmacro{begentry}%
    \usebibmacro{author}%
    \setunit{\printdelim{nametitledelim}}\newblock
    \usebibmacro{title}%
    \newunit
    \printlist{language}%
    \newunit\newblock
    \usebibmacro{byauthor}%
    \newunit\newblock
    \printfield{type}%
    \setunit*{\addspace}%
    \printfield{number}%
    \iflistundef{location}
    {}
    {\setunit*{\addspace}%
        \printtext[parens]{%
            \printlist[][-\value{listtotal}]{location}}}%
    \newunit\newblock
    \usebibmacro{byholder}%
    \newunit\newblock
    \printfield{note}%
    \newunit\newblock
    \usebibmacro{date}% The date is here, but it is not displayed
    \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}}
%--------------

\DeclareCiteCommand{\fullcite}
  {\usebibmacro{prenote}}
  {\usedriver
     {\DeclareNameAlias{sortname}{default}}
     {\thefield{entrytype}}}
  {\multicitedelim}
  {\usebibmacro{postnote}\adddot} % <===================================

%Fullcite change: Write out all authors up to 3
\preto\fullcite{\AtNextCite{\defcounter{maxnames}{3}}}


\begin{document}
The patent using \textbackslash fullcite and in the bibliography should look like this:\\

HONDA MOTOR LTD. (2007). Sitzkonstruktion für ein Motorrad. Erfinder: Murata, Yutaka \& Ogawa Masao. Dt. Pat. DE602004003996T2. Date published: 10.05.2007\\


Fullcite:\\
\fullcite{Murata2007}\\\\

\begingroup
\phantomsection\addcontentsline{toc}{section}{Literaturverzeichnis} 
\printbibliography[title={Literaturverzeichnis}]
\endgroup
\end{document}

答案1

您正在使用系列样式authoryear,该系列样式提供了一个名为的样式选项mergedate。此选项在biblatex手动的,这里只是顺便提到。您可以在样式示例中找到更明确的解释51-style-authoryear-ibid。默认设置是,mergedate=compact并且对于 3.7 版,biblatex将产生您得到的输出(输出实际上与早期版本和记录的行为不一致,这将在biblatex3.8中解决,其中mergedate选项经过彻底检查并为新的日期功能做好准备)。mergedate=compact重新定义 bibmacrodate以不打印任何内容,这就是为什么即使明确调用该宏也不会得到日期输出的原因。

您似乎想要等于mergedate=basic(或mergedate=minimum)。因此我将使用这个。

其他更改稍微复杂一些。附加到 a 的“主要名称”@patent通常是authors 而不是holder。因此,要将 用作holder主要名称,我们需要进行大量高级重新定义。我们需要将排序更改为按holder而不是进行排序authorlabelname以考虑holder等。

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Patent{Murata2007,
    author = {Murata, Yutaka and Ogawa, Masao},
    title  = {Sitzkonstruktion für ein Motorrad},
    number = {DE602004003996T2},
    date   = {2007-05-10},
    holder = {{HONDA MOTOR LTD.}},
    type   = {patentde},
}
@Patent{Murata2008,
    author = {Awa, Masao and Murata, Yutaka},
    title  = {Sitzkonstruktion für ein Motorrad},
    number = {DE60wsetesewettew2},
    date   = {2008-05-10},
    holder = {{HONDA MOTOR LTD.}},
    type   = {patentde},
}
\end{filecontents}


\documentclass[a4paper,11pt,DIV=calc, titlepage, bibtotoc]{scrartcl} 

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[%
  left=4cm,right=2.5cm,top=2.0cm,bottom=2cm,
  includeheadfoot
]{geometry} 

\usepackage[babel, german=quotes]{csquotes}
\usepackage[%
  style=authoryear-ibid,
  mergedate=basic,
  natbib=true, 
  maxbibnames=3,
  maxcitenames=2,
  uniquelist=false, 
  uniquename=false, 
  backend=biber
]{biblatex}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\usepackage[hidelinks]{hyperref}


\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}}

\DefineBibliographyStrings{ngerman}{
  andothers = {{et\,al\adddot}},
}

\renewcommand{\multinamedelim}{\addsemicolon\space}
%\renewcommand{\finalnamedelim}{\multinamedelim}

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

\DeclareFieldFormat[%
  article,inbook,incollection,inproceedings,patent,thesis,unpublished,
  report, norm, phdthesis, other, misc
]{citetitle}{#1}
\DeclareFieldFormat[%
  article,inbook,incollection,inproceedings,patent,thesis,unpublished,
  report, norm, phdthesis, other, misc
]{title}{#1}

\DeclareSortingScheme{nyt}{
  \sort{
    \field{presort}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortname}
    \field{holder}
    \field{author}
    \field{editor}
    \field{translator}
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{sortyear}
    \field{year}
  }
  \sort{
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{volume}
    \literal{0}
  }
}


\NewBibliographyString{inventor}
\NewBibliographyString{inventors}
\DefineBibliographyStrings{german}{%
  inventor = {Erfinder},
  inventors = {Erfinder},
}

\newbibmacro*{inventor}{%
  \ifnameundef{author}
    {}
    {\ifnumgreater{\value{author}}{1}
       {\bibstring{inventors}}
        {\bibstring{inventor}}%
     \setunit{\addcolon\space}%
     \printnames{author}}}

\makeatletter
\DeclareLabelname[patent]{%
  \field{holder}
  \field{shortauthor}
  \field{author}
  \field{shorteditor}
  \field{editor}
  \field{translator}
}

\newbibmacro{holder}{%
  \ifnameundef{holder}
    {\global\undef\bbx@lasthash}
    {\usebibmacro{bbx:dashcheck}
       {\bibnamedash}
       {\usebibmacro{bbx:savehash}%
         \printnames{holder}
      \setunit{\printdelim{nameyeardelim}}}}%
  \usebibmacro{date+extrayear}%
}

\DeclareBibliographyDriver{patent}{%
    \usebibmacro{bibindex}%
    \usebibmacro{begentry}%
    \usebibmacro{holder}%
    \setunit{\printdelim{nametitledelim}}\newblock
    \usebibmacro{title}%
    \newunit
    \printlist{language}%
    \newunit\newblock
    \usebibmacro{inventor}%
    \newunit\newblock
    \printfield{type}%
    \setunit*{\addspace}%
    \printfield{number}%
    \iflistundef{location}
    {}
    {\setunit*{\addspace}%
        \printtext[parens]{%
            \printlist[][-\value{listtotal}]{location}}}%
    \newunit\newblock
    \printfield{note}%
    \newunit\newblock
    \usebibmacro{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}}

\DeclareCiteCommand{\fullcite}
  {\usebibmacro{prenote}}
  {\usedriver
     {\defcounter{maxnames}{\blx@maxbibnames}}
     {\thefield{entrytype}}}
  {\multicitedelim}
  {\usebibmacro{postnote}\addperiod}
\makeatother


\begin{document}
\tableofcontents

The patent using \textbackslash fullcite and in the bibliography should look like this:\\

HONDA MOTOR LTD. (2007). Sitzkonstruktion für ein Motorrad. Erfinder: Murata, Yutaka \& Ogawa Masao. Dt. Pat. DE602004003996T2. Date published: 10.05.2007\\


Fullcite:\\
\fullcite{Murata2007}

\cite{sigfridsson,knuth:ct:a}
\cite{Murata2007,Murata2008}

\printbibliography[title={Literaturverzeichnis}]
\end{document}

在此处输入图片描述

相关内容