0

I used to change the citation style in my documents using the bloc of commands:

\usepackage[square,authoryear]{natbib}
\setcitestyle{notesep={:},aysep={}}
\usepackage{chapterbib}

Here is my MWE:

\documentclass[12pt,a4paper,oneside,final,onecolumn,thmsb,titlepage]{book}
\usepackage[square,authoryear]{natbib}
\setcitestyle{notesep={:},aysep={}}
\usepackage{chapterbib}
\begin{document}
\citet[22]{Draa2019} states that ...
\bibliographystyle{apalike}
{\renewcommand{\baselinestretch}{1.5}
\bibliography{thebib2}}
\end{document}

the bib file contant is the following

@article{Draa2019, 
title={{The Impact of Translation on Reading Comprehension for EST Learners - A Case Study of Computer Science Students at Constantine 2 University}}, 
volume={51},
journal={{Revue Sciences Humaines}},
author={Draa, A.}, 
pages={135 --150 },
year={2019},}

I wanted to replace the comma separating the author from the year with the space, and to replace the comma of the note (page number) with a colon.

But, this is no longer working, maybe due to an update of bibtex/natbib versions.

Any help please?

Thank you very much.

7
  • Could you try and see if \setcitestyle{authoryear} helps?
    – Natasha
    Sep 8, 2021 at 17:17
  • 1
    Welcome to TeX.SE. Please clarify what you mean by "\setcitestyle no longer working". For sure, if I compile your test document, citet[22]{Draa2019} produces "Draa [2019:22]", while \citep{Draa2019} produces "[Draa 2019]". Both are exactly what one would expect from \setcitestyle{notesep={:},aysep={}}.
    – Mico
    Sep 8, 2021 at 17:32
  • 1
    @AmerDraa - The command \setcitestyle is provided by the natbib package. As long as natbib is loaded properly, \setcitestyle should work too.
    – Mico
    Sep 8, 2021 at 18:26
  • 1
    @AmerDraa - I use TeXLive2021 as well (actually, MacTeX2021) and natbib 2010/09/13 8.31b. The natbib package has remained unchanged for the past 11 years. Not sure what you mean by "an older version of natbib".
    – Mico
    Sep 8, 2021 at 19:04
  • 1
    @Mico - I just compared the two .sty files; that installed on my 2021 texlive folder is an old one: [2003/06/06 7.1 (PWD)], while that which solved the problem is a newer one: [2010/09/13 8.31b (PWD, AO)]. The folowing commands, among others, are missing from the former file: % Defining the citation mode and punctual (citation style) 98 % \setcitestyle{<comma-separated list of keywords, same 99 % as the package options>} 100 % Example: \setcitestyle{square,semicolon} 101 % Alternatively:.
    – Amer Draa
    Sep 8, 2021 at 21:44

1 Answer 1

0

After checking,

The package installed in texlive 2021 does not cause bugs; it seems that the 'natbib.sty' file has been previously replaced by an older version. It is likely I did when trying to solve other issues or doing other adjustments.

Sorry for the inconvenience and thank you to everyone.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .