1

I would like to remove the duplicate of square bracketed citation in my bibliography list and start with just the name and year. I am using the cite package, and the \bibliographystyle{apalike}, with Citavi reference editor. I've seen this question a lot and the common answer is to use natbib package instead. This is good idea however then I need to change all of the \cite in the document to \citep in order to have it in parentheses. And I am finished my entire (90 page) document (I know I should have fixed this at the beginning).. Is there a way to change them within the cite package? Or else is there an easy way to switch all of the \cite to \citep?

I should also note that I am a very beginner with Latex.

enter image description here

6
  • Welcome, please add \usepackage{apacite} or \usepackage{natbib} to your preamble. If this doesn't give you good results, please provide a minimal working example (<- Link) that let's us reproduce your issue and gives the perfect test case to provide a fitting solution.
    – Johannes_B
    Commented Apr 30, 2017 at 13:45
  • 1
    For a quick and dirty way of letting cite react as citep use: \let\cite\citep
    – Johannes_B
    Commented Apr 30, 2017 at 13:52
  • Hi Johannes, That could be a good option! Since I am short of time before a deadline. Just so I understand correctly where should i include that command? In the preamble when i'm setting the new commands?
    – Alicia226
    Commented Apr 30, 2017 at 13:54
  • 1
    @Johannes_B -- For a not-so-dirty way of making \cite act like \citep, load the package letltxmacro and issue the instruction \LetLtxMacro\cite\citep. (Using \let to reset a LateX macro that takes optional arguments (as \citep does) is an accident waiting to happen...)
    – Mico
    Commented Apr 30, 2017 at 15:32
  • 1
    @Mico Yes, completely right. I tend to forget that, as i don't use \let. Wait, i just did in another answer. Ooops :-(
    – Johannes_B
    Commented Apr 30, 2017 at 15:36

1 Answer 1

1

The apalike bibliography style can only produce authoryear-style citation call-outs, whereas the cite package is meant to be used exclusively with bibliography styles that produce numeric-style citation call-outs. Thus, if you need to use the apalike bibliography style, do not use the cite package.

You should load either the apalike or the natbib citation management package. The former is older, but has the "virtue" (such as it is) of making \cite generate "parenthetic" citation call-outs automatically. The natbib package is much newer and far more versatile than the apalike package. Its "downside", for your purposes at least, is that \cite behaves like \citet, i.e., it produces "text-style" rather than "parenthetic" citation callouts. I can think of two "fixes":

  • Do a global search-and-replace of all instances of \cite{ in your document, replacing them with \citep{. (I strongly recommend this "fix".)

  • Load the letltxmacro package and issue the instruction

    \LetLtxMacro\cite\citep
    

    in the preamble. (The \citep macro takes optional arguments; as such, using \let to assign it to \cite may produce weird and unpleasant errors.)

An MWE that uses the natbib package:

enter image description here

\RequirePackage{filecontents}
\begin{filecontents}{mybib.bib}
@misc{test, author = "Anne Author", title = "Thoughts", year = 3001}
\end{filecontents}

\documentclass{article}
\usepackage{natbib,letltxmacro}
\LetLtxMacro\cite\citep % make '\cite' act like `\citep`
\bibliographystyle{apalike}

\begin{document}
\cite[see][p.~45]{test}
\bibliography{mybib}
\end{document}

You must log in to answer this question.

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