Print Bibliography Empty Bibliography Meaning

LaTeX Tips: Top Ten Tips for Bibliographies

All but the first of the tips below apply to the bibtex method of generating bibliographies. For more details, and for additional tips, see the main Bibliographies Tips page.
  1. Mandatory argument to "thebibliography". The "thebibliography" environment has a mandatory argument, representing the width of the widest label.
    Example: .
    Leaving out this argument causes an error with the rather vague error message "Something's wrong--perhaps a missing \item".
  2. Before running bibtex, run the tex file through latex. The bibtex program needs the "auxiliary" file (with extension ) that is produced by latex.
  3. The bibtex program must be run on the auxiliary file of the paper, not the bibtex database. This is a common source of confusion for beginners. If tex and bibtex files for a paper have the same names, say and , things are simple: the command , where the filename is specified without extension, will do the right thing. However, it is important to understand that the file that is processed by bibtex is not the bibtex file, , but rather the auxiliary file that is generated after the first run through latex. Thus, in the above command the short-hand argument is expanded to . This becomes significant if the bibtex database has a name that is different from the name of the tex file. For example, if the bibtex database is , the appropriate bibtex command is , not , since bibtex needs the file , not the (probably non-existing) file .
  4. Capitalized words in titles. Words in titles that are to be capitalized (such as proper names) must be protected by placing the first (upper case) letter in braces.
    Example: .
    Note that this applies only to title fields ( and ). In other fields, such as journal names, no lower case conversion is done, so there is no need to protect capitalized words.
  5. Multiple authors. Separate the names of the authors by the conjunction "and", without additional punctuation marks.
  6. Nonstandard author names. For names of authors not in the standard "first last" or first middle last" format, the part representing the last name has to be explicitly marked by surrounding it with braces to ensure that the entry gets correctly alphabetized.
    Example: .
  7. Accented characters. Accented characters must be surrounded by braces.
    Example: .
  8. Overriding the default sort order. Bibtex normally does a good job in arranging references in the appropriate order (alphabetically by author, then chronologically); however, unpublished items that do not have a year listed may get placed before items by the same author published earlier. To prevent this and instead have the unpublished work be listed last, add an "invisible" year entry in the record as follows: . Similar tricks allow one to override other undesirable orderings.
  9. Including references that are not cited in the paper. Bibtex builds the bibliography from the references that are actually cited in the paper. Including references without corresponding citations is generally a bad idea, but it may be warranted in special situations. To include a reference that is not cited in the paper, but which has a record in the bibtex database, add the command at the end of the paper, just before the bibliography; here "xxx" is the key for the paper to be cited. The command causes all items in the database to be included in the references, regardless of whether or not they are cited in the paper.
  10. Printing out a bibtex database. To print out all records in a bibtex database, say , create and compile a dummy tex file containing the following commands:

Back to the LaTeX Tips Page

Last modified: Thu 09 Jul 2009 02:24:23 PM CDT A.J. Hildebrand

Learn how to create a bibliography using modern biblatex and biber - A short tutorial.

This will only be a short overview of the main and most often used features of biblatex and biber to create a bibliography. More detailed information can be found in the package documentation.

The database[edit]

Creating a bibliography using biblatex and biber means storing all of your available bibliographic information in a simple text-based database. The name should be as unique as possible, for example . This is helpful when transferring files with your advisor, students or colleagues. biber is used to deal with the database.

A sample database file could look like this:

@article{wombat2016, author = {Walther Wombat and Klaus Koala}, title = {The true meaning of 42}, journal = {Journal of modern skepticism}, date = {2016}, keywords = {trusted}, } @book{lion2010, author = {Laura Lion and Gabrielle Giraffe and Carl Capybara}, title = {The dangers of asking the wrong question}, publisher = {publishing house}, date = {2010}, keywords = {trusted}, } @online{wikibook, title = {Generating Bibliographies with biblatex and biber}, organization = {Wikibooks}, date = {2016}, urldate = {2016-03-07}, url = {}, keywords = {untrusted}, }

Every entry in the database starts with an -sign followed by the entry type. More types are available, the package documentation lists all of them. The bibliographic information for each entry are stored in a pair of braces, beginning with a unique keyword for that entry (bibkey). Least complicated way of presenting the data is every field type in a new line, the content in curly braces, followed by a comma. The order in which you give the information is not important.

Please have a close look at the authors, every individual author is separated by the keyword . All dates are written in YYYY-MM-DD, or just the year if the other information is not available. The file which should have been installed with the package contains some sample entries.

Setting up biber[edit]

Biber is the name of the helper program that sorts the entries and provides all the relevant information to package biblatex. If you are not comfortable using the command line (aka the terminal), you should set up your editor to call biber for you. Setting up my editor to use biber shows how to do it for the different editors.

A simple example[edit]

\documentclass{article}\usepackage[backend=biber]{biblatex}\addbibresource{lauraPhd2016.bib}\begin{document} I doubt that there is any useful information here~\cite{wikibook}. All we know is limited, apart from knowing the answer we all know. Or do we? Wombat and Koala have discovered some interesting things~\cite{wombat2016}. Some people are too nosy. What can happen to them is described by Laura Lion~\cite[9]{lion2010}. \printbibliography\end{document}

Now how does it actually work? Package biblatex is loaded with the option followed by adding your database file to the list of bibliographic files using . Please note that the file extension is mandatory and that this is happening in the preamble of the document.

Within the document you can cite one of your database entries using . Your database can contain hundreds of entries, but only cited references will occur in the final list. You can use to add uncited entries to the list. If you want to add all entries from the database use .

Finally, the list of your references is printed with .

Running LaTeX (no matter if , etc.) on the main document will result in the following output.

LaTeX Warning: Citation 'wikibook' on page 1 undefined on input line 5. LaTeX Warning: Citation 'wombat2016' on page 1 undefined on input line 7. LaTeX Warning: Citation 'lion2010' on page 1 undefined on input line 9. LaTeX Warning: Empty bibliography on input line 11. [1{/usr/local/texlive/2017/texmf-var/fonts/map/pdftex/updmap/}] (./lauraPhd2016Main.aux) LaTeX Warning: There were undefined references. Package biblatex Warning: Please (re)run Biber on the file: (biblatex) lauraPhd2016Main (biblatex) and rerun LaTeX afterwards.

We get several warnings about undefined references, no bibliography and instead of proper citations, we see just the cite key in bold.

In order to really get a bibliography and the citations, and not just the infamous warning, you have to run biber after latex to extract the relevant data from the database. After setting up biber as described in Setting up my editor to use biber you should be able to do it by pressing one button while working on your document. To incorporate the bibliography information into your document, LaTeX then has to process the data biber has generated before. To sum it up, if you have a file you (or your editor) will have to do:

  • latex lauraPhdd2016Main
  • biber lauraPhdd2016Main
  • latex lauraPhdd2016Main

Everytime your database is updated, remember to process the database by calling biber.

The full result can be seen in the picture below. Please note that package biblatex adds some small little details. Can you see things that are printed but have not been defined?

Reference Styles[edit]

Different reference styles are in use within the different disciplines of science. Very broadly speaking, you can divide into a numerical referencing sytem (Vancouver) or an author date referencing system (Harvard).

Package biblatex[1] provides different citation commands that generate different output (in-text citation, footnotes and more). A few examples are given below, the package documentation contains and explains the use of the whole set.

Numerical Referencing[edit]

Numerical referencing is the default style. Numbers within brackets are used in text and in the bibliography. Using makes it easy to change the style into footnotes. gives a bibliography that is sorted chronologically, i.e. the numbers increase to the end of the document.

\documentclass{article}\usepackage[backend=biber,style=numeric,autocite=plain,sorting=none]{biblatex}\addbibresource{lauraPhd2016.bib}\begin{document} I doubt that there is any useful information here.~\cite{wikibook} All we know is limited, apart from knowing the answer we all know. Or do we? \citeauthor{wombat2016} have discovered some interesting things.~\autocite[compare][80]{wombat2016} What can happen to nosy people is described by \textcite[9]{lion2010}. \printbibliography\end{document}

