> 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/ru/ssylki-i-citirovaniya/06-natbib-citation-styles.md).

# Стили цитирования natbib

Natbib использует стиль цитирования, связанный с соответствующим [стилем библиографии](/latex/ru/ssylki-i-citirovaniya/04-bibtex-bibliography-styles.md#natbib-styles) если не заданы специальные команды цитирования. Существуют дополнительные команды для управления некоторыми параметрами пунктуации. См. пример ниже:

```latex
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

%Импортируйте пакет natbib и задайте стили библиографии и цитирования
\usepackage{natbib}
\bibliographystyle{abbrvnat}
\setcitestyle{authoryear,open={((},close={))}} %Команды, связанные с цитированием

\title{Пример Natbib}

\author{Команда Overleaf}

\begin{document}

\maketitle

\section{Первый раздел}
Этот документ — пример с двумя цитируемыми элементами: книга \textit{Компаньон \LaTeX} \cite[см.][гл. 2]{latexcompanion} и журнальная статья Эйнштейна \citep{einstein}.

%Импортирует файл библиографии "sample.bib"
\bibliography{sample}

\end{document}
```

![CitationStylesEx1Overleaf.png](/files/6e013fdd46f2464ee1ef507d38a457aed5f9585f)

Специальная команда для форматирования стиля цитирования:

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

Параметры, разделённые запятыми, указывают LaTeX использовать *authoryear* режим цитирования и использовать двойные круглые скобки в качестве открывающего и закрывающего знаков. Различные параметры, которые можно передать этой команде, следующие:

* Режим цитирования: `authoryear`, `числа` или `верхний индекс`.
* Скобки: `круглые` или `квадратные`. Вы можете вручную задать любые другие открывающие и закрывающие символы с помощью `open={char}` и `close={char}`.
* Разделитель цитат: `точка с запятой`, `запятая`.
* Разделитель между автором и годом: `aysep{char}`.
* Разделитель между годами с общим автором: `yysep={char}`.
* Текст перед дополнительной заметкой: `notesep={text}`.

Существуют и другие дополнительные команды цитирования в зависимости от режима цитирования. Например, в приведённом выше примере команда `\cite[см.][гл. 2]{latexcompanion}` принимает два дополнительных параметра; первый необязательный параметр *см.* печатается перед меткой цитирования, а второй необязательный параметр *гл. 2* печатается после метки цитирования. Ниже приведена таблица с описанием некоторых дополнительных команд цитирования:

| команда         | описание                                                             |
| --------------- | -------------------------------------------------------------------- |
| `\citet{}`      | Текстовая цитата                                                     |
| `\citep{}`      | Цитирование в скобках                                                |
| `\citet*{}`     | То же, что и `\citet` но если авторов несколько, выводятся все имена |
| `\citep*{}`     | То же, что и `\citep` но если авторов несколько, выводятся все имена |
| `\citeauthor{}` | Печатает только имя автора(ов)                                       |
| `\citeyear{}`   | Печатает только год публикации.                                      |

Для получения дополнительной информации об остальных командах в этом примере см. [Управление библиографией с помощью natbib](/latex/ru/ssylki-i-citirovaniya/02-bibliography-management-with-natbib.md)

[Откройте пример `natbib` пакета в Overleaf](https://www.overleaf.com/project/new/template/19422?id=65532643\&templateName=Natbib+citation+styles+example\&latexEngine=\&texImage=texlive-full%3A2020.1\&mainFile=)

## Дополнительное чтение

* [Управление библиографией с помощью natbib](/latex/ru/ssylki-i-citirovaniya/02-bibliography-management-with-natbib.md)
* [Стили библиографии Natbib](/latex/ru/ssylki-i-citirovaniya/05-natbib-bibliography-styles.md)
* [Документация пакета Natbib](http://mirrors.ibiblio.org/CTAN/macros/latex/contrib/natbib/natbib.pdf)
* [Поддержка международных языков](/latex/ru/yazyki/03-international-language-support.md)
* [Управление в большом проекте](/latex/ru/struktura-dokumenta/07-management-in-a-large-project.md)
* [Оглавление](/latex/ru/struktura-dokumenta/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/ru/ssylki-i-citirovaniya/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.
