0

It took me nearly this entire day to figure out natbib might not be the way to go for my masters thesis. So now I finally switched to Biblatex. However there are still some things I can't figure out. I produce my bibfile with citavi.

  • I got the editor displayed as 'Hrsg. von {editor}' and want to change that to 'Hrsg.: {editor}' for @book and @booklets
  • Is there a way of printing URLDATESs for internet references (@booklets)? desired output would be : {author} ({year}). {title}. Hrsg.: {editor}. {url}. last accessed: {urldate}

this is my code:

\documentclass{scrreprt}

\usepackage[style=authoryear, 
            natbib=true, 
            backend=biber, 
            maxcitenames=2,
            maxbibnames=9,
            uniquelist=false]{biblatex}
\addbibresource{Literatur_Citavi.bib} 
\usepackage{csquotes}
\usepackage[ngerman]{babel}     % German
\setlength\bibitemsep{.5\baselineskip}

% et al instead u.a.
\DefineBibliographyStrings{ngerman}{
   andothers = {{et\,al\adddot}},            
}

% Lastname, F.
\DeclareNameFormat{sortname}{%
   \usebibmacro{name:family-given}
   {\namepartfamily}
   {\namepartgiveni}
   {\namepartprefix}
   {\namepartsuffix}%
}%


% Comma between Journal and Volume
\renewbibmacro*{journal+issuetitle}{%
   \usebibmacro{journal}%
   \setunit*{\addcomma\addspace}%<--da
   \iffieldundef{series}
   {}
   {\newunit
      \printfield{series}%
      \setunit{\addspace}}%
   \usebibmacro{volume+number+eid}%
   \setunit{\addspace}%
   \usebibmacro{issue+date}%
   \setunit{\addcolon\space}%
   \usebibmacro{issue}%
   \newunit}




