Texmaker No Bibliography Page

When it comes to bibliography management in LaTeX the program natbib is an alternative used in several journals. The program is not actively developed, but is very stable and widely used. This article explains how to use natbib to format and cite bibliographic sources.

Note: If you are starting from scratch it's recommended to use biblatex since that package provides localization in several languages, it's actively developed and makes bibliography management easier and more flexible.

[edit]Introduction

A minimal working example is presented below:

\documentclass{article}\usepackage[utf8]{inputenc}\usepackage[english]{babel}   \usepackage{natbib}\bibliographystyle{unsrtnat}   \title{Bibliography management: \texttt{natbib} package}\author{Share\LaTeX}\date{}   \begin{document}   \maketitle   This document is an example of \texttt{natbib} package using in bibliography management. Three items are cited: \textit{The \LaTeX\ Companion} book \cite{latexcompanion}, the Einstein journal paper \cite{einstein}, and the Donald Knuth's website \cite{knuthwebsite}. The \LaTeX\ related items are \cite{latexcompanion,knuthwebsite}.   \medskip   \bibliography{sample}   \end{document}

In this example there are four basic commands to manage the bibliography:

Imports the package natbib.
Sets the bibliography style unsrtnat. See the article about bibliography styles for more information.
Prints a reference to the citation entry, what is printed depends on the citation style. The word inside the braces corresponds to a particular entry in the bibliography file.
Imports the file sample.bib that contains bibliography sources. See the bibliography file section.

  Open an example of the natbib package in ShareLaTeX

[edit]Basic usage

A simple working example was shown at the introduction, there are more bibliography-related commands available.

\documentclass{article}\usepackage[utf8]{inputenc}\usepackage[english]{babel}   \usepackage[square,numbers]{natbib}\bibliographystyle{abbrvnat}   \title{Bibliography management: \texttt{natbib} package}\author{Share\LaTeX}\date{}   \begin{document}   \maketitle   This document is an example of \texttt{natbib} package using in bibliography management. Three items are cited: \textit{The \LaTeX\ Companion} book \cite{latexcompanion}, the Einstein journal paper \citet{einstein}, and the Donald Knuth's website \cite{knuthwebsite}. The \LaTeX\ related items are \cite{latexcompanion,knuthwebsite}.   \medskip   \bibliography{sample}   \end{document}

There are a few changes in this example:

  • The options and in enable squared brackets and numeric citations respectively. See the reference guide for a list of package options
  • The command adds the name of the author to the citation mark, regardless of the citation style.

  Open an example of the natbib package in ShareLaTeX

[edit]The bibliography file

The bibliography files must have the standard bibtex syntax and the extension .bib. They contain a list of bibliography sources and several fields with information about each entry.

This file contains records in a special format, for instance, the first bibliographic reference is defined by:

