> 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/vi/tai-lieu-tham-khao-va-trich-dan/06-natbib-citation-styles.md).

# Các kiểu trích dẫn của Natbib

Natbib sử dụng kiểu trích dẫn gắn với [kiểu thư mục](/latex/vi/tai-lieu-tham-khao-va-trich-dan/04-bibtex-bibliography-styles.md#natbib-styles) nếu không có lệnh trích dẫn cụ thể nào được khai báo. Có một số lệnh bổ sung để điều khiển một số tham số dấu câu. Xem ví dụ dưới đây:

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

%Nhập gói natbib và đặt kiểu thư mục và kiểu trích dẫn
\usepackage{natbib}
\bibliographystyle{abbrvnat}
\setcitestyle{authoryear,open={((},close={))}} %Các lệnh liên quan đến trích dẫn

\title{Ví dụ Natbib}

\author{Nhóm Overleaf}

\begin{document}

\maketitle

\section{Phần đầu tiên}
Tài liệu này là một ví dụ với hai mục được trích dẫn: cuốn sách \textit{The \LaTeX\ Companion} \cite[see][chap 2]{latexcompanion} và bài báo tạp chí của Einstein \citep{einstein}.

%Nhập tệp thư mục "sample.bib"
\bibliography{sample}

\end{document}
```

![CitationStylesEx1Overleaf.png](/files/34e457127161e4f46b62224d66a04f5e728196be)

Lệnh cụ thể để định dạng kiểu trích dẫn là:

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

Các tham số, được phân tách bằng dấu phẩy, cho LaTeX biết sử dụng *authoryear* chế độ trích dẫn và dùng dấu ngoặc tròn đôi làm dấu mở và dấu đóng. Các tham số khác nhau có thể truyền cho lệnh này như sau:

* Chế độ trích dẫn: `authoryear`, `số dòng` hoặc `siêu`.
* Dấu ngoặc: `tròn` hoặc `vuông`. Bạn có thể đặt thủ công bất kỳ ký tự mở và đóng nào khác với `open={char}` và `close={char}`.
* Dấu phân tách trích dẫn: `chấm phẩy`, `dấu phẩy`.
* Dấu phân tách giữa tác giả và năm: `aysep{char}`.
* Dấu phân tách giữa các năm với cùng tác giả: `yysep={char}`.
* Văn bản trước ghi chú sau: `notesep={text}`.

Có những lệnh trích dẫn bổ sung khác tùy theo chế độ trích dẫn. Ví dụ, trong ví dụ trên, lệnh `\cite[see][chap 2]{latexcompanion}` nhận hai tham số bổ sung; tham số tùy chọn thứ nhất *xem* được in trước dấu trích dẫn và tham số tùy chọn thứ hai *chương 2* được in sau dấu trích dẫn. Dưới đây là bảng mô tả một số lệnh trích dẫn bổ sung:

| lệnh            | mô tả                                                                       |
| --------------- | --------------------------------------------------------------------------- |
| `\citet{}`      | Trích dẫn theo văn bản                                                      |
| `\citep{}`      | Trích dẫn trong ngoặc                                                       |
| `\citet*{}`     | Giống như `\citet` nhưng nếu có nhiều tác giả, tất cả tên đều được in ra    |
| `\citep*{}`     | Tương tự như `\citep` nhưng nếu có nhiều tác giả, tất cả tên đều được in ra |
| `\citeauthor{}` | Chỉ in tên của tác giả                                                      |
| `\citeyear{}`   | Chỉ in năm xuất bản.                                                        |

Để biết thêm thông tin về các lệnh còn lại trong ví dụ này, xem [Quản lý thư mục tham khảo với natbib](/latex/vi/tai-lieu-tham-khao-va-trich-dan/02-bibliography-management-with-natbib.md)

[Mở một ví dụ của `natbib` gói này trong Overleaf](https://www.overleaf.com/project/new/template/19422?id=65532643\&templateName=Natbib+citation+styles+example\&latexEngine=\&texImage=texlive-full%3A2020.1\&mainFile=)

## Đọc thêm

* [Quản lý thư mục tham khảo với natbib](/latex/vi/tai-lieu-tham-khao-va-trich-dan/02-bibliography-management-with-natbib.md)
* [Kiểu thư mục Natbib](/latex/vi/tai-lieu-tham-khao-va-trich-dan/05-natbib-bibliography-styles.md)
* [Tài liệu gói Natbib](http://mirrors.ibiblio.org/CTAN/macros/latex/contrib/natbib/natbib.pdf)
* [Hỗ trợ ngôn ngữ quốc tế](/latex/vi/ngon-ngu/03-international-language-support.md)
* [Quản lý trong một dự án lớn](/latex/vi/cau-truc-tai-lieu/07-management-in-a-large-project.md)
* [Mục lục](/latex/vi/cau-truc-tai-lieu/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/vi/tai-lieu-tham-khao-va-trich-dan/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.
