> 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/loi-latex/06-extra-right.md).

# Thừa \right

Lỗi này xảy ra khi dàn trang toán học nếu lệnh \right được dùng nhưng lệnh \left tương ứng bị thiếu. Bài viết này nói về các nguyên nhân phổ biến của lỗi này và cách khắc phục.

## Giới thiệu ngắn gọn về các lệnh \left và \right

Tính năng `\left` và `\right` các lệnh này dàn trang các dấu phân cách có kích thước động và phải được dùng cùng nhau, trong phần toán học, theo dạng

$$\verb'\left'\thinspace\textit{delim}*{\thinspace\text{L}}\quad\textit{math expression}\quad \verb'\right'\thinspace\textit{delim}*{\thinspace\text{R}}$$

trong đó $$\textit{delim}*{\thinspace\text{L}}$$ và $$\textit{delim}*{\thinspace\text{R}}$$ là các dấu phân cách được dùng để bao quanh $$\textit{math expression}$$. Thông thường, $$\textit{delim}*{\thinspace\text{L}}$$ và $$\textit{delim}*{\thinspace\text{R}}$$ là một trong các ký tự `() [] | \| \{ \}` hoặc dấu chấm ‘`.`’, được dùng như một “[dấu phân cách trống](#using-a-blank-delimiter)”.

### Ví dụ

Đây là một ví dụ sử dụng `\left` và `\right` để dàn trang dấu ngoặc đơn bao trọn một phân số:

```latex
\[
  \left(\frac{x}{y} \right)
\]
```

Mã này tạo ra $$\left(\frac{x}{y}\right)$$

Nếu bạn không dùng `\left` và `\right` các lệnh khi đặt dấu phân cách, kể cả dấu ngoặc đơn, thì các dấu phân cách đó sẽ không bao trọn biểu thức toán học; ví dụ, viết

```latex
\[
  (\frac{x}{y})
\]
```

tạo ra kết quả này

$$(\frac{x}{y})$$

## Nguyên nhân của lỗi này và một số cách giải quyết

### Quên thêm một lệnh \left

Lỗi này thường phát sinh khi viết một `\right` lệnh nhưng quên thêm lệnh tương ứng `\left`, như minh họa trong ví dụ dưới đây:

```latex
\[
\pi =
( \int_{-\infty}^{+\infty} e^{-x^2} dx \right)
\]
```

[Mở **gây lỗi** ví dụ này trong Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Example+demonstrating+a+missing+delimiter\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0A%5C%5B+%0A%5Cpi+%3D+%0A%28+%5Cint_%7B-%5Cinfty%7D%5E%7B%2B%5Cinfty%7D+e%5E%7B-x%5E2%7D+dx+%5Cright%29%0A%5C%5D%0A%5Cend%7Bdocument%7D)

Ví dụ này tạo ra lỗi sau:

![Hình ảnh minh họa dấu phân cách bị thiếu trong LaTeX](/files/a2397bb6df8fc59b86bd6b4a8d106db9a71a6730)

Thêm phần bị thiếu `\left` để sửa lỗi này bằng cách viết

```latex
\[
\pi =
\left( \int_{-\infty}^{+\infty} e^{-x^2} dx \right)
\]
```

kết quả đầu ra sau đây

$$\pi = \left( \int\_{-\infty}^{+\infty} e^{-x^2} dx \right)$$

### Sử dụng dấu phân cách trống

Nếu bạn muốn dàn trang một `\right` chỉ dấu phân cách, hãy dùng một ‘`.`’ ký tự làm `\left` dấu phân cách bằng cách viết `\left.`, ký tự này không dàn trang một ký tự phân cách. Ví dụ sau sử dụng một `.` dấu phân cách trong một `aligned` môi trường do `amsmath` gói:

```latex
\documentclass{article}
\usepackage{amsmath} % Cần để sử dụng môi trường aligned

\begin{document}
\[
 \left.\begin{aligned}
        dF &= 0,\\
        d^{\dagger} F &= 0,
       \end{aligned}
\ \right\}
 \qquad \text{Phương trình Maxwell}
\]
\end{document}
```

[Mở ví dụ này trong Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Using+the+dot+delimiter\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamsmath%7D+%25+Required+to+use+the+aligned+environment%0A%0A%5Cbegin%7Bdocument%7D%0A%5C%5B%0A+%5Cleft.%5Cbegin%7Baligned%7D%0A++++++++dF+%26%3D+0%2C%5C%5C%0A++++++++d%5E%7B%5Cdagger%7D+F+%26%3D+0%2C%0A+++++++%5Cend%7Baligned%7D%0A%5C+%5Cright%5C%7D%0A+%5Cqquad+%5Ctext%7BMaxwell%27s+equations%7D%0A%5C%5D%0A%5Cend%7Bdocument%7D)

Ví dụ này dàn trang biểu thức sau:

$$\left.\begin{aligned} dF &= 0,\d^{\dagger} F &= 0,\end{aligned}\ \right}\qquad \text{Maxwell's equations}$$


---

# 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/loi-latex/06-extra-right.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.
