2

Citations aren't rendering properly with brackets around the year for $\cite{}\ and $\citep{}$ is throwing Undefined control sequence errors. How do I get this to work and format correctly?

\documentclass{paper} 
\usepackage[style=authoryear]{biblatex}
\addbibresource{bibliog.bib}

\begin{document}

This should be Giorgi (2002): \cite{Giorgi:WsBBLFIL}\\
This should be (Giorgi 2002): \citep{Giorgi:WsBBLFIL}\\
This should be (Giorgi 2002, Blodgett et al. 2008): \citep{Giorgi:WsBBLFIL,Blodgett:2008jg}\\
This is a book: \citep{Glesne:r1QiTFGB}

\printbibliography    
\end{document}

bibliog.bib

@article{Giorgi:WsBBLFIL,
author = {Giorgi, Amedeo},
title = {{The Question of Validity in Qualitative Research}},
journal = {Journal of Phenomenological Psychology},
year = {2002},
volume = {33},
number = {1},
pages = {1--18},
month = mar
}

@article{Blodgett:2008jg,
author = {Blodgett, Jeffrey G and Bakir, Aysen and Rose, Gregory M},
title = {{A test of the validity of Hofstede's cultural framework}},
journal = {Journal of Consumer Marketing},
year = {2008},
volume = {25},
number = {6},
pages = {339--349},
month = sep
}

@book{Glesne:r1QiTFGB,
author = {Glesne, Corrine and Peshkin, Alan},
title = {{Becoming qualitative researchers : an introduction}},
publisher = {White Plains, N.Y. : Longman},
year = {1992}
}
3
  • 2
    \citep is from natbib, not BibLaTeX. You can use BibLaTeX's interface to natbib passing the option natbib=true to BibLaTeX. Jun 26, 2018 at 23:02
  • That fixes that little problem. Thanks! Now to format the citations correctly
    – Carl
    Jun 26, 2018 at 23:06
  • 3
    Use \textcite for the first citation, as you're using it in the flow of text. You need to redefine the punctuation marks if you want no commas between author and year and you want commas rather than semicolons between sources. You shouldn't put the publisher's location in the publisher field. Use location or address instead.
    – cfr
    Jun 26, 2018 at 23:22

2 Answers 2

2

Apparently this fits your requirements:

enter image description here

From the biblatex manual: "These (the \cite and \Cite commands) are the bare citation commands. They print the citation without any additions such as parentheses", so you should probably use \citet.

To change the name-year delimiter, you have to redefine \nameyeardelim:

\DeclareDelimFormat{nameyeardelim}{\addspace}

and to change the multi-author separator, redefine \multicitedelim:

\renewcommand*{\multicitedelim}{\addcomma\space}

and it should work.

\RequirePackage{filecontents}
\begin{filecontents}{bibliog.bib}
@article{Giorgi:WsBBLFIL,
author = {Giorgi, Amedeo},
title = {{The Question of Validity in Qualitative Research}},
journal = {Journal of Phenomenological Psychology},
year = {2002},
volume = {33},
number = {1},
pages = {1--18},
month = mar
}

@article{Blodgett:2008jg,
author = {Blodgett, Jeffrey G and Bakir, Aysen and Rose, Gregory M},
title = {{A test of the validity of Hofstede's cultural framework}},
journal = {Journal of Consumer Marketing},
year = {2008},
volume = {25},
number = {6},
pages = {339--349},
month = sep
}

@book{Glesne:r1QiTFGB,
author = {Glesne, Corrine and Peshkin, Alan},
title = {{Becoming qualitative researchers : an introduction}},
publisher = {White Plains, N.Y. : Longman},
year = {1992}
}
\end{filecontents}
\documentclass{paper} 
\usepackage[style=authoryear,natbib=true,citestyle=authoryear,maxcitenames=2]{biblatex}
\addbibresource{bibliog.bib}

\DeclareDelimFormat{nameyeardelim}{\addspace}
\renewcommand*{\multicitedelim}{\addcomma\space}

\begin{document}

This should be Giorgi (2002): \citet{Giorgi:WsBBLFIL}\\
This should be (Giorgi 2002): \citep{Giorgi:WsBBLFIL}\\
This should be (Giorgi 2002, Blodgett et al. 2008): \citep{Giorgi:WsBBLFIL,Blodgett:2008jg}\\
This is a book: \citep{Glesne:r1QiTFGB}

\printbibliography
\end{document}
5
  • 1
    \nameyeardelim is a context-sensitive delimiter, so it would be slightly nicer to use \DeclareDelimFormat{nameyeardelim}{\addspace}.
    – moewe
    Jun 27, 2018 at 5:48
  • 1
    You'll also find that the natbib compatibility mode is the reason why this is necessary in the first place: The default styles have \DeclareDelimFormat{nameyeardelim}{\addspace}, but the natbib compatibility mode sets \DeclareDelimFormat{nameyeardelim}{\addcomma\space}.
    – moewe
    Jun 27, 2018 at 6:00
  • @moewe Thanks for the tips :) Quick question: what do you mean by context-sensitive? Also, would you recommend creating a copy of the natbib commands (with \let\citet\textcite, for example) instead of loading the compatibility mode to avoid this change? Jun 27, 2018 at 12:07
  • 1
    Context-sensitive delimiters are explained in §3.11.2 Context-sensitive Delimiters, they came about because of github.com/plk/biblatex/issues/373. Essentially they allow nameyeardelim to change depending on the context in which it is called (in \cite or \textcite or \printbibliography...). Re the natbib compatibility mode: It is fine to use the compatibility mode if one wants to use the old names (I prefer biblatex's names), but one needs to be aware of the changes that entails. I don't think that \letting around all the macros is necessarily better.
    – moewe
    Jun 27, 2018 at 12:14
  • @moewe Okay, I'll take a look at that. Thank you very much :) Jun 27, 2018 at 12:22
3

As suggested in comments, natbib=true enables use of natbib citation commands. This code also demonstrates how to use Biblatex's own commands to achieve the same results.

\textcite and \autocite are style-dependent. So if you need something other than authoryear, the format will adapt accordingly. \parencite is less logical, more appearance markup.

I've also adjusted the punctuation and number of names used in citation labels. In addition, I've corrected the .bib file. Although the problems here did not cause any issues you asked about, they did cause some inconsistencies and would cause problems in other cases.

\begin{filecontents}{\jobname1.bib}
@article{Giorgi:WsBBLFIL,
author = {Giorgi, Amedeo},
title = {The Question of Validity in Qualitative Research},
journal = {Journal of Phenomenological Psychology},
year = {2002},
volume = {33},
number = {1},
pages = {1--18},
month = mar
}

@article{Blodgett:2008jg,
author = {Blodgett, Jeffrey G and Bakir, Aysen and Rose, Gregory M},
title = {A Test of the Validity of {Hofstede}'s Cultural Framework},
journal = {Journal of Consumer Marketing},
year = {2008},
volume = {25},
number = {6},
pages = {339--349},
month = sep
}

@book{Glesne:r1QiTFGB,
author = {Glesne, Corrine and Peshkin, Alan},
title = {Becoming Qualitative Researchers: An Introduction},
address = {White Plains, N.Y.},
publisher= {Longman},
year = {1992}
}
\end{filecontents}

\documentclass{paper} 
\usepackage[style=authoryear,natbib=true,maxcitenames=1]{biblatex}
\addbibresource{\jobname1.bib}
\renewcommand*{\multicitedelim}{\addcomma\space}% corrected in light of moewe's comment
\DeclareDelimFormat{nameyeardelim}{\space}
\begin{document}

This should be Giorgi (2002): \textcite{Giorgi:WsBBLFIL}\\
This should be (Giorgi 2002): \autocite{Giorgi:WsBBLFIL}, \parencite{Giorgi:WsBBLFIL} or, with the \verb|natbib=true| option, \citep{Giorgi:WsBBLFIL}\\
This should be (Giorgi 2002, Blodgett et al. 2008): \citep{Giorgi:WsBBLFIL,Blodgett:2008jg}\\
This is a book: \citep{Glesne:r1QiTFGB}

\printbibliography    
\end{document}

output: citations and bibliography

3
  • 1
    multicitedelim is not a context-sensitive delimiter. While \DeclareDelimFormat still works in that case, it might lead people to think they can use the optional argument to control the behaviour for each context, which they can't. So I would probably prefer \renewcommand*{\multicitedelim}{\addcomma\space}
    – moewe
    Jun 27, 2018 at 5:52
  • @moewe Thanks. I didn't realise that there were some which weren't context-sensitive. (I wish they'd use a different suffix if it should be treated differently.)
    – cfr
    Jun 28, 2018 at 0:26
  • Yes, you have to look in the manual (or the source code) to find out. The whole thing had to be backwards compatible and in that case the simplest solution was to re-use the old name.
    – moewe
    Jun 28, 2018 at 5:46

You must log in to answer this question.

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