> 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-and-tra-loi/09-does-overleaf-support-ptex.md).

# Overleaf có hỗ trợ pTeX không?

Có, Overleaf có thể biên dịch các tài liệu tiếng Nhật yêu cầu pTeX. Cách làm như sau:

1. Một tài liệu pTeX không cần các lệnh đặc biệt cho văn bản tiếng Nhật (kanji, hiragana và katakana). Đây là một ví dụ đơn giản (sử dụng `jsarticle` lớp tài liệu):

   ```latex
   \documentclass{jsarticle}

   \bibliographystyle{jplain}
   \title{p\LaTeX\ thử nghiệm}
   \author{林蓮枝}

   \begin{document}

   \maketitle

   \begin{abstract}
   Trong bài viết này, chúng tôi sẽ giải thích cách sử dụng hệ thống dàn trang tài liệu p\LaTeX{}. Khi sử dụng p\LaTeX{}, trước hết hãy trộn lẫn trong văn bản các chỉ thị dàn trang gọi là lệnh \TeX{}\ldots
   \end{abstract}

   \section{Giới thiệu}
   Xin chào thế giới！

   \end{document}
   ```
2. Nếu bạn tải lên một tệp .tex từ nơi khác, hãy đảm bảo rằng nó được lưu với mã hóa UTF-8.
3. Trong trình soạn thảo Overleaf, nhấp vào nút menu Overleaf ở phía trên bảng danh sách tệp.
4. Đặt tùy chọn "Compiler" thành "LaTeX".
5. Thêm một tệp trống vào dự án của bạn và lưu nó với tên `latexmkrc`.
6. Thêm dòng sau vào `latexmkrc` tệp:

```
$latex = 'platex';
$bibtex = 'pbibtex';
$dvipdf = 'dvipdfmx %O -o %D %S';
```

Hãy dùng liên kết bên dưới đoạn mã sau để mở một dự án Overleaf tạo ra một `latexmkrc` tệp phù hợp và dàn trang mã LaTeX.

**`main.tex`**

```latex
\documentclass{jsarticle}

\bibliographystyle{jplain}
\title{p\LaTeX\ thử nghiệm}
\author{林蓮枝}

\begin{document}

\maketitle

\begin{abstract}
Trong bài viết này, chúng tôi sẽ giải thích cách sử dụng hệ thống dàn trang tài liệu p\LaTeX{}. Khi sử dụng p\LaTeX{}, trước hết hãy trộn lẫn trong văn bản các chỉ thị dàn trang gọi là lệnh \TeX{}\ldots
\end{abstract}

\section{Giới thiệu}
Xin chào thế giới！

\end{document}
```

**`latexmkrc`**

```latex
$latex = 'platex';
$bibtex = 'pbibtex';
$dvipdf = 'dvipdfmx %O -o %D %S';
```

[Mở ví dụ này trong Overleaf.](https://www.overleaf.com/docs?engine=latex_dvipdf\&snip_name\[]=main.tex\&snip\[]=%5Cdocumentclass%7Bjsarticle%7D%0A%0A%5Cbibliographystyle%7Bjplain%7D%0A%5Ctitle%7Bp%5CLaTeX%5C+%E5%AE%9F%E9%A8%93%7D%0A%5Cauthor%7B%E6%9E%97%E8%93%AE%E6%9E%9D%7D%0A%0A%5Cbegin%7Bdocument%7D%0A%0A%5Cmaketitle%0A%0A%5Cbegin%7Babstract%7D%0A%E6%9C%AC%E7%A8%BF%E3%81%A7%E3%81%AF%E3%80%81%E6%96%87%E6%9B%B8%E7%B5%84%E7%89%88%E3%82%B7%E3%82%B9%E3%83%86%E3%83%A0p%5CLaTeX%7B%7D%E3%81%AE%E4%BD%BF%E3%81%84%E6%96%B9%E3%82%92%E8%A7%A3%E8%AA%AC%E3%81%97%E3%81%BE%E3%81%99%E3%80%82p%5CLaTeX%7B%7D%E3%82%92%E5%88%A9%E7%94%A8%E3%81%99%E3%82%8B%E3%81%A8%E3%81%8D%E3%81%AB%E3%81%AF%E3%80%81%E3%81%82%E3%82%89%E3%81%8B%E3%81%98%E3%82%81%E6%96%87%E7%AB%A0%E4%B8%AD%E3%81%AB%5CTeX%7B%7D%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%81%A8%E5%91%BC%E3%81%B0%E3%82%8C%E3%82%8B%E7%B5%84%E7%89%88%E7%94%A8%E3%81%AE%E6%8C%87%E7%A4%BA%E3%82%92%E6%B7%B7%E5%9C%A8%E3%81%95%E3%81%9B%5Cldots%0A%5Cend%7Babstract%7D%0A%0A%5Csection%7B%E5%B0%8E%E5%85%A5%7D%0A%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF%E4%B8%96%E7%95%8C%EF%BC%81%0A%0A%5Cend%7Bdocument%7D\&snip_name\[]=latexmkrc\&snip\[]=%24latex+%3D+%27platex%27%3B%0A%24bibtex+%3D+%27pbibtex%27%3B%0A%24dvipdf+%3D+%27dvipdfmx+%25O+-o+%25D+%25S%27%3B\&main_document=main.tex)

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

![Dàn trang văn bản tiếng Nhật bằng platex trên Overleaf](/files/c4cfbc0e7f2fef70af097e8f7d4a692b46d4740e)

Xem thêm:

* Trang trợ giúp của Overleaf [dành riêng cho việc dàn trang tiếng Nhật](/latex/vi/ngon-ngu/11-japanese.md).
* Bài [bài đăng trên blog](http://doratex.hatenablog.jp/entry/20180503/1525338512) (bằng tiếng Nhật) của [doraTeX](http://doratex.hatenablog.jp/about) có thêm chi tiết về cách sử dụng pTeX và upLaTeX trên Overleaf.


---

# 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-and-tra-loi/09-does-overleaf-support-ptex.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.
