Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have been using the \bibliographystyle{elsarticle-harv} style for a long time, since I newly swtiched to biblatex and it is only for natbib, so how to modify the default biblatex style or specifically the APA style, so that making the citation style same as elsarticle-harv.

The elsarticle-harv author-year citation style:

\cite{LathamVOF:2012} -----> Latham (2012)
\citep{LathamDEM:2012} -----> (Latham,2012) 

\cite{LathamM:2010} -----> Latham et al.(2010)   % multi-author
\cite{LathamMeer:2011} -----> Latham and Meer (2011)     % 2 authors

\cite{LathamVOF:2012,LathamDEM:2012} -----> Latham (2012a, b)

The new setting of biblatex is given:

\usepackage{csquotes}
\usepackage[
    style=apa,
    backend=biber,
    refsection=chapter,
    natbib=true  ]  {biblatex} 
\DeclareLanguageMapping{british}{british-apa}

However, the APA sytle was like:

\cite{LathamVOF:2012} -----> Latham, 2012
\citep{LathamDEM:2012} -----> (Latham,2012)   % <--- same 

\cite{LathamM:2010} -----> Latham, A & B, 2010  % <--- too many cited authors!
\cite{LathamMeer:2011} -----> Latham & Meer, 2011     % & instead of and!

\cite{LathamVOF:2012,LathamDEM:2012} -----> Latham, 2012a,2012b 

So how to make the year in () when using \cite{} and lessen the authors (if>3) as FirstAuthor et al.

Edit1:

using \LetLtxMacro{\cite}{\citet} makes year in (), however, the setting maxcitenames=2 seems not working. Besides, how to change the & to and?

MWE codes:

\documentclass[12pt, a4paper]{book} 

\usepackage{hyperref}
\usepackage{color}
\usepackage[ ]{libertine}
\usepackage[ T1 ]{fontenc}


\definecolor{DarkBlue}{RGB}{0,51,153}
    \hypersetup{
    colorlinks,%
    linktocpage =true,
    citecolor=DarkBlue,%
    filecolor=red,%
    linkcolor=DarkBlue,%
    urlcolor=green,
} % colorlinks setting


\usepackage[UKenglish]{babel}
\usepackage{csquotes}
\usepackage[
    style=apa,
    backend=biber,
    refsection=chapter,
    maxcitenames=2,        
    natbib=true  ]  {biblatex} 
\DeclareLanguageMapping{british}{british-apa}
\LetLtxMacro{\cite}{\citet}  % year in ()

\addbibresource{reffile.bib}
\begin{document}
\frontmatter
\tableofcontents
\mainmatter

\chapter{Introduction}

\citep[e.g.][]{Tsuji:2008, TsujiDEM:2008}   

\cite{TsujiDEM2D:2008, TsujiDEM:2008} 

\cite{Shirgaonkar:2009}. 

\citep{Sorensen:2006}
\printbibliography[heading=subbibintoc]
\end{document}

and reffile.bib

@ARTICLE{Tsuji:2008,
  author  = {Tsuji, T. and Yabumoto, K. and Tanaka, T. and Peter, B.},
  title   = {Spontaneous structures in three-dimensional bubbling gas-fluidized bed by paralled {DEM-CFD} coupling simulation},
  journal = {  Powder Technology },
  year    = { 2008  },
  volume  = { 184  },
  pages   = {  132-140 },
  number  = {5 }
  }

@ARTICLE{TsujiDEM:2008,
  author  = {Tsuji, T. },
  title   = {Spontaneous structures in three-dimensional bubbling},
  journal = {  Powder Technology },
  year    = { 2008  },
  volume  = { 11  },
  pages   = {  11-17 },
 number  = {2 }
  }

@ARTICLE{TsujiDEM2D:2008,
  author  = {Tsuji, T. },
  title   = {Spontaneous structures in 2-{D} bubbling },
  journal = {  Powder Technology },
  year    = { 2008  },
  volume  = { 10  },
  pages   = {  13-19 },
 number  = { 7}
  }


@ARTICLE{Shirgaonkar:2009,
  author  = {Shirgaonkar, A. A. and Maclver, M. A. and Patankar, N. A.},
  title   = {A new mathematical formulation and fast algorithm for fully resovled simulation of self-propulsion},
  journal = {Journal of Computional Physics},
  year    = { 2009  },
  volume  = { 228  },
  pages   = {  2366-2390 },
 number  = {11 }
  }

  @ARTICLE{Haeri:2012,
  author  = {Haeri, S. and Shrimpton, J. S.},
  title   = {On the application of immersed boundary, fictitious domain and body-conformal mesh methods to many particle multiphase flows},
  journal = {International Journal of Multiphase Flow},
  year    = { 2012  },
  volume  = { 40  },
  pages   = {  38-55 },
  number  = { 18}
  }

