2

I am using biblatex and I would like to change the format of the type patent.

I had a look at the driver and to begin with I am wondering why the date is in the driver, but is not displayed in an entry. Also I tried to change the order of holder and author, but this is somehow not working. Is there a good manual explaining how to adjust the drivers?

Attached you find a minimal working example with the way a patent is presented right now and with an example I would like to have it.

Thanks for the help.

\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}
2
  • year = {2007}, date = {2007-05-10}, should just be date = {2007-05-10}, If you want to display the date twice here, what do you want to do with other sources? Do you always want the date twice? Do you only want it twice if its precision is finer than a year?
    – moewe
    Nov 8, 2017 at 13:40
  • After the authors just the year shall be named. Later in the following the real pulication date shall be mentioned as a full date. So yes, it should only be done if it is finer than a year, but here the author could have a look whether to enter a optional date or not. Nov 8, 2017 at 14:34

1 Answer 1

6

You are using a style of the authoryear family, that family of styles provides a style option called mergedate. This option is not documented extensively in the biblatex manual, where it is only mentioned in passing. you will find a more explicit explanation in the style example 51-style-authoryear-ibid. The default setting is mergedate=compact and with versions 3.7 of biblatex that yields the output you get (the output is in fact inconsistent with the with earlier versions and the documented behaviour, this will be addressed in biblatex 3.8 where the mergedate option was overhauled and made ready for the new date features). mergedate=compact redefines the bibmacro date to print nothing, this is why even with an explicit call to that macro you get no date output.

You seem to want what amounts to mergedate=basic (or mergedate=minimum). So this is what I'll use.

The other changes are a bit more involved. The 'primary names' attached to a @patent are normally the authors and not the holder. So to use the holder as primary name we need to do a lot of high level redefinitions. We need to change sorting to sort by holder and not author, labelname to consider the holder, etc.

\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}

enter image description here

4
  • Thanks, is there an option to use the date merging rules only for the type "patent"? Nov 9, 2017 at 9:52
  • @user2894356 What do you want other types to look like then? (What if they have a date precision finer than year?)
    – moewe
    Nov 9, 2017 at 9:56
  • Other types besides Patent and acutally also PhdThesis should look like it was without setting the mergedate=compact option. So just the year after the names, but no second date. A finer precision than a year is not needed there. Nov 9, 2017 at 10:33
  • 1
    @user2894356 The thing is that as I explained, the behaviour of 3.7 is a bug. If you have precision finer than year, you should actually get the date with finer precision in the brackets after the name. This will be the case in versions other than 3.7. mergedate=compact is the default, so there is no 'without setting mergedate=compact'. Of course if you .bib file never has a date finer than year, that is no problem, but if you have say an @article where you also gave the month of publication this becomes relevant.
    – moewe
    Nov 9, 2017 at 10:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .