When I make a reference at the beginning of a sentence I have one citation style, but when I make a reference at the end I have another.
The class I'm using has the \cite{} command containing only the latter style.
How can I change the citation style for some specific citation?
Example:
The citation style for \cite{kahneman1979prospect} is:
[Kahneman and Tversky 1979]
But I can only use this style at the end of a sentence.
If I start the sentence citing something such as:
"According to..."
My citation style should be:
Kahneman and Tversky (1979)
Is it possible to create this new style (preferably a new command in the preamble)?
I've looked some other classes and they have it implemented in a new command such as\citeN{}:
\def\citeN{\def\@citeseppen{-1000}%
\def\@cite##1##2{##1\if@tempswa , ##2]\else{]}\fi}%
\def\citeauthoryear##1##2##3{##2 [##3}\@citedata}
I used the above code in my current class and preamble. Unfortunately it is still not working, but hopefully gives a starting point.
EDIT:
This is a minimal example with correct and incorrect style for each case.
main.tex
\documentclass{article}
\usepackage{natbib}
\bibliographystyle{abbrvnat}
\begin{document}
\section{Citation Style I}
\begin{itemize}
\item According to \cite{kahneman1979prospect} \dots is incorrect.
\item According to \citet{kahneman1979prospect} \dots is incorrect.
\item According to Kahneman and Tversky (1979) \dots is correct.
\end{itemize}
\section{Citation Style II}
\begin{itemize}
\item This is correct \dots \citep{kahneman1979prospect}.
\item This is incorrect \dots (Kahneman and Tversky, 1979).
\end{itemize}
\bibliography{references}
\end{document}
references.bib
@article{kahneman1979prospect,
title={Prospect theory: An analysis of decision under risk},
author={Kahneman, Daniel and Tversky, Amos},
journal={Econometrica: Journal of the econometric society},
pages={263--291},
year={1979},
publisher={JSTOR}
}
Output file


biblatex– Ruben Sep 12 '17 at 22:32usebibpackage by Enrico Gregorio. – Ruben Sep 12 '17 at 22:36\bibpunct{[}{]}{,}{a}{}{;}. This makes\citep{}style correct: [Kahneman and Tversky 1979], but makes\cite{}output Kahneman and Tversky [1979]. I just need the year inside parentheses. Is it possible? Thanks! – fabda01 Sep 12 '17 at 22:58\citet{}? Worked fine for me until I switched to Biber/Biblatex. If not, please provide a minimal working example which we can compile to reproduce the problem. That is, code for a small document and one or two bib entries, obviously, since you'll need to cite something. – cfr Sep 13 '17 at 02:17biblatexas tagged? Since your MWE does not usebiblatexI'm not sure if you really want that. Withbiblatexyou'd probably use\parenciteand\textcite, but you would have to change the bracketing. – moewe Sep 13 '17 at 12:07biblatexbecause the previous comments mentioned it. How do I change the bracketing for\parencite? I tried it and it seems promising, but it messed a little my References section because I have to use a certain bibliography style. Is it possible to use my own bibliography style (.bstfile) along withbiblatex? Thanks! – fabda01 Sep 13 '17 at 12:35natbibsolution would be to use\bibpunct{(}{)}{,}{a}{}{;}and then make your own version of\citetdefined as[\citealt{...}]. – Alan Munn Sep 13 '17 at 13:04.bstwith Biblatex, but it is generally easier to customise than BibTeX as you use regular LaTeX to style things. – cfr Sep 13 '17 at 13:50[,]in\bibpunctand(,)for\citet? – cfr Sep 13 '17 at 13:52.bststyles together withbiblatex. Maybe there is abiblatexstyle that comes close to the.bstyou use, but if you need to stick to the.bstyou can't usebiblatex. – moewe Sep 13 '17 at 14:29natbibsolution is perfect! In fact, it worked exactly as I was expecting, since I could keep the.bstI'm using. The solution to my problem was as simple as\citealt{kahneman1979prospect}]along with\bibpunct{(}{)}{,}{a}{}{;}. Thanks! – fabda01 Sep 13 '17 at 15:17