# Latex Bibliography Style Without Brackets

Natbib uses the citation style associated with the corresponding bibliography style if no specific citation commands are declared. There are some additional commands to control some punctuation parameters. See the example below:

\documentclass{article}\usepackage[utf8]{inputenc}\usepackage[english]{babel}   %Import the natbib package and sets a bibliography and citation styles\usepackage{natbib}\bibliographystyle{abbrvnat}\setcitestyle{authoryear,open={((},close={))}}     \begin{document}   \section{First Section} This document is an example, Two items are cited: \textit{The \LaTeX\ Companion} book \cite[see][chap 2]{latexcompanion} and Einstein's journal paper \cite{einstein}.     %Imports the bibliography file "sample.bib"\bibliography{sample}   \end{document}

The specific command to format the citation style is:

The parameters, comma-separated, tell LaTeX to use the authoryear citation mode and use double parentheses as opening and closing marks. Below a list of possible parameters that can be passed to this command:

• Citation mode: , or .
• Brackets: or . You can manually set any other opening and closing characters with adn .
• Citation separator: , .
• Separator between author and year:
• Separator between years with common author: <code>yysep={char}.
• Text before post-note: .

The are other additional citation commands depending on the citation mode. For instance, in the example above the command takes two extra parameters; the first optional parameter see is printed before the citation mark and the second optional parameter chap 2 is printed after the citation mark. Below a table describing some additional citation commands:

command description
Textual citation
Parenthetical citation
Same as but if there are several authors, all names are printed
The same as but if there are several authors, all names are printed
Prints only the name of the authors(s)
Prints only the year of the publication.

For more information about the rest of the commands in this example see Bibliography management with natbib

Open an example of the natbib package in ShareLaTeX

\setcitestyle{authoryear, open={((},close={))}

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.

## 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.
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

## 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

## 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

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}

Open an example of the natbib package in ShareLaTeX

## 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
• 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
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