I want to remove the comma between the "school" field and the date (year) in an @thesis bibliography entry:
Here is my minimal example code:
\documentclass{minimal}
\usepackage{ngerman}
\usepackage[backend = biber, style = numeric]{biblatex}
%%%%%%%% https://tex.stackexchange.com/a/492917
\newtoggle{bbx:datemissing}
\renewbibmacro*{date}{\toggletrue{bbx:datemissing}%}
\renewbibmacro{volume+number+eid}{%
\printfield{volume}%
\setunit{\addcomma\space}%
\printfield{eid}}
\renewbibmacro*{issue+date}{%
\toggletrue{bbx:datemissing}%
\iffieldundef{issue}{}{
\printtext[parens]{%
\printfield{issue}}}%
\newunit}
\newbibmacro*{date:print}{%
\togglefalse{bbx:datemissing}%
\printdate}
\renewbibmacro*{chapter+pages}{%
\printfield{chapter}%
\setunit{\bibpagespunct}%
\printfield{pages}%
\newunit
\usebibmacro{date:print}%
\newunit}
\renewbibmacro*{note+pages}{%
\printfield{note}%
\setunit{\bibpagespunct}%
\printfield{pages}%
\newunit
\usebibmacro{date:print}%
\newunit}
%%%%%%%%
%%% This is what I came up with
\renewbibmacro{institution+location+date}{%
\printlist{location}%
\iflistundef{institution}{%
\setunit*{\space}%
}{%
\setunit*{\addcolon\space}%
}%
\printlist{institution}%
\setunit*{\space}%
\usebibmacro{date}%
\newunit%
}
\usepackage{filecontents}
\begin{filecontents*}{lit.bib}
@thesis {mythesis,
author = {Me, I.},
school = {University},
title = {Sometitle},
type = {Phd thesis},
year = {123}
}
\end{filecontents*}
\addbibresource{lit.bib}
\begin{document}
\printbibliography
\end{document}
\nocite{*}
I already tried \renewbibmacro{institution+location+date}{...}
, but that did not work. I am quite new to BibLaTeX.
My thought was that the numeric
style uses the entry types from standard
, which is from where I copied the macro and removed all commas. However, that clearly did not work. How can I remove this comma?
\usebibmacro{date}
to\usebibmacro{date:print}
. That is done in a very unsophisticated fashion and for all entry types alike. The date is now printed after thepages
field. Since the punctuation before a field is always the last punctuation command the style issued before the field is printed, it is not enough to modifyinstitution+location+date
as the punctuation commands that are relevant come in later. ...