> 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/id/kesalahan-latex/11-latex-error-mathrm-allowed-only-in-math-mode.md).

# Kesalahan LaTeX: \mathrm hanya diperbolehkan dalam mode matematika

Kesalahan ini muncul ketika kita menggunakan font dalam mode teks yang hanya diizinkan dalam mode matematika. Saat menggunakan font seperti itu, pastikan untuk menyertakannya di dalam tanda dolar seperti `$...$`. Untuk mempelajari lebih lanjut tentang font matematika, silakan lihat [dokumentasi](/latex/id/matematika/12-mathematical-fonts.md). Daftar font seperti itu, beserta paket yang sesuai, ditampilkan di bawah

|                  |                                                                                                                                                                                                                                                                          |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| \mathnormal{...} | Ini adalah font miring standar dalam font miring matematika. `$\mathnormal{Hello world}$` akan memberikan hasil yang sama seperti `$Hello world$`.                                                                                                                       |
| \mathrm{...}     | Ini adalah font Roman teks standar.                                                                                                                                                                                                                                      |
| \mathbf{...}     | Ini menghasilkan huruf tebal dalam mode matematika.                                                                                                                                                                                                                      |
| \mathcal{...}    | Ini adalah font kaligrafi khusus dalam mode matematika. Font ini hanya dapat digunakan untuk huruf kapital, seperti untuk mengidentifikasi bilangan real. `\mathcal{R}` akan menghasilkan ℝ.                                                                             |
| \mathsf{...}     | Ini menghasilkan huruf sans serif dalam mode matematika.                                                                                                                                                                                                                 |
| \mathit{...}     | Ini akan menghasilkan huruf miring teks. Ini bisa berbeda dari huruf miring matematika tergantung pada kelas spesifik yang digunakan.                                                                                                                                    |
| \mathtt{...}     | Ini menghasilkan huruf tegak dari font tipe mesin ketik yang digunakan.                                                                                                                                                                                                  |
| \mathbb{...}     | Ini menyediakan font "blackboard bold" untuk huruf kapital. Paket [**`amsfonts`**](https://www.ctan.org/pkg/amsfonts?lang=en) paket atau, yang ekuivalen, Paket [**`amssymb`**](https://www.ctan.org/pkg/amssymb?lang=en) harus dimuat untuk menggunakan font ini.       |
| \mathfrak{...}   | Ini menyediakan huruf Gothic dalam huruf kapital dan huruf kecil. Paket [**`amsfonts`**](https://www.ctan.org/pkg/amsfonts?lang=en) paket atau, yang ekuivalen, Paket [**`amssymb`**](https://www.ctan.org/pkg/amssymb?lang=en) harus dimuat untuk menggunakan font ini. |
| euscript         | Fitur [**`euscript`**](http://tug.ctan.org/fonts/amsfonts/doc/euscript.pdf) menyediakan alfabet kaligrafi lain yang disebut Euler script.                                                                                                                                |

**Padanan teks dari font matematika di atas:**

| Font mode matematika | Padanan Teks                          |
| -------------------- | ------------------------------------- |
| \mathnormal{...}     | \textit{...}.                         |
| \mathrm{...}         | \text{...}                            |
| \mathbf{...}         | \textbf{...}.                         |
| \mathcal{...}        | Tidak ada font mode teks yang setara. |
| \mathsf{...}         | \textsf{...}.                         |


---

# 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/id/kesalahan-latex/11-latex-error-mathrm-allowed-only-in-math-mode.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.