This is the first line of a record entry, tells BibTeX that the information stored here is about an article. The information about this entry is enclosed within braces. Besides the entry types shown in the example (, and there are a lot more, see the reference guide.
The label is assigned to this entry, is a unique identifier that can be used to refer this article within the document.
This is the first field in the bibliography entry, indicates that the author of this article is Albert Einstein. Several comma-separated fields can be added using the same syntax , for instance: title, pages, year, URL, etc. See the reference guide for a list of possible fields.

The information in this file can later be printed and referenced within a LaTeX document, as shown in the previous sections, with the command . Not all the information in the .bib file will be displayed, it depends on the bibliography style set in the document.

  Open an example of the natbib package in ShareLaTeX

[edit]Adding the bibliography in the table of contents

If you want the bibliography to be included in the table of contents, importing the package tocbibind in the preamble will do the trick:

\documentclass[a4paper,10pt]{article}\usepackage[utf8]{inputenc}\usepackage[english]{babel}   \usepackage[nottoc]{tocbibind}   \begin{document}   \tableofcontents   \section{First Section} This document ...   \bibliographystyle{unsrt}\bibliography{sample}   \end{document}

Adding the line


to the preamble will print the "References" or "Bibliography" in the table of contents, depending on the document type. Be careful, it will also add other elements like the Index, Glossary and list of Listings to the table of contents. For more information see the tocbibind package documentation.

  Open an example of the natbib package in ShareLaTeX

[edit]Reference guide

natbib package options

  • for round parentheses
  • uses square brackets
  • curly braces
  • angle braces or chevrons
  • separates multiple citations with semicolons
  • same as
  • separate multiple citations with commas
  • for author-year citations
  • for numerical citations
  • superscripts for numerical citations, as in Nature
  • orders multiple citations according to the list of references
  • same as but multiple numerical citations are compressed if possible
  • compress without sorting
  • the full name of the author will appear in the first citation of any reference
  • To be used with the package chapterbib to add the bibliography to the table of contents as a unnumbered section instead of an unnumbered chapter
  • prevents hyphenation of author names
  • to omit common elements of merged references

Standard entry types

Article from a magazine or journal
A published book
A work that is printed but have no publisher or sponsoring institution
An article in a conference proceedings
A part of a book (section, chapter and so on)
A part of a book having its own title
An article in a conference proceedings
Technical documentation
A Master's thesis
Something that doesn't fit in any other type
A PhD thesis
The same as
Report published by an institution
Document not formally published, with author and title


Most common fields used in BibTeX

address annote author
booktitle chaper crossref
edition editor institution
journal key month
note number organization
pages publisher school
series title type
volume year URL
ISBN ISSN LCCN
abstract keywords price
copyright language contents

[edit]Further reading

For more information see

@article{einstein, author = "Albert Einstein", title = "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German}) [{On} the electrodynamics of moving bodies]", journal = "Annalen der Physik", volume = "322", number = "10", pages = "891--921", year = "1905", DOI = "http://dx.doi.org/10.1002/andp.19053221004" }   @book{latexcompanion, author = "Michel Goossens and Frank Mittelbach and Alexander Samarin", title = "The \LaTeX\ Companion", year = "1993", publisher = "Addison-Wesley", address = "Reading, Massachusetts" }   @misc{knuthwebsite, author = "Donald Knuth", title = "Knuth: Computers and Typesetting", url = "http://www-cs-faculty.stanford.edu/\~{}uno/abcde.html" }
\usepackage[nottoc]{tocbibind}

2.1 Usual commands

The standard commands (cut, copy, find...) can be launched via the "Edit" menu and the "Edit" toolbar.
Block selection is available by using the Alt key while moving the mouse cursor.

2.2 Setting the preamble of a TeX document

To define the preamble of your document, you can use the "Quick start" wizard ("Wizard" menu).

This dialog allows you to set the main features of your document (class, paper size, encoding...).
Note : You can add other options by clicking the "+" buttons. All yours settings are recorded.

You can also type your own preamble model in the editor : with the "Copy/paste" or "Save As" commands, you can use it for a new document.

2.3 Structure of a document

To define a new part (section,subsection...) in your document with Texmaker, just use this combobox in the toolbar :

This will cause a dialog to pop up which allows you to define the style of the part (section,subsection...).
Note : the "Structure View" is automatically updated.

2.4 Browsing your document

The "Structure View" (left panel) lets you quickly reach any part of your document. All you need to do is to click on any item (label, section...) and you will be taken to the beginning of the corresponding area in the editor.

The "Structure View" is automatically updated while typing. You can also use the "Refresh Structure" ("Edit" menu) command at any moment.

For each file, three bookmarks can be used to speed up navigation : just click on a line number to add or remove a bookmark. When you have already defined three bookmarks, you must remove one of them to add a new bookmark. To jump to the line corresponding to a bookmark in the editor, just click on the buttons in the status bar.

2.5 Formatting your text

You can quickly set the format of a part of your text with this :

Additional option: a selected text can be directly framed by certain environments. Example: while clicking on the button "Bold" after having selected the word "Hello" , you will obtain the code: \textbf{Hello}.
This option is available for all the environments indicated by "[selection]" in the "LaTeX" menu.

2.6 Spacings

The usual "spacing" commands are available in the "LaTeX" and "Math" menus. To insert quickly the "new line" LaTeX command, you can use the corresponding command in the toolbar (shortcut : Ctrl+Alt+return)

2.7 Inserting a list

The usual list environments code can be insert quickly via the "LaTeX-List" menu.
Note : the shortcut for the \item command is Ctrl+Shift+I.

2.8 Inserting a table

With the "Tabular" wizard ("Wizard" menu), the LaTeX code for a tabular environment can be quickly inserted :

You can set the main features of your table.
Note : this dialog allows you to type directly the code in the cells.
The corresponding LaTeX code is automatically inserted in the editor.

2.9 Inserting a "tabbing" environment

To help you to insert a "tabbing" code, you can use the "Tabbing" wizard ("Wizard" menu) :

2.10 Inserting a picture

To insert a picture in your document, just use the "\includegraphics" command in the "LaTeX" menu. Then, click on the "browser" button in the dialog to select the graphic file.
Note : if you click on the "+" button, a "figure" LaTeX environment will be added automatically.

2.11 Cross References and notes

This toolbox in the toolbar allows you to insert quickly the label, cite, ref, footnote... code.
Note : the labels used in your documents are displayed in the "Structure View".

Additional option:for the \ref command, a dialog box allows you to select directly the label.

2.12 Inserting math formulae

You can toggle in the "in-line math" environment with the "$$" button in the toolbar (shortcut : Ctrl+Alt+M) or with the "Math" menu. The shortcut for the "display math" environment is : Alt+Shift+M.
The "Math" toolbar allows you to insert the most currents mathematical forms (frac, sqrt...)

With the "symbols panels" in the structure view, you can insert the code of 400 mathematical symbols and the \left and \right tags..(just click on the "symbols" buttons in the structure view)

Additional option: A "favorites symbols" (*) panel allows you to define your own "symbols panel".

  • To add a symbol to the "favorites symbols panel", just right-click on a symbol in the others "symbols panels" and select "Add to favorites" in the pop-up menu.
  • To remove a symbol in the "favorites symbols panel", just right-click on it and select "Remove from favorites" in the pop-up menu.

You can also define the format of your mathematical text via the "Math" menu.
For the "array" environments, a wizard (like the "Tabular" wizard) is available in the "Wizard" menu. With this wizard, you can select the environment : array, matrix, pmatrix.... The cells can be directly completed.

2.13 Using the "•" place holders

The "•" place holders, automatically inserted by some Texmaker commands, allow you to reach directly the next field in the created structure by using the "Tab" key ("Shift+Tab" to go backward).
Note : inserting a tabulation with the "Tab" key is deactivated if the line contains a "•" place holder.


0 thoughts on “Texmaker No Bibliography Page”

    -->

Leave a Comment

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