I know the lorem ipsum, lipsum
, blindtext
and other packages for generating nonsense text in a LaTeX document. I also know there are a lot of alternatives.
And I know you can use \nocite{*}
to just cite all your references to generate a bibliography.
But I may not have a bibliography yet/no entries in there.
But is there actually a way to generate a (nonsense/“fake”) bibliography e.g. in the style of lorem ipsum, i.e. with “dummy text”?
Possibly even the lorem ipsum text in the document randomly citing these entries of the bibliography?
Use case: This may be useful e.g. for demonstrating problems on Stackexchange Tex or in bug reports that involves the bibliography.
It does not have to be fancy. It should just be somewhat realistic, i.e. include some common fields (date, URL, title), maybe different bibliography entry types etc. The text and dates etc. might be totally random and do not have to make any sense whatsoever. (Except of being in a valid format/have the correct type, i.e. no 2020-01-42 as a date, of course.)
Best Answer
For
biblatex
the first choice is most definitelybiblatex-examples.bib
, which David Carlisle already pointed out in the comments. The file is installed in a place where both BibTeX and Biber can find it and comes bundled withbiblatex
, so is usable without intervention on any system that runsbiblatex
(at least ifbiblatex
is installed correctly).biblatex-examples.bib
contains a variety of entries demonstrating a wide range of standardbiblatex
features. For many common use cases there should be an entry in that file.I generally try to avoid
\nocite{*}
ing the whole file since that results in about six pages of bibliography output that probably drowns out the point I am trying to make, so there are several entries likesigfridsson
(@article
),nussbaum
,worman
(@book
),geer
(@thesis
),westfahl:space
(@incollection
) that I turn to quite often and know by heart already.Note that most entries in
biblatex-examples.bib
usedate
(instead ofyear
even if the date consists only of a year) andjournaltitle
instead ofjournal
. The file is therefore usually not that great of a resource for BibTeX styles.For BibTeX there is
xampl.bib
, which comes with the standard BibTeX installation. I can't quite put my finger on the exact reasons, but somehow many entries from that file feel a bit clunky to me.apacite
comes with a very comprehensiveapa5ex.bib
.As Marijn rightfully points out in the comments, sometimes a question really depends on some specific feature of your
.bib
entries, which pre-made example files might not have. In that casefilecontents
comes in extremely handy to make your example self-contained. (Recall that the defaultfilecontents
environment does not overwrite existing files. In newer versions one uses the optional keywordforce
oroverwrite
, i.e.\begin{filecontents}{\jobname.bib}
, in older LaTeX versions one would load thefilecontents
package, i.e.\usepackage{filecontents}
, to allow overwriting of existing files.)