Using gives a diffferent output. Can you spot all the differences?

Author Date Referencing[edit]

If you want an author-date referencing style, you can use when loading biblatex. The option with the option puts parenthesis around the cite genererated with (which is similar to using . In some cases, may come in handy when the citation is the subject and part of the sentence flow.

\documentclass{article}\usepackage[backend=biber,style=authoryear,autocite=inline]{biblatex}\addbibresource{lauraPhd2016.bib}\begin{document} I doubt that there is any useful information here~\cite{wikibook}. All we know is limited, apart from knowing the answer we all know. Or do we?~\cite{wombat2016} Some people are too nosy. What can happen to them is described by Laura Lion~\autocite[9]{lion2010}. Some people are too nosy. What can happen to them is described by \textcite[9]{lion2010}. \printbibliography\end{document}

APA Citing[edit]

The American Psychological Association (APA) defines a very strict author year style. You can access it using and additionally defining the language mapping.


Compare the output with the normal author year style. How many changes can you spot?

Separate Bibliographies by Entry Type[edit]

Suppose you want to have a separate bibliography for all the online resources you are citing. No problem using the optional argument of . You can also change the title (and other stuff).

\documentclass{article}\usepackage[backend=biber,defernumbers=true]{biblatex}\addbibresource{biblatex-examples.bib}\begin{document}\nocite{westfahl:space,aristotle:physics,ctan,baez/online,markey,sigfridsson}\printbibheading\printbibliography[heading=subbibliography,type=online,title={All my online references}]\printbibliography[heading=subbibliography,nottype=online,title={All my non-online references}]\end{document}

Splitting into different topics[edit]

You can split your bibliography into different topics, in trusted and untrusted sources, or in primary and secondary sources. The way to tell biblatex what is what, is by adding a tag to the entries of the database.

@book{lion2010, author = {Laura Lion and Gabrielle Giraffe and Carl Capybara}, title = {The dangers of asking the wrong question}, publisher = {publishing house}, date = {2010}, keywords = {trusted}, }
\documentclass{article}\usepackage[backend=biber,style=authoryear,refsection=section]{biblatex}\addbibresource{lauraPhd2016.bib}\begin{document}\cites[see also][12]{wombat2016}[and][45]{lion2010}\nocite{wikibook}\printbibliography[keyword={trusted},title={All the trusted sources}]\printbibliography[keyword={untrusted},title={All the untrusted sources}]\end{document}

Note, that the entryfield in the dataase is called (plural) because you can have more than one keyword (separated by commas). When calling the command, you have to use the singular. biblatex has a powerful system of filtering data, more can be found in the manual.

Bibliographies per Section or Chapter[edit]

Some people have the need for a reference list at the end of each chapter or section. This can be done using .

\documentclass{article}\usepackage[backend=biber,defernumbers=true,refsection=section]{biblatex}\addbibresource{biblatex-examples.bib}\begin{document}\section{Aster}\cite{ctan,sigfridsson} and some text \printbibliography[heading=subbibliography]\section{Begonia}\cite{aristotle:physics,markey}\printbibliography[heading=subbibliography]\section{Cichorium}\cite{westfahl:space,baez/online}\printbibliography[heading=subbibliography]\end{document}

A bibliography in a presentation[edit]

You can use package with (see the Presentations section) to have citations and a reference list in your presentation. Using full cites right away is recommended, so listeners don't have to wait till the very end to see where information is drawn from.

\documentclass{beamer}\usecolortheme{crane}\usepackage{biblatex}\addbibresource{lauraPhd2016.bib}\begin{document}\begin{frame}{42} Interesting \footfullcite{wombat2016}\end{frame}\nocite{*}\begin{frame}{References}\printbibliography\end{frame}\end{document}

Back to main bibliography page

One thought on “Print Bibliography Empty Bibliography Meaning

Leave a Reply

Your email address will not be published. Required fields are marked *