What style should I use to make the citations rendering as (Einstein, 1915)? Using biblatex
on Overleaf
[Tex/LaTex] Biblatex APA citation with parentheses
apa-stylebiblatexciting
Related Solutions
You wrote
... there is no support in
natbib
for online citations.
Sadly (or, rather, fortunately!), this claim is incorrect. Moreover, the apa-good.bst
bibliography style file recognizes a field named url
among the valid field names. Here's the file's bibtex code for the function write.url
:
FUNCTION {write.url}
{ url empty$
{ skip$ }
{ "\newline\urlprefix\url{" url * "}" * write$ newline$ }
if$
}
You'll need to have the url
package loaded (to make it understand the instructions \url
and \urlprefix
).
If you don't like the \newline
instruction, which tells LaTeX to insert a line break before the start of the URL, you can remove it from the code; just save the file to something like "myapa-good.bst", and then invoke this new file. However, the linebreak may be part of APA style and hence shouldn't be eliminated willy-nilly.
To sum up, using any of natbib
's citation commands, you should get bibliography entries with associated URLs (assuming, of course, that the entries' URL fields aren't blank!)
For citations as in C, you could write \parencite[Kap.~4]{testart}
or \parencite[5]{testart}
(see examples below).
Note that you should use the citation macros with curly braces, so use \cite{MeierMüller2003}
not \cite MeierMüller2003
.
To change the andothers
string from u. a
to et al.
, you need to edit the localisation strings. Just put the following two lines after \DeclareLanguageMapping{ngerman}{ngerman-apa}
in your document.
\DefineBibliographyStrings{ngerman}{%
andothers ={et\addabbrvspace al\adddot},
andmore ={et\addabbrvspace al\adddot},
}
Alternatively, you can create a file with the following content and save it under ngerman-apaed.lbx
in the directory your .tex
document is located.
\ProvidesFile{ngerman-apaed.lbx}
\InheritBibliographyExtras{ngerman-apa}% extras are inherited from ngerman ...
\DeclareBibliographyStrings{%
inherit = {ngerman-apa},% .... as well as all the keys
andothers = {{et\addabbrvspace al\adddot}{et\addabbrvspace al\adddot}},
andmore = {{et\addabbrvspace al\adddot}{et\addabbrvspace al\adddot}},
}
You then modify the line \DeclareLanguageMapping{ngerman}{ngerman-apa}
to \DeclareLanguageMapping{ngerman}{ngerman-apaed}
.
MWE
\documentclass[ngerman, a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
\addbibresource{\jobname.bib}
\DeclareLanguageMapping{ngerman}{ngerman-apa}
\DefineBibliographyStrings{ngerman}{%
andothers ={et\addabbrvspace al\adddot},
andmore ={et\addabbrvspace al\adddot},
}
\begin{filecontents}{\jobname.bib}
@article{testartlong,
author = {Arnold Uthor and William Riter and Rita Esearcher and Steven C. Ientist and Stuart Udent and Peter R. Ofessor and Lewis E. C. Turer},
title = {A Very Interesting Article},
journal = {Journal of Articles},
volume = {8},
number = {2},
page = {1-5},
date = {2010},
}
@article{testart,
author = {Arnold Uthor and William Riter},
title = {A Very Interesting Article},
journal = {Journal of Articles},
volume = {7},
number = {3},
page = {1-5},
date = {2010},
}
@book{testbook,
author = {Walter Ordsmith},
editor = {Eddie Ditor},
title = {The Work},
subtitle = {Subtitle},
date = {1983},
}
@online{testonline,
author = {Bernie Logger},
title = {A Very Opinionated Blog Post},
url = {http://example.com},
year = {2013},
}
\end{filecontents}
\begin{document}
\begin{tabular}{rl}
\verb|\cite{testart}| & \cite{testart}\\
\verb|\textcite{testart}| & \textcite{testart}\\
\verb|\parencite{testart}| & \parencite{testart}\\
\verb|\parencite[Kap.~4]{testart}| & \parencite[Kap.~4]{testart}\\
\verb|\parencite[15]{testart}| & \parencite[15]{testart}
\end{tabular}
\parencite{testartlong} and \parencite[5]{testbook}
\nocite{*}
\printbibliography
\end{document}
Edit
For multiple citations within one pair of parentheses use \parencites
or \parencite
.
\parencites(Herzkreislauf;)()[34]{testartlong}[Kap.~4]{testbook}
yields (Herzkreislauf; Uthor et al., 2010, S. 34; Ordsmith, 1983, Kap. 4)
; \parencites[Pre][Post]{testartlong,testbook}
gives us (Pre Ordsmith, 1983; Uthor et al., 2010, Post)
.
See also sections 3.7 to 3.7.6 of the BibLaTeX documentation
Best Answer
For real APA citations you want to use the package
biblatex-apa
(7th-edition APA style) orbiblatex-apa6
(6th-edition APA style).With
biblatex-apa
usestyle=apa,
. Withbiblatex-apa6
you'd usestyle=apa6,
in the example below.If you just want author-year citations and not necessarily all that APA style entails (some people call this class of styles "Harvard style"), you can use the standard
authoryear
style and customise it to your liking (Guidelines for customizing biblatex styles).Independent of the exact details of the style, most
biblatex
styles print citations in parentheses if you use\parencite
. Often it is preferable to use\autocite
and configure it to produce citations in parentheses (this is usually the default for author-year styles).Apart from
\autocite
and\parencite
manybiblatex
styles define\textcite
, which comes in handy in case you want to mention the author in your sentence.