I am new to the LateX world and currently I am writing my master thesis. The university requires the citation to look like that e.g. (Udell,2006) but in mine document the comma is missing- (Udell 2006). I tried to change to natbib to author-year but nothing happened. Can you please give me some advice? Thank you!
Asked
Active
Viewed 2,897 times
2 Answers
3
For the biblatex case, this question was already answered here (by Marco Daniel). Here is his answer :
The space between the name and the year is controlled by the macro
\nameyeardelim. So you have to redefine it:\renewcommand*{\nameyeardelim}{\addcomma\space}Here a small example:
\documentclass[]{article} \usepackage[style=authoryear]{biblatex} \addbibresource{biblatex-examples.bib} \renewcommand*{\nameyeardelim}{\addcomma\space} \begin{document} \cite{companion} \end{document}
Mico
- 506,678
1
Do you use bibtex (natbib) or biber (biblatex) ?
If you use bibtex and the agsm bibliography style, you need to add either \usepackage[comma]{natbib} or \usepackage[semicolon]{natbib}in your preamble, as is shown in the following code:
\documentclass[a4paper,11pt,twoside]{book}
\usepackage[semicolon]{natbib} %package for add comme or semicolon
\usepackage[utf8]{inputenc}
\begin{document}
\citep{huffman2017web}
\citet{huffman2017web}
\bibliographystyle{agsm} %bibliography apa harvard
\bibliography{library}
\end{document}
The .bib file is:
@article{huffman2017web,
title = {Web 2.0: beyond the concept practical ways to implement RSS, podcasts, and Wikis},
author = {Huffman, Karen},
journal= {Education Libraries},
volume = {29},
number = {1},
pages = {12--19},
year={2017}
}
The output is:


\citet,\citep, or some other command. Please also tell how thenatbibpackage is loaded and whether your document features any\setcitestyleand/or\bibpunctdirectives. – Mico Mar 05 '18 at 13:48