Latex No Bibliography Output

LaTeX forum ⇒ BibTeX, biblatex and biber ⇒ No Bibliography in OutputTopic is solved

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.









Anna87
Posts:6
Joined: Fri May 31, 2013 10:32 am

No Bibliography in Output

Postby Anna87 » Fri May 31, 2013 12:23 pm

Hi All!

I'm newbie, more or less, with LaTeX!

I'm writing my Master Thesis, and I'm using toptesi, that is a documentation class utilized in many Italian universities. It is very useful, since it contains all settings required by University.

I have a problem with the insertion of the Bibliography:it doesn't appear in the PDF file. I'm pretty sure that the .bib file is corrected, because I separately wrote all chapter , and in each chapter I inserted the bibliography with all relative citations. When I gathered all the chapters in the thesis file, the bibliography, magically disappeared.

I tried to run in the sequence :latex file, bibtex file,latex file, latex file.

My OS is Windows. I'm using TeXworks with MiKTeX.


Thanks for the help!
Anna


P.S. Sorry for the bad English. I hope to be clear in the problem explanation.
Attachments
thesis.tex
The source code for the thesis.
(3.54 KiB) Downloaded 113 times
sections.bib
The BibTeX database file.
(31.54 KiB) Downloaded 117 times
Last edited by localghost on Fri May 31, 2013 4:42 pm, edited 1 time in total.
Reason:Preferably no external links (see Board Rules). Attachments go onto the forum server where possible.

Tags:
Anna87
Posts:6
Joined: Fri May 31, 2013 10:32 am

Postby Anna87 » Fri May 31, 2013 4:26 pm

Oh, yes!

Tesi file:

Bib file:


I hope that the file will be ok >.<'
  1. \documentclass[12pt,twoside,cucitura,italian,greek]{toptesi}
  2. \usepackage[font=small,format=plain,labelfont=bf,up,textfont=it,up]{caption}
  3. \usepackage[ansinew]{inputenc}
  4. \usepackage[T1]{fontenc}\usepackage{lmodern}
  5. TeIt's inspired by the ability of ovipositing wasps.They are capable to penetrate different kinds of substrate in order to lay eggs.The ability to pierce both hard substances and target host larvae are index of robust design,flexible and steerable capability.The ovipositor-the organ used by these insects for laying \textbf{eggs}-is a thin and flexible structure, composed by two or more segments that can slide with respect to each other.The segments are connected by means of a special dovetail mechanism, while one inner channel is used for delivering the eggs. \citep{Ko2011,Frasson2012}
  6. \bibliographystyle{plain}
  1. doi = {10.1080/1741597YYxxxxxxxx},
  2. file = {:C$\backslash$:/Users/Anna/Documents/Tesi/Specialistica/paper/STING project reading/Detailed finite element modelling of deep needle insertions.pdf:pdf},
  3. keywords = {cohesive elements,finite element method,flexible probe,fracture,needle insertion,soft tissue,toughness},
  4. title = {{Detailed finite element modelling of deep needle insertions into a soft tissue phantom using a cohesive approach}},
  5. author = {Ko, Seong Young and Frasson, Luca and {Rodriguez y Baena}, Ferdinando},
  6. doi = {10.1109/TRO.2011.2159411},
  7. file = {:C$\backslash$:/Users/Anna/Documents/Tesi/Specialistica/paper/STING project reading/Closed loop planar motion control of a steerable probe with a programmamble bevel inspired by nature.pdf:pdf},
  8. journal = {IEEE Transactions on Robotics},
  9. title = {{Closed-Loop Planar Motion Control of a Steerable Probe With a “Programmable Bevel” Inspired by Nature}},
  10. url = {http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=5966364},
Johannes_B
Site Moderator
Posts:3639
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Fri May 31, 2013 9:03 pm

Well, your example works for me. The mistake seems to be somewhere else. But BibTeX gives some Warning concerning the entry of Frasson2012 (missing author, missing journal). Right now I'm not quite sure where your problem is.

You said, that you wrote all chapters seperately, how did you put them together? Do you get any error messages?



