Not really. You can use the filecontents*
environment. Put
\begin{filecontents*}{database.bib}
<the bibliography database>
\end{filecontents*}
in the preamble (before \documentclass
) and the database.bib
file will be created if not already existent. This is the most convenient way to pack everything needed in a unique .tex
file.
The filecontents*
environment differs from filecontents
in that the former doesn't add any initial comments, which could confuse bibtex or biber.
As mentioned by Gonzalo Medina, the filecontents package lifts some restriction about these environments, allowing for example to put them anywhere in the file. Notice that, with this package, existent files will be overwritten.
This problem is due to biblatex-apa
's (apa.bbx
's) apaauthor
name format; you might want to notify the author of this small bug.
The string and others
in the author list sets ifmorenames
to true. apaauthor
checks for this case whenever a name is printed, not just at the very end of the list; consequently it prints the andothers
string ("et al.") after each name.
The fix is to add the following lines to your preamble.
\DeclareNameFormat{apaauthor}{%
\ifthenelse{\value{listcount}=\maxprtauth\AND\value{listcount}<\value{listtotal}}
{\addcomma\addspace\ldots\addspace}
{\ifthenelse{\value{listcount}>\maxprtauth\AND\value{listcount}<\value{listtotal}}
{}
{\ifthenelse{\iffieldequalstr{doubtfulauthor}{true}}
{\mkbibbrackets{\usebibmacro{name:apa:last-first}{#1}{#3}{#4}{#5}{#7}?}}
{\usebibmacro{name:apa:last-first}{#1}{#3}{#4}{#5}{#7}}}}%
\ifthenelse{\value{listcount}=\value{listtotal}}% this test is new
{\ifmorenames{\andothersdelim\bibstring{andothers}}{}}{}}
The MWE
\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@Article{boker2011,
Author = {Boker, S. and Neale, M. and Maes, H. and Wilde, M. and
Spiegel, M. and Brick, T. and Spies, J. and Estabrook,
R. and Kenny, S. and Bates, T. and others},
Title = {Open{M}x: {A}n open source extended structural
equation modeling framework},
Journal = {Psychometrika},
Volume = {76},
Number = {2},
Pages = {306--317},
year = 2011
}
\documentclass{apa6}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=apa,maxnames=999,sortcites=true,sorting=nyt,apabackref=true,backend=biber]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
\DeclareNameFormat{apaauthor}{%
\ifthenelse{\value{listcount}=\maxprtauth\AND\value{listcount}<\value{listtotal}}
{\addcomma\addspace\ldots\addspace}
{\ifthenelse{\value{listcount}>\maxprtauth\AND\value{listcount}<\value{listtotal}}
{}
{\ifthenelse{\iffieldequalstr{doubtfulauthor}{true}}
{\mkbibbrackets{\usebibmacro{name:apa:last-first}{#1}{#3}{#4}{#5}{#7}?}}
{\usebibmacro{name:apa:last-first}{#1}{#3}{#4}{#5}{#7}}}}%
\ifthenelse{\value{listcount}=\value{listtotal}}
{\ifmorenames{\andothersdelim\bibstring{andothers}}{}}{}}
\shorttitle{IFA}
\begin{document}
OpenMx \parencite{boker2011,aksin,wilde,murray}
\printbibliography
\end{document}
then yields
Update 2013-10: This has been corrected in biblatex-apa
version 6.4 according to a comment below the question from user PLK.
Best Answer
The
bibliography
environment fornumeric
andalphabetic
styles does not use\bibhang
, because they work more like anenumerate
. In those lists, all lines have the same indentation, but additionally there is a label on the first line.So you if you want to use
\bibhang
you need something like thisA simpler solution is