> 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/toan-hoc/12-mathematical-fonts.md).

# Phông chữ toán học

## Giới thiệu

Một số phần tử toán học cần được dàn trang bằng các phông chữ chứa các ký tự/ký hiệu của một kiểu nhất định; chẳng hạn, theo thông lệ, các số thực được biểu diễn bằng phông chữ đậm kiểu bảng đen (như $$\mathbb{R}$$), hoặc các không gian tô-pô bằng phông chữ kiểu thư pháp (như ($$\mathcal{T}$$). Bài viết này cho thấy cách sử dụng các kiểu phông chữ khác nhau khi dàn trang toán học, bắt đầu với ví dụ sau:

```latex
Cho \( \mathcal{T} \) là một không gian tô-pô, một cơ sở được định nghĩa là
\[
 \mathcal{B} = \{B_{\alpha} \in \mathcal{T}\, |\,  U = \bigcup B_{\alpha} \forall U \in \mathcal{T} \}
\]
```

[Mở ví dụ này trong Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Maths+typeface+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0ALet+%5C%28+%5Cmathcal%7BT%7D+%5C%29+be+a+topological+space%2C+a+basis+is+defined+as%0A%5C%5B%0A+%5Cmathcal%7BB%7D+%3D+%5C%7BB_%7B%5Calpha%7D+%5Cin+%5Cmathcal%7BT%7D%5C%2C+%7C%5C%2C++U+%3D+%5Cbigcup+B_%7B%5Calpha%7D+%5Cforall+U+%5Cin+%5Cmathcal%7BT%7D+%5C%7D%0A%5C%5D%0A%5Cend%7Bdocument%7D)

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

![Ví dụ về phông chữ toán học](/files/aeb1c8ea82bd9ddfb022efc6d19f9f0e2c9a4e50)

Việc sử dụng một số kiểu phông chữ toán học yêu cầu dòng `\usepackage{amssymb}` được thêm vào phần mở đầu tài liệu: xem [`amsfonts` gói](https://ctan.org/pkg/amsfonts) để biết thêm thông tin.

## Các kiểu phông chữ chỉ có chữ cái viết hoa

Có một số kiểu phông chữ chỉ hỗ trợ một số lượng ký tự hạn chế; những phông chữ này thường biểu diễn một số tập hợp đặc biệt. Ví dụ, để hiển thị chữ R bằng kiểu chữ đậm bảng đen, bạn có thể dùng `\(\mathbb{R}\)` để tạo ra $$\mathbb{R}$$. Ví dụ sau cho thấy các kiểu chữ thư pháp, fraktur và đậm bảng đen:

```latex
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
\begin{align*}
RQSZ \\
\mathcal{RQSZ} \\
\mathfrak{RQSZ} \\
\mathbb{RQSZ}
\end{align*}
\end{document}
```

[Mở ví dụ này trong Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Using+different+math+fonts\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamsmath%7D%0A%5Cusepackage%7Bamssymb%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cbegin%7Balign%2A%7D%0ARQSZ+%5C%5C%0A%5Cmathcal%7BRQSZ%7D+%5C%5C%0A%5Cmathfrak%7BRQSZ%7D+%5C%5C%0A%5Cmathbb%7BRQSZ%7D%0A%5Cend%7Balign%2A%7D%0A%5Cend%7Bdocument%7D)

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

![Thay đổi phông chữ khi dàn trang toán học](/files/6c1cf4db22822d26aa399aaa1661fbfc57d0d82f)

## Các phông chữ toán học khác

Có thể đặt một họ phông chữ khác cho toàn bộ một biểu thức toán học:

```latex
\begin{align*}
3x^2 \in R \subset Q \\
\mathnormal{3x^2 \in R \subset Q} \\
\mathrm{3x^2 \in R \subset Q} \\
\mathit{3x^2 \in R \subset Q} \\
\mathbf{3x^2 \in R \subset Q} \\
\mathsf{3x^2 \in R \subset Q} \\
\mathtt{3x^2 \in R \subset Q}
\end{align*}
```

[Mở ví dụ này trong Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Using+a+font+family+for+mathematical+expressions\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamsmath%7D%0A%5Cusepackage%7Bamssymb%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cbegin%7Balign%2A%7D%0A3x%5E2+%5Cin+R+%5Csubset+Q+%5C%5C%0A%5Cmathnormal%7B3x%5E2+%5Cin+R+%5Csubset+Q%7D+%5C%5C%0A%5Cmathrm%7B3x%5E2+%5Cin+R+%5Csubset+Q%7D+%5C%5C%0A%5Cmathit%7B3x%5E2+%5Cin+R+%5Csubset+Q%7D+%5C%5C%0A%5Cmathbf%7B3x%5E2+%5Cin+R+%5Csubset+Q%7D+%5C%5C%0A%5Cmathsf%7B3x%5E2+%5Cin+R+%5Csubset+Q%7D+%5C%5C%0A%5Cmathtt%7B3x%5E2+%5Cin+R+%5Csubset+Q%7D%0A%5Cend%7Balign%2A%7D%0A%5Cend%7Bdocument%7D)

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

![Thay đổi phông chữ khi dàn trang toán học](/files/266a56d382c470712d32a5045e3511f6dd8e8178)

Trong trường hợp này, không chỉ các chữ cái mà tất cả các ký tự đều thay đổi hình dạng; ví dụ, `$\mathit{3x^2}$` sẽ nghiêng toàn bộ biểu thức để tạo ra $$\mathit{3x^2}$$.

## Đọc thêm

Để biết thêm thông tin, xem

* [`amsfonts` tài liệu gói](https://ctan.org/pkg/amsfonts)
* [Biểu thức toán học](/latex/vi/toan-hoc/01-mathematical-expressions.md)
* [Chỉ số dưới và chỉ số trên](/latex/vi/toan-hoc/02-subscripts-and-superscripts.md)
* [In đậm, in nghiêng và gạch chân](/latex/vi/kien-thuc-co-ban-ve-latex/03-bold-italics-and-underlining.md)
* [Kích thước phông chữ, họ phông và kiểu chữ](/latex/vi/phong-chu/01-font-sizes-families-and-styles.md)
* [Kiểu chữ](/latex/vi/phong-chu/02-font-typefaces.md)
* [Căn chỉnh văn bản](/latex/vi/dinh-dang/06-text-alignment.md)
* [Phần giới thiệu về LaTeX2ε không quá ngắn](http://www.ctan.org/tex-archive/info/lshort/)


---

# 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/toan-hoc/12-mathematical-fonts.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.
