1

While using biblatex with backend=biber,style=authoryear,sorting=ynt, the entry

@article{Author,
  author = {Author, I.},
  title  = {Title},
  journaltitle = {Journal},
  date   = {1980},
  volume = {23},
  number = {6},
  pages  = {121--123},
}

gets formatted as

Author, I. (1980). ``Title'' In: Journal 23.6, pp.121--123.

How may one remove the colon after "In"?

moewe
  • 175,683
  • You've been a member of this page for over 10 years and you have asked 145 questions. Please start adding a MWE(B) to your questions and also have a look at https://tex.stackexchange.com/help/formatting how to format code blocks in your posts. – samcarter_is_at_topanswers.xyz Oct 02 '23 at 09:45
  • Isn't this a duplicate of Suppress "In:" biblatex? All that's required is \renewbibmacro{in:}{in}, no? – Mico Oct 02 '23 at 11:16
  • Off topic: But isn't it 'better programming syntax' adding the string as bibstring and the space as bibunit? – lukeflo Oct 02 '23 at 11:23
  • @Mico The questions are different, as one sees upon scrutinization. \renewbibmacro{in:}{in} does not resolve the problem, but lukeflo's answer does. So the question ought to be reopened, in my opinion. – Frode Alfson Bjørdal Oct 02 '23 at 13:31
  • 2
    Voting to keep closed. \renewbibmacro{in:}{...} seems to work just fine with your code fragments, so it looks very much like a duplicate. If you disagree, you should show code which does not work. – samcarter_is_at_topanswers.xyz Oct 02 '23 at 13:51
  • I don't think https://tex.stackexchange.com/q/10682/35864 is a good duplicate. That question wants to remove the "in:" altogether. Here we only need to change the separator after the "in", which is much easier, especially since there is a dedicated macro for it. Voted to reopen. I half expected there to be a proper duplicate explaining \intitlepunct, but I couldn't find one just now, so I wrote an answer instead. – moewe Oct 02 '23 at 14:59
  • There is https://tex.stackexchange.com/q/509074/35864, which is the reverse and links to a pretty complex code example. Then there are https://tex.stackexchange.com/q/175730/35864 and https://tex.stackexchange.com/q/172241/35864, which already assume one knows \intitlepunct. https://tex.stackexchange.com/q/668702/35864 comes closest to a duplicate amongst the questions I could find, but it is more complex because it is only about specific entry types. – moewe Oct 02 '23 at 15:03

2 Answers2

3

The punctuation after "in" here is controlled by the macro \intitlepunct whose default definition (from biblatex.def, l. 178) is \addcolon\space to typeset a colon followed by a space.

\intitlepunct is explained as follows in the biblatex documentation (p. 124, §3.12.1 Generic Commands and Hooks, in v3.19)

[\intitlepunct] The separator between the word “in” and the following title in entry types such as @article, @inbook, @incollection, etc. The default definition is a colon plus an interword space (e.g., “Article, in: Journal” or “Title, in: Book”). Note that this is the separator string, not only the punctuation mark. If you don’t want a colon after “in”, \intitlepunct should still insert a space.

To get rid of the colon we can just say

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[backend=biber, style=authoryear]{biblatex}

\renewcommand*{\intitlepunct}{\addspace}

\addbibresource{biblatex-examples.bib}

\begin{document} Lorem \autocite{sigfridsson}

\printbibliography \end{document}

Sigfridsson, Emma and Ulf Ryde (1998). ‘Comparison of methods for deriving atomic charges from the electrostatic potential and moments’. In Journal of Computational Chemistry 19.4, pp. 377–395. doi: 10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P.

moewe
  • 175,683
2

I felt so free to take your code and model a MWE.

You have to redefine the bibmacro in:. I guessed that you might want to add a space instead of the colon, but other punctuations are possible:

\documentclass{article}

\begin{filecontents}[overwrite]{\jobname.bib} @article{Author, author = {Author, I.}, title = {Title}, journaltitle = {Journal}, date = {1980}, volume = {23}, number = {6}, pages = {121--123}, } \end{filecontents}

\usepackage[backend=biber,style=authoryear,sorting=ynt]{biblatex} \addbibresource{\jobname.bib}

\renewbibmacro*{in:}{% \bibstring{in}% \printunit{\addspace}} % <--! here the space is added

\begin{document} Cite something\parencite{Author}

\printbibliography \end{document}

lukeflo
  • 1,555
  • @Lukelo "I felt so free to take your code and model a MWE." That is what I want will happen, when I ask a question without using an MWE. – Frode Alfson Bjørdal Oct 02 '23 at 13:34
  • 3
    Glad that it solves your problem. But in general, I agree with @samcarter_is_at_topanswers.xyz that offering a MWE is the task of the OP. In this case, it only took a few lines to create an example, but I wouldn't have done it if the question had been a little bit more complex. – lukeflo Oct 02 '23 at 13:56