2

I am unable to make use of the \citep{} function on LaTeX, using Texmaker. \cite{} works just fine, however.

\documentclass[11pt]{article}
\usepackage{graphicx}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{authblk}
\usepackage{amssymb}
\usepackage{apacite}
\usepackage{float}
\usepackage{amsmath}
\usepackage{setspace}
\usepackage{fullpage}
\usepackage{graphicx, subfigure}
\usepackage{setspace}
\graphicspath{ {./Images/} }
\usepackage{url}
\usepackage{rotating}
\usepackage{adjustbox}
\usepackage{lmodern,microtype}
%\usepackage{titlesec,titling}
\usepackage{enumitem,booktabs}
\usepackage{pstricks}
\usepackage{amsmath,amsthm,amssymb,amsfonts}
\usepackage{dsfont,mathrsfs,ushort}
\usepackage[utf8]{inputenc}
\usepackage{tabularx} 
\usepackage[toc,page]{appendix}
\usepackage{xcolor}
\usepackage{sectsty}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric,arrows}


\tikzstyle{process}=[rectangle,minimum width=3cm,minimum height=1cm, text centered, draw=black, fill=orange!30]
\tikzstyle{decision}=[diamond,minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=green!30]

\tikzstyle{arrow}=[thick,->,>=stealth]
\newcommand*{\myplus}{\ensuremath{\boldsymbol{\pmb{+}}}}


\chapterfont{\color{blue}}  % sets 
\sectionfont{\color{blue}}  % sets colour of sections
\subsectionfont{\color{red}}  % sets colour of sections


\begin{document}

\chapter{citations}

\begin{enumerate}
  \Citation 1 \cite{a1}.
  \Citation2 \citep{a2}.
\end{enumerate}

\bibliographystyle{apacite}
\bibliography{References}


\end{document}

Any help on this is much appreciated!

5
  • Did you try with biblatex-apa and \parencite?
    – Bernard
    Mar 30, 2019 at 13:31
  • Sorry could you please elaborate. Is biblatex-apa the bibliography style?
    – ChinG
    Mar 30, 2019 at 13:33
  • When you use biblatex, it defines an apa style.
    – Bernard
    Mar 30, 2019 at 13:34
  • I tried it with biblatex-apa, and it does not work.
    – ChinG
    Mar 30, 2019 at 13:41
  • Yes, but biblatex is easier to customise. Could you post a small complete code, and explain what's not working and what you're trying to obtain?
    – Bernard
    Mar 30, 2019 at 13:50

1 Answer 1

3

The apacite package knows three modes of operation with respect to citation commands.

  1. Its default behaviour is that of the option apaciteclassic, which defines a set of citation commands useful for APA style. The main commands are \cite, \citeA and \citeNP.
  2. The package option natbibapa loads natbib and thus enables use of natbib's citation commands \citet, \citep etc.
  3. The option nocitation defines no new citation commands and is intended to be used by users who want to define their own commands or who want to try to use the apacite package with a third-party citation package.

See p. 7 of the apacite documentation.

In your MWE you load apacite without options as \usepackage{apacite} and hence you get the default behaviour of apaciteclassic. That means that natbib's \citet and \citep are not available, but you can use \cite, \citeA and \citeNP.

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{apacite}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{appleby,
  author  = {Humphrey Appleby},
  title   = {On the Importance of the Civil Service},
  year    = {1980},
}
\end{filecontents}

\begin{document}
\cite{appleby}

\citeA{appleby}

\citeNP{appleby}

\bibliographystyle{apacite}
\bibliography{\jobname}
\end{document}

(Appleby, 1980)//Appleby (1980)//Appleby, 1980

If you want to be able to use \citep and \citet, you need to load the package with the natbibapa option.

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[natbibapa]{apacite}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{appleby,
  author  = {Humphrey Appleby},
  title   = {On the Importance of the Civil Service},
  year    = {1980},
}
\end{filecontents}

\begin{document}
\citet{appleby}

\citep{appleby}

\bibliographystyle{apacite}
\bibliography{\jobname}
\end{document}

Appleby (1980)//(Appleby, 1980)


If you are willing to switch to biblatex, you can use biblatex-apa and make use of biblatex's set of citation commands as suggested by Bernard in the comments.

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[style=apa, backend=biber]{biblatex}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{appleby,
  author  = {Humphrey Appleby},
  title   = {On the Importance of the Civil Service},
  year    = {1980},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\cite{appleby}

\parencite{appleby}

\textcite{appleby}

\printbibliography
\end{document}

Note that this requires Biber instead of BibTeX, see Biblatex with Biber: Configuring my editor to avoid undefined citations.

You must log in to answer this question.

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