> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/references-and-citations/06-natbib-citation-styles.md).

# Natbib citation styles

Natbib uses the citation style associated with the corresponding [bibliography style](/latex/references-and-citations/04-bibtex-bibliography-styles.md#natbib-styles) if no specific citation commands are declared. There are some additional commands to control some punctuation parameters. See the example below:

```latex
\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={))}} %Citation-related commands

\title{Natbib Example}

\author{Overleaf team}

\begin{document}

\maketitle

\section{First Section}
This document is an example with two cited items: \textit{The \LaTeX\ Companion} book \cite[see][chap 2]{latexcompanion} and Einstein's journal paper \citep{einstein}.

%Imports the bibliography file "sample.bib"
\bibliography{sample}

\end{document}
```

![CitationStylesEx1Overleaf.png](/files/LAv5BYGOfLloPZkKCBUV)

The specific command to format the citation style is:

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

The parameters, comma-separated, tell LaTeX to use the *authoryear* citation mode and use double parentheses as opening and closing marks. The various parameters that can be passed to this command are the following:

* Citation mode: `authoryear`, `numbers` or `super`.
* Brackets: `round` or `square`. You can manually set any other opening and closing characters with `open={char}` adn `close={char}`.
* Citation separator: `semicolon`, `comma`.
* Separator between author and year: `aysep{char}`.
* Separator between years with common author: `yysep={char}`.
* Text before post-note: `notesep={text}`.

The are other additional citation commands depending on the citation mode. For instance, in the example above the command `\cite[see][chap 2]{latexcompanion}` 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                                                                  |
| --------------- | ---------------------------------------------------------------------------- |
| `\citet{}`      | Textual citation                                                             |
| `\citep{}`      | Parenthetical citation                                                       |
| `\citet*{}`     | Same as `\citet` but if there are several authors, all names are printed     |
| `\citep*{}`     | The same as `\citep` but if there are several authors, all names are printed |
| `\citeauthor{}` | Prints only the name of the authors(s)                                       |
| `\citeyear{}`   | Prints only the year of the publication.                                     |

For more information about the rest of the commands in this example see [Bibliography management with natbib](/latex/references-and-citations/02-bibliography-management-with-natbib.md)

[Open an example of the `natbib` package in Overleaf](https://www.overleaf.com/project/new/template/19422?id=65532643\&templateName=Natbib+citation+styles+example\&latexEngine=\&texImage=texlive-full%3A2020.1\&mainFile=)

## Further reading

* [Bibliography management with natbib](/latex/references-and-citations/02-bibliography-management-with-natbib.md)
* [Natbib bibliography styles](/latex/references-and-citations/05-natbib-bibliography-styles.md)
* [Natbib package documentation](http://mirrors.ibiblio.org/CTAN/macros/latex/contrib/natbib/natbib.pdf)
* [International language support](/latex/languages/03-international-language-support.md)
* [Management in a large project](/latex/document-structure/07-management-in-a-large-project.md)
* [Table of contents](/latex/document-structure/02-table-of-contents.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/references-and-citations/06-natbib-citation-styles.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
