2

I am using biblatex with numeric style. I would like to set it so I can have colon ":" after authors only for book and thesis. For all the rest I need a coma.

I was trying to use

\renewcommand{\labelnamepunct}{\addcolon \space} 

which I found at Colon (:) instead of period (.) after author with biblatex, alphabetic, but it sets colon for all types of documents.

Please tell me how to do it.

wavelet
  • 41

2 Answers2

3

I'd suggest you use

\renewcommand*{\labelnamepunct}{%
  \ifboolexpr{test {\ifentrytype{book}} or test {\ifentrytype{thesis}}}
    {\addcolon\space}
    {\addcomma\space}}

Then you can get away without patching the drivers and it is slightly more obvious what it is you are doing.

moewe
  • 175,683
2

Ok. I've come up with an answer based on: biblatex: remove comma after last author only in book

In numeric thesis and book driver it is enough to change nametitledelim so I added:

\xpatchbibdriver{thesis}{\setunit{\printdelim{nametitledelim}}}{\setunit{\addcolon \addspace} }{}{}
\xpatchbibdriver{book}{\setunit{\printdelim{nametitledelim}}}{\setunit{\addcolon \addspace} }{}{}

To have coma for all the rest I used:

\renewcommand{\labelnamepunct}{\addcomma\space}

Now it works as it is supposed to :)

wavelet
  • 41