> 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/cau-hoi-latex/01-how-can-i-typeset-text-in-cyrillic-e.g.-in-russian.md).

# Làm thế nào để định dạng văn bản bằng chữ Kirin (ví dụ, tiếng Nga)?

## Giới thiệu

Để dàn trang văn bản Cyrillic trên Overleaf, bạn sẽ cần tải một số gói bổ sung — các gói cụ thể sẽ phụ thuộc vào trình biên dịch bạn đang dùng: pdfLaTeX, XeLaTeX, LuaLaTeX hoặc LaTeX (tức là DVI sang PDF).

## Dàn trang Cyrillic với pdfLaTeX hoặc LaTeX

Nếu bạn đang dùng pdfLaTeX hoặc LaTeX làm trình biên dịch, thì cách sau sẽ hoạt động:

```latex
\documentclass{article}
\usepackage[T2A,T1]{fontenc}
\usepackage[main=english,russian]{babel}
\begin{document}
Đây là tiếng Anh và đây là tiếng Nga: \textcyrillic{Здравствуй, мир!}
\end{document}
```

[Mở `pdfLaTeX` ví dụ trên Overleaf.](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Typesetting+Cyrillic+text\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%5BT2A%2CT1%5D%7Bfontenc%7D%0A%5Cusepackage%5Bmain%3Denglish%2Crussian%5D%7Bbabel%7D%0A%5Cbegin%7Bdocument%7D%0AThis+is+English+and+this+is+Russian%3A+%5Ctextcyrillic%7B%D0%97%D0%B4%D1%80%D0%B0%D0%B2%D1%81%D1%82%D0%B2%D1%83%D0%B9%2C+%D0%BC%D0%B8%D1%80%21%7D%0A%5Cend%7Bdocument%7D)

Ví dụ này tạo ra kết quả sau:

![Văn bản Cyrillic tiếng Nga được dàn trang trong LaTeX](/files/ff591bb8a4edabef94472a36b3aedbf216f089a7)

## Dàn trang Cyrillic với XeLaTeX hoặc LuaLaTeX

Các trình biên dịch XeLaTeX và LuaLaTeX có hỗ trợ sẵn cho văn bản mã hóa UTF-8 nên không cần dùng `\inputenc` gói (`\usepackage[utf8]{inputenc}`). Kể từ năm 2018, cũng không còn cần dùng `\usepackage[utf8]{inputenc}` với pdfLaTeX nữa—xem [số tháng 4 năm 2018 của LaTeX News](https://www.latex-project.org/news/2018/04/10/issue28-of-latex2e-news-released/) và bài đăng trên blog Overleaf [*Nâng cấp TeX Live — tháng 9 năm 2019*](https://www.overleaf.com/blog/tex-live-upgrade-september-2019).

Đối với XeLaTeX hoặc LuaLaTeX, mục [`polyglossia` gói](https://ctan.org/pkg/polyglossia?lang=en) có thể hữu ích, đặc biệt nếu bạn muốn chọn một phông chữ tùy chỉnh.

```latex
\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{russian}
\newfontfamily{\russianfont}[Script=Cyrillic]{CMU Serif}
\begin{document}
Đây là tiếng Anh và đây là tiếng Nga: \textrussian{Здравствуй, мир!}
\end{document}
```

[Mở ví dụ LuaLaTeX này trong Overleaf.](https://www.overleaf.com/docs?engine=lualatex\&snip_name=Cyrillc+text+typeset+with+LuaTeX\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bpolyglossia%7D%0A%5Csetmainlanguage%7Benglish%7D%0A%5Csetotherlanguage%7Brussian%7D%0A%5Cnewfontfamily%7B%5Crussianfont%7D%5BScript%3DCyrillic%5D%7BCMU+Serif%7D%0A%5Cbegin%7Bdocument%7D%0AThis+is+English+and+this+is+Russian%3A+%5Ctextrussian%7B%D0%97%D0%B4%D1%80%D0%B0%D0%B2%D1%81%D1%82%D0%B2%D1%83%D0%B9%2C+%D0%BC%D0%B8%D1%80%21%7D%0A%5Cend%7Bdocument%7D)

Ví dụ LuaLaTeX này cho ra đầu ra sau:

![aly=Văn bản Cyrillic được dàn trang bằng LuaLaTeX](/files/8501b12e239f2e0a5b14fc42e1a24d02b6f438fe)

## MẸO: Cách chuyển đổi trình biên dịch LaTeX

Lưu ý rằng bạn có thể chuyển trình biên dịch sang XeLaTeX hoặc LuaLaTeX bằng cách nhấp vào **Menu** nút ở góc trên bên trái và thay đổi **Bộ biên dịch** cài đặt — video ngắn sau đây sẽ cho bạn thấy cách thực hiện.

{% embed url="<https://www.filepicker.io/api/file/ikMVZIu9S6SurOfUPO34>" %}

## Một số bài viết Overleaf liên quan

* [Tiếng Nga](/latex/vi/ngon-ngu/14-russian.md)
* [Hỗ trợ ngôn ngữ quốc tế](/latex/vi/ngon-ngu/03-international-language-support.md)
* [Dàn trang đa ngôn ngữ trên Overleaf bằng polyglossia và fontspec](/latex/vi/ngon-ngu/01-multilingual-typesetting-on-overleaf-using-polyglossia-and-fontspec.md)
* [Sử dụng phông chữ với XeLaTeX](/latex/vi/phong-chu/03-xelatex.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/cau-hoi-latex/01-how-can-i-typeset-text-in-cyrillic-e.g.-in-russian.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.
