3

When citing a paper I want output to be like this: Ryan [1999] OR (Chen, Liu, and Ryan [2008],Cheng, Dhaliwal, and Neamtiu [2011]). In other words, I need year to be in brackets.

However what I get is: Ryan (1999) OR (Chen, Liu, and Ryan 2008,Cheng, Dhaliwal, and Neamtiu 2011)

I'm specifically referring to in=text citation.

Here is my code:

        \documentclass[12pt]{article}
\renewcommand{\baselinestretch}{2}
\usepackage{setspace}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath}
\usepackage{breqn}
\usepackage{amssymb}
\usepackage{natbib}
%\bibpunct{(}{)}{;}{a}{,}{,}
\setcitestyle{authoryear, open={(},close={)},citesep={,},aysep=}
\usepackage{multirow}
\usepackage{caption}
%\usepackage{hyperref}
\usepackage{lscape}
%\usepackage{graphicx}
%\usepackage{graphics}
%\usepackage{epsfig}
%\usepackage{epstopdf}
\usepackage{pdflscape}
\usepackage{longtable}
\usepackage{float}
\usepackage{colortbl}
\usepackage{booktabs}
\usepackage{bigstrut}
\usepackage[table]{xcolor}
\usepackage{authblk}
\usepackage{lmodern}
\usepackage{fancyhdr}
\usepackage{url}
\usepackage{booktabs}
\usepackage{pdfpages}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{verbatim}
\usepackage{xfrac}
\usetikzlibrary{positioning,shadows,arrows,calc}

\usepackage{bigcenter} % pour centrer les grands tableaux

\usepackage[FIGTOPCAP]{subfigure}
\subfigtopskip = 20pt
\usepackage{array,multirow,makecell}
\setcellgapes{1pt}
\makegapedcells
\setlength{\tabcolsep}{6pt}
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash }b{#1}}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash }b{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash }b{#1}}

%\usepackage{bigcenter}

\interfootnotelinepenalty=10000 % prevents footnotes to be placed on two pages

\hyphenpenalty=5000 % Discourage hyphenation
\tolerance=1000


\usepackage{color}
\begin{document}

\section{Introduction}
  Something is written here \citep*{chen2008characteristics,    
   cheng2011asset}. \citet*{ryan2007financial} says something here.

   \newpage
    \onehalfspacing
      %\begin{singlespace}    

      \bibliographystyle{jf}
       \bibliography{Bib_comp}

     \end{document}         

I played with \setcitestyle but I can only get the opening bracket, I can't get the closing bracket for year. Also, it does not look pretty. I think I need to play with my sty file but I can't figure out what to change.

1

I would suggest that you replace the instructions

\usepackage{natbib}
\setcitestyle{authoryear, open={(},close={)},citesep={,},aysep=}

with

\usepackage[authoryear,square]{natbib}
\setcitestyle{citesep={,},aysep={}}
  • Unfortunately, that's not what I need. Your suggestion changes the parentheses to brackets for all citations. I'm not trying to change that. I'm trying to surround year with brackets. Here is what I get if I follow your suggestion [Chen, Liu, and Ryan 2008, Cheng, Dhaliwal, and Neamtiu 2011]. What I need is (Chen, Liu, and Ryan [2008], Cheng, Dhaliwal, and Neamtiu [2011]). – Seda Jul 16 '15 at 14:00
  • @Seda - It looks like you're mis-using the \citep instruction. Please change the citation command from \citep*{chen2008characteristics,cheng2011asset} to (\citet*{chen2008characteristics,cheng2011asset}). – Mico Jul 16 '15 at 14:40
  • OMG, this is brilliant. I spent an entire day to find a solution and can't believe I missed the obvious. Thank you so much! – Seda Jul 16 '15 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.