Instead of natbib and BibTeX you should work with the more modern package biblatex along with the bibliography processor biber.
  1. \begin{filecontents}{\jobname.bib}
  2. doi = {10.1080/1741597YYxxxxxxxx},
  3. {:C$\backslash$:/Users/Anna/Documents/Tesi/Specialistica/paper/STING
  4. project reading/Detailed finite element modelling of deep
  5. needle insertions.pdf:pdf},
  6. keywords = {cohesive elements,finite
  7. probe,fracture,needle insertion,soft
  8. title = {{Detailed finite element
  9. insertions into a soft tissue
  10. author = {Ko, Seong Young and Frasson, Luca and
  11. {Rodriguez y Baena}, Ferdinando},
  12. doi = {10.1109/TRO.2011.2159411},
  13. {:C$\backslash$:/Users/Anna/Documents/Tesi/Specialistica/paper/STING
  14. project reading/Closed loop planar motion control of a
  15. steerable probe with a programmamble bevel inspired by
  16. journal = {IEEE Transactions
  17. title = {{Closed-Loop Planar Motion Control of a Steerable Probe
  18. With a “Programmable Bevel” Inspired by Nature}},
  19. url={http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=5966364},
  20. \documentclass[12pt,twoside,cucitura,italian,greek]{toptesi}
  21. \usepackage{filecontents}
  22. \usepackage[font=small,format=plain,labelfont=bf,up,textfont=it,up]{caption}
  23. \usepackage[utf8]{inputenc}
  24. \usepackage[T1]{fontenc}\usepackage{lmodern}
  25. TeIt's inspired by the ability of ovipositing wasps.They are
  26. capable to penetrate different kinds of substrate in order to lay
  27. eggs.The ability to pierce both hard substances and target host
  28. larvae are index of robust design,flexible and steerable
  29. capability.The ovipositor-the organ used by these insects for
  30. laying \textbf{eggs}-is a thin and flexible structure, composed
  31. by two or more segments that can slide with respect to each
  32. other.The segments are connected by means of a special dovetail
  33. mechanism, while one inner channel is used for delivering the
  34. eggs. \citep{Ko2011,Frasson2012}
  35. \bibliographystyle{plain}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Anna87
Posts:6
Joined: Fri May 31, 2013 10:32 am

Postby Anna87 » Fri May 31, 2013 10:18 pm

No, I didn't get any error message when I put together the chapters.
I used the command \input{C:\Users...\...}.
Obviously, before to put together the chapter I erased all the initial settings of each latex file.

Sorry, but I don't understand your last comment.
Which other package I should use?
Thanks for all the help!
Johannes_B
Site Moderator
Posts:3639
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sat Jun 01, 2013 1:01 pm

That was a suggestion, primarily for future projects. Never touch a running system, right?

You are using natbib, but there are many ohter packages doing similar things, but for a different output. Biblatex is a modern package and in combination with the bibliography processor biber fully capable of unicode.
But right now you should stick to your natbib and BibTeX setup.

Did you compile the example given by me (well, it's your code)? Does the bibliography show up? Remember -> (pdf)latex, bibtex, (pdf)latex
If it's not there, please show us your log file \jobname.blg

You read how to create a minimal example, right? Try the "Building up" method and find out, where your document/bibliography crashes.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Anna87
Posts:6
Joined: Fri May 31, 2013 10:32 am

Postby Anna87 » Sun Jun 02, 2013 1:15 pm

The next time I will try to use BibLaTeX, I think that is a good Idea. I always used natbib, so I didn't know biblatex to be honest. Thanks for advice!

Yes, I did. I compiled the file in the same order that you indicate to me. The results it was only the page of bibliography. The log file of the minimal example working is attached.
Attachments
example.log
(25.29 KiB) Downloaded 118 times
Last edited by localghost on Sun Jun 02, 2013 1:19 pm, edited 1 time in total.
Reason:Complete Files are better uploaded as attachment to the forum server instead of being posted as code.
Johannes_B
Site Moderator
Posts:3639
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sun Jun 02, 2013 9:09 pm

The log file says, that the bibliography is empty and is telling you about undefined references. Is this the log file after the last compilation?

Did you check, if you cited the right keys?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Return to “BibTeX, biblatex and biber”

Jump to
  • LaTeX Community
  •    Announcements
  •    Community talk
  •    Comments & Wishes
  •    New Members
  • LaTeX
  •    Text Formatting
  •    Graphics, Figures & Tables
  •    Math & Science
  •    Fonts & Character Sets
  •    Page Layout
  •    Document Classes
  •    General
  • LaTeX's Friends
  •    BibTeX, biblatex and biber
  •    MakeIndex, Nomenclature, Glossaries and Acronyms
  •    Conversion Tools
  •    Viewers for PDF, PS, and DVI
  •    XeTeX
  •    Others
  • LaTeX Distributions
  •    Decision Guidance
  •    MiKTeX and proTeXt
  •    TeX Live and MacTeX
  •    Others
  • LaTeX Editors
  •    Decision Guidance
  •    AUCTeX
  •    Kile
  •    LEd
  •    LyX
  •    Scientific Word/Workplace
  •    Texmaker and TeXstudio
  •    TeXnicCenter
  •       Announcements
  •       General
  •       Templates, Wizards & Tools
  •       Feature Suggestions
  •       Development
  •    TeXShop
  •    TeXworks
  •    WinEdt
  •    WinShell
  •    Others
  • LaTeX Templates
  •    Articles, Essays, and Journal Templates
  •    Theses, Books, Title pages
  •    Letters
  •    Presentations and Posters
  •    Curricula Vitae / Résumés
  •    Assignments, Laboratory books and reports
  •    Calendars and Miscellaneous

Who is online

Users browsing this forum: No registered users and 0 guests

Powered by phpBB® Forum Software © phpBB Limited

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 = {https://en.wikibooks.org/wiki/LaTeX/Generating_Bibliographies_with_biblatex_and_biber}, 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/pdftex.map}] (./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.

\usepackage[backend=biber,style=apa,autocite=inline]{biblatex}\DeclareLanguageMapping{english}{english-apa}\addbibresource{lauraPhd2016.bib}

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

0 Thoughts to “Latex No Bibliography Output

Leave a comment

L'indirizzo email non verrà pubblicato. I campi obbligatori sono contrassegnati *