0

My journal articles are not appearing correctly in my bibliography. For example, this journal article:

@article{biernacki1981snowball,
  title={Snowball sampling: Problems and techniques of chain referral sampling},
  author={Biernacki, Patrick and Waldorf, Dan},
  journal={Sociological methods \& research},
  volume={10},
  number={2},
  pages={141--163},
  year={1981},
  publisher={SAGE Publications Sage CA: Los Angeles, CA}
}

appears as

Biernacki, P. and Waldorf, D. (1981). “Snowball sampling: Problems and techniques
    of chain referral sampling”. In: Sociological methods & research
    10.2, pp. 141–163.

How do I change '. In:' to ',' ? I.e get:

Biernacki, P. and Waldorf, D. (1981). “Snowball sampling: Problems and techniques
    of chain referral sampling”, Sociological methods & research
    10.2, pp. 141–163.

The journal should be in italics in which mind he did ask is again actually the network too much earlier.

The thing is too big for a MWE but I use:

\usepackage{bibentry} 
\usepackage[style=authoryear-ibid,firstinits,backend=bibtex,sorting=nyt,natbib=true, maxbibnames=99,maxcitenames=2, uniquelist=false, uniquename=false]{biblatex}
\DeclareNameAlias{sortname}{family-given}
\addbibresource{example.bib}
schoon
  • 133
  • 1
    \renewcommand*{\newunitpunct}{\addcomma\space} if you are OK with changing a few other full stops into comma as well. Or \renewbibmacro*{in:}{\setunit{\addcomma\space}\printtext{\bibstring{in}\intitlepunct}} if only that one full stop can be changed. – moewe Jun 25 '18 at 06:35
  • 3
    Please note that providing an MWE makes our lives a lot easier. For starters I could have tested my suggestions in the comment above properly. And there are some questions that simply can not be properly answered without an MWE. So even if your document is huge and your preamble quite large, please take the time to reduce them to a minimal working example that you can post here. An MWE makes sure that we are all talking about the same thing, it lets us test our solutions and it shows that you value the time of the people trying to help you by not letting them replicate what you already have. – moewe Jun 25 '18 at 06:38
  • Ta moewe. Sorry abou lack of MWE PHD due in imminently. Will try if I have time. Does your solution change all of '. in:' in all references? – schoon Jun 25 '18 at 09:33
  • I'm not too au fait with latex! – schoon Jun 25 '18 at 09:33
  • 1
    What do you mean by The journal should be in italics in which mind he did ask is again actually the network too much earlier.? – moewe Jun 25 '18 at 14:02

1 Answers1

2

To get rid of the "in:" for good and make it only a comma for all entry types, go with

\renewbibmacro*{in:}{%
  \setunit{\addcomma\space}}

If you only want the ". In:" to disappear for @articles you'll want

\renewbibmacro*{in:}{%
  \ifentrytype{article}
    {\setunit{\addcomma\space}}
    {\printtext{%
       \bibstring{in}\intitlepunct}}}

where there will be a full stop before the "in:" for all other entry types

or

\renewbibmacro*{in:}{%
  \setunit{\addcomma\space}%
  \ifentrytype{article}
    {}
    {\printtext{%
       \bibstring{in}\intitlepunct}}}

where all types get a comma at roundabout the position of the "in:" (or where it would be if it were present).


Old answer kept in case it might be useful for someone else.

\renewbibmacro*{in:}{%
  \setunit{\addcomma\space}%
  \printtext{%
    \bibstring{in}\intitlepunct}}

will replace all full stops/periods before the "In:" with a comma resulting in ", in:" being output instead. This changes all "in:"s - @article as well as @incollection, @inbook and @inproceedings

enter image description here


With

\renewcommand*{\newunitpunct}{\addcomma\space}

the punctuation before the "in:" as well as a lot of other punctuation can be changed from a full stop to a comma. \newunitpunct is the generic go-to punctuation command in case no special punctuation is defined.

enter image description here

moewe
  • 175,683
  • Sorry, i guess I was not clear I do not want 'in:' or its fullstop. I just want a comma. – schoon Jun 25 '18 at 13:52
  • @schoon For all types or only @article? – moewe Jun 25 '18 at 13:53
  • Only for article. – schoon Jun 26 '18 at 08:13
  • @schoon See the edit at the top of the answer. Please test the different solutions and pick the one that works for your actual document and surroundings. – moewe Jun 26 '18 at 08:17
  • Fantastic, works great. Thankyou so much!! My articles are also missing a comma after the journal title. Can you point me in the direction of how I might do something similar to add this comma? – schoon Jun 27 '18 at 08:26
  • @schoon You will probably have to redefine the bibmacro journal+issuetitle. If you need help with that I suggest you ask a new question with a proper MWE/MWEB and an exact description of what you need. – moewe Jun 27 '18 at 08:28
  • how do I remove In:' for article and incollection? I have tried copying the above for both and also \ifentrytype{article,incollection} but neither work. – schoon Jul 03 '18 at 13:45
  • Actually I want incollection to be ', in' instead of 'In:'. – schoon Jul 03 '18 at 13:53
  • @schoon The third suggestion should do that. – moewe Jul 03 '18 at 14:20
  • That gets rid of it completely, how do I change it to 'in' only spaces for punctuation? – schoon Jul 03 '18 at 14:51
  • @schoon I can assure you that the third suggestion above \renewbibmacro*{in:}{% \setunit{\addcomma\space}% \ifentrytype{article} {} {\printtext{% \bibstring{in}\intitlepunct}}} only removes the "in" for @articles and prints ", in:" for all other entry types for which it makes sense (amongst them @incollection). You can change the ":" by redefining \intitlepunct. If all that does not help please ask a new question with an MWE of what you are doing, a picture of the output and a description of the desired output. – moewe Jul 03 '18 at 14:56
  • OK but I want just ' in ' for the others not ', in:'. Sorry I can't figure this stuff myself. – schoon Jul 03 '18 at 15:16
  • @schoon Please ask a new question for that. It's becoming way to confusing here and it doesn't help anyone if we change the desiderata all the time. – moewe Jul 03 '18 at 15:17