\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@booklet{copeland.,
 abstract = {Artificial intelligence, the ability of a computer or computer-controlled robot to perform tasks commonly associated with intelligent beings. The term is frequently applied to the project of developing systems with the ability to reason, discover meaning, generalize, or learn from past experiences.},
 author = {Copeland, B. J.},
 editor = {{Encyclopaedia Britannia}, Inc.},
 year = {2019},
 title = {Artificial Intelligence},
 howpublished = {\url{https://www.britannica.com/technology/artificial-intelligence}},
 urldate = {26.07.2019}
}


\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}


\printbibliography

\end{document}

enter image description here How do I change the display of the editor field for @books and @booklets in general into 'Hrsg.: {editor}'?

  • The arXiv is not the editor (Herausgeber) of a paper it at all it might be seen as a publisher (Verlag?), but usually it is not seen as that either. @book is also not the right entry type here, since we are talking about a paper of nine pages. For arXiv papers that have not been published in a journal yet, @online would be a more appropriate entry type. Good examples for arXiv papers in biblatex can be found at tex.stackexchange.com/q/49757/35864 – moewe Aug 28 '19 at 17:07
  • Yeah I know its not actually a book, that was only some workaround to have the year for such papers included. – Quastiat Aug 28 '19 at 17:29
  • Thanks for the catch I removed Arxiv from the editor field. Still how can I adjust the display of that editor field for other books? The issue of 'Hrsg.' is the same for them – Quastiat Aug 28 '19 at 17:48
  • Can you please add a relevant example entry for that issue and explain the desired output with the example. – moewe Aug 28 '19 at 18:12
  • I changed the example and tried to explain the desired output a bit better. – Quastiat Aug 29 '19 at 11:24
1

To change ‘Hrsg. von’ to ‘Hrsg.:’ you need to redefine the byeditor string.

The urldate is not appearing because you have used the wrong format. Date fields in biblatex need to be in the format yyyy-mm-dd. The output format is taken care of by localisation settings. The format of the urldate defaults to:

\DeclareFieldFormat{urldate}{\mkbibparens{\bibstring{urlseen}\space#1}}

So you could redefine this and/or redefine the urlseen string to match what you want.

And you probably want editor = {{Encyclopaedia Britannia, Inc.}} instead of editor = {{Encyclopaedia Britannia}, Inc.} to avoid ‘Inc.‘ being treated as a family name.

MWE

\documentclass{scrreprt}

\usepackage[style=authoryear, 
            natbib=true, 
            backend=biber, 
            maxcitenames=2,
            maxbibnames=9,
            uniquelist=false]{biblatex}
\usepackage{csquotes}
\usepackage[ngerman]{babel}     % German
\setlength\bibitemsep{.5\baselineskip}

% et al instead u.a.
\DefineBibliographyStrings{ngerman}{%
   andothers = {et\,al\adddot},
   byeditor  = {Hrsg\adddot\addcolon},
}

% Lastname, F.
\DeclareNameFormat{sortname}{%
   \usebibmacro{name:family-given}
   {\namepartfamily}
   {\namepartgiveni}
   {\namepartprefix}
   {\namepartsuffix}%
}%


% Comma between Journal and Volume
\renewbibmacro*{journal+issuetitle}{%
   \usebibmacro{journal}%
   \setunit*{\addcomma\addspace}%<--da
   \iffieldundef{series}
   {}
   {\newunit
      \printfield{series}%
      \setunit{\addspace}}%
   \usebibmacro{volume+number+eid}%
   \setunit{\addspace}%
   \usebibmacro{issue+date}%
   \setunit{\addcolon\space}%
   \usebibmacro{issue}%
   \newunit}




\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@booklet{copeland.,
 abstract = {Artificial intelligence, the ability of a computer or computer-controlled robot to perform tasks commonly associated with intelligent beings. The term is frequently applied to the project of developing systems with the ability to reason, discover meaning, generalize, or learn from past experiences.},
 author = {Copeland, B. J.},
 editor = {{Encyclopaedia Britannia, Inc.}},
 year = {2019},
 title = {Artificial Intelligence},
 howpublished = {\url{https://www.britannica.com/technology/artificial-intelligence}},
 urldate = {2019-07-26}
}


\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
\nocite{*}

\printbibliography

\end{document}

MWE output

For what it's worth, I'd set your bib entries up like this:

@online{copeland2019,
  author = {Copeland, B. J.},
  title = {Artificial intelligence},
  eprinttype = {Encyclopædia Britannica},
  date = {2019-05-09},
  eprint = {https://www.britannica.com/technology/artificial-intelligence},
  urldate = {2019-08-29}
}
@online{aunkofer2019,
  author = {Aunkofer, Benjamin},
  title = {Machine Learning vs Deep Learning},
  subtitle = {Wo liegt der Unterschied?},
  eprinttype = {Data Science Blog},
  date = {2018-05-14},
  eprint = {https://data-science-blog.com/blog/2018/05/14/machine-learning-vs-deep-learning-wo-liegt-der-unterschied/},
  urldate = {2019-08-29}
}
| improve this answer | |
  • Thank you, you were right the date format was wrong because I was exporting my bibfile from citavi via Bibtex. So now that works and also the 'Hrsg.:' adjustment! Online sources are now labeled online instead booklet. However now the url is missing, format in bibfile is still howpublished = {\url{data-science-blog.com/blog/2018/05/14/…}}, where I tried all combinations of url/howpubliched and including/excluding \url How can I include the url back in? – Quastiat Aug 29 '19 at 15:11
  • Sorry, I don't really understand what you mean. These should all use the online entry type really. You should use the url field directly (there is no howpublished field in online entry types) and adjust the url field format to suit. The default is: \DeclareFieldFormat{url}{\mkbibacro{URL}\addcolon\space\url{#1}}. Also, 'Encyclopedia Britannica, Inc.' isn't really the editor. I'd put it in organization or note or eprinttype and create a custom format for this kind of eprint. – David Purton Aug 30 '19 at 1:02
  • Thank you your set up of the bib entries finally solved my issue. The solution was to export my url as 'eprint' and not 'url' and also to excluse \usepackage{url}. So thanks a lot that really helped, now I can finally concentrate on writing my thesis :) – Quastiat Aug 30 '19 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.