@BOOK{Sorensen:2006,
   author = {Sorensen, R. M.},
   title = { {Basic Coastal Engineering} },
   publisher = {Springer Science, New York},
   edition = {Third},
   year    = { 2006 },
   }

Output: Displaying 3-5 authors in citation looks really odd :(, but maxcitenames is not available in APA

enter image description here

The printed references style: Journal name and volume is italic, how to make it as normal font; or just make the volume number non-italic, because the combination 18(5) (where 5 is the number) looks weird.

For comparison, the original natbib output is also attached:

enter image description here

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

I think the issue with the maxcitenames is that APA style requires that all the names be listed the first time the work is cited. This is controlled by the labelname format in apa.cbx. I modified

\DeclareNameFormat{labelname}{%
...
{\ifboolexpr{test {\ifnumcomp{\value{listtotal}}{>}{5}}
             or test {\ifciteseen}}
...
}

to be

\DeclareNameFormat{labelname}{%
...
{\ifboolexpr{test {\ifnumcomp{\value{listtotal}}{>}{\value{maxnames}}}}
...
}

I believe you can just copy the original and paste a modified version into your preamble or you can define your own citation style.

As for dealing with & and "and", I do

\renewcommand*{\finalnamedelim}{\addspace{}\bibstring{and}\space}

I cannot remember if this handles changes in language properly.

share|improve this answer
    
Unfortunately, it did not work :(, when I put it in preamble. –  KOF Feb 6 '13 at 17:15
    
I forgot to add makeletter...., it did work –  KOF Feb 7 '13 at 20:15
add comment

To add the parenthesis to the citation produced with \cite, you can use the package letltxmacro to define \cite as \citet

\LetLtxMacro{\cite}{\citet}

The number of authors to be printed before using et. al. is controlled by the parameter maxcitenames as one of the options of biblatex, i.e.

\usepackage[maxcitenames=2]{biblatex}
share|improve this answer
    
The first command worked, but the option maxcitenames=2 did not change the maximum citation names. –  KOF Feb 6 '13 at 14:10
add comment

The biblatex-apa package is carefully tailored to meet the standards of the APA style. Your requirements are relatively simple and likely have more in common with features of the standard authoryear-comp style.

Most of the changes you would need to make to authoryear-comp have already been addressed by other posts on this site.

The following example should get you most of the way there. I used BibTeX as the backend here as I can't see why your style needs biber. If you wish to use biber, load biblatex with:

\usepackage[backend=biber,style=authoryear-comp,natbib,uniquename=false,
            uniquelist=false,maxcitenames=2,firstinits,dashed=false]{biblatex}

This will disable name and name list disambiguation. The latter overrides maxcitenames=2 to ensure that name lists in citations are unique. Note that in switching between backends you should delete auxiliary files (*.aux, *.bbl, *.bcf, etc.) before re-compiling.

\documentclass{article}
\usepackage[backend=bibtex,style=authoryear-comp,natbib,maxcitenames=2,
  firstinits,dashed=false]{biblatex}

% \cite like \textcite
\renewrobustcmd*{\cite}{\citet}
\renewrobustcmd*{\Cite}{\Citet}
\renewrobustcmd*{\cites}{\textcites}

% all titles upright, no quotes
\DeclareFieldFormat{journaltitle}{#1}
\DeclareFieldFormat{issuetitle}{#1}
\DeclareFieldFormat{maintitle}{#1}
\DeclareFieldFormat{title}{#1}
\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
  {title}{#1}

% no "In: " preceding journal titles
\renewbibmacro{in:}{%
  \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}

% volume (number)
\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \ifentrytype{article}
    {\setunit*{\addspace}}
    {\setunit*{\adddot}}%
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}

% no page prefix
\DeclareFieldFormat{pages}{#1}

% no parentheses around dates
\renewbibmacro*{date+extrayear}{%
  \iffieldundef{year}{}{\printtext{\printdateextra}}}%

% no and before last name in list
\AtBeginBibliography{%
  \renewcommand*{\finalnamedelim}{\addcomma\space}}

% all names last-first
\DeclareNameAlias{sortname}{last-first}

\addbibresource{biblatex-examples.bib}
\begin{document}
\noindent
\cite[e.g.][10--15]{glashow}, \citet[e.g.][10--15]{glashow} \\
\cite{companion}, \citet{companion}, \citep{companion} \\
\cite*{companion}, \citet*{companion} \\
\cites[e.g.][10--15]{bertram}[10--14]{knuth:ct:a} \\
\cite{glashow,bertram,knuth:ct:a,knuth:ct:b,knuth:ct:c} \\
\citet{glashow,bertram,knuth:ct:a,knuth:ct:b,knuth:ct:c}
\printbibliography
\end{document}
share|improve this answer
    
Great, now everything with use of this style is under control. –  KOF Feb 7 '13 at 0:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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