[Tex/LaTex] Problem Biblatex numeric apa style

biblatexbibliographies

I would like to have numeric citation style in my main document, sorted in order and also at the end where the Bibliography is published, have it in Apa style with LastName, Firstname Year printed.

So far I got the numeric and sorting order right, but can't figure out how to get the apa style in the end, can someone help me ? In my tex file I got the following setting:

\usepackage[%
backend=bibtex      % biber or bibtex
,citestyle=numeric-comp  % numerical-compressed
,sorting=none        % no sorting
,sortcites=true      % some other example options ...
,block=none
,indexing=false
,citereset=none
,isbn=true
,url=true
,doi=true            % prints doi
,natbib=true         % if you need natbib functions
]{biblatex}
\addbibresource{\jobname.bib}  

By the way, I don't know why but it doesn't show also the last visited on when it's an online ressource. For example here is one entry in my bib file

@misc{wordnet, 
    title={WordNet: A Lexical Database for English}, 
    url={https://wordnet.princeton.edu/}, 
    urldate={2018-24-02}, 
    author={author not named}
 }

Best Answer

You can control the citestyle and bibstyle separately. So it is theoretically possible to have citestyle=numeric-comp and bibstyle=apa.

There are a few caveats, though

  • apa needs the Biber backend, so you need to switch from backend=bibtex to backend=biber and need to run Biber instead of BibTeX (Biblatex with Biber: Configuring my editor to avoid undefined citations)
  • The bibliography environment will not be numbered if you only load bibstyle=apa, so you also need to load numeric.bbx again. Below this is done with

    \makeatletter
    \RequireBibliographyStyle{numeric}
    \makeatother
    
  • It is not recommended to mix the highly specialised biblatex-apa style with different styles.

Then

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[%
backend=biber
,bibstyle=apa
,citestyle=numeric-comp
,sorting=none
,sortcites=true
,block=none
]{biblatex}


\makeatletter
\RequireBibliographyStyle{numeric}
\makeatother

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@misc{wordnet, 
  title   = {WordNet: A Lexical Database for English}, 
  url     = {https://wordnet.princeton.edu/}, 
  urldate = {2018-02-24}, 
  author  = {author not named},
}
\end{filecontents}

\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}


\begin{document}
\cite{sigfridsson,wordnet}
\printbibliography
\end{document}

gives you

[1] Sigfridsson, E. & Ryde, U. (1998). Comparison of methods for deriving atomic charges from the electrostatic potential and moments. Journal of Computational Chemistry, 19(4), 377–395. doi:10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P//[2] author not named. (n.d.). Wordnet: A lexical database for english. Retrieved February 24, 2018, from https://wordnet.princeton.edu/

Maybe it would be enough for you to combine numeric-comp with the standard authoryear bibstyle as in Combining style numeric with style authoryear in BibLaTeX. In that case you could continue using BibTeX, even though I would recommend you switch to Biber anyway.

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[%
backend=bibtex
,bibstyle=authoryear
,citestyle=numeric-comp
,sorting=none
,sortcites=true
,block=none
]{biblatex}


\makeatletter
\RequireBibliographyStyle{numeric}
\makeatother

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@misc{wordnet, 
  title   = {WordNet: A Lexical Database for English}, 
  url     = {https://wordnet.princeton.edu/}, 
  urldate = {2018-02-24}, 
  author  = {author not named},
}
\end{filecontents}

\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}


\begin{document}
\cite{sigfridsson,wordnet}
\printbibliography
\end{document}

The urldate issue is caused by a misformatted date: All dates must be given in YYYY-MM-DD format and so 2018-24-02 is not a valid date. The 24 February 2018 is 2018-02-24.