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

# Помилка LaTeX: \mathrm дозволено лише в математичному режимі

Ця помилка з’являється, коли ми використовуємо шрифт у текстовому режимі, який дозволено лише в математичному режимі. Використовуючи такі шрифти, переконайтеся, що ви включаєте їх у знаки долара, як `$...$`. Щоб дізнатися більше про математичні шрифти, не соромтеся переглянути наш [документації](/latex/uk/matematika/12-mathematical-fonts.md). Нижче наведено список таких шрифтів із відповідними пакетами

|                  |                                                                                                                                                                                                                                                                                    |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \mathnormal{...} | Це стандартний курсивний шрифт у математичному курсиві. `$\mathnormal{Hello world}$` дасть такий самий результат, як `$Hello world$`.                                                                                                                                              |
| \mathrm{...}     | Це стандартний текстовий шрифт Roman.                                                                                                                                                                                                                                              |
| \mathbf{...}     | Це надає жирні літери в математичному режимі.                                                                                                                                                                                                                                      |
| \mathcal{...}    | Це спеціальний каліграфічний шрифт у математичному режимі. Його можна використовувати лише для великих літер, наприклад для позначення дійсних чисел. `\mathcal{R}` дасть ℝ.                                                                                                       |
| \mathsf{...}     | Це надає літери без засічок у математичному режимі.                                                                                                                                                                                                                                |
| \mathit{...}     | Це надасть курсивні текстові літери. Вони можуть відрізнятися від математичних курсивних літер залежно від конкретного використаного класу.                                                                                                                                        |
| \mathtt{...}     | Це надає прямі літери з шрифту друкарської машинки.                                                                                                                                                                                                                                |
| \mathbb{...}     | Це надає шрифт «blackboard bold» для великих літер. Пакет [**`amsfonts`**](https://www.ctan.org/pkg/amsfonts?lang=en) пакет або, еквівалентно, Пакет [**`amssymb`**](https://www.ctan.org/pkg/amssymb?lang=en) потрібно завантажити, щоб використовувати цей шрифт.                |
| \mathfrak{...}   | Це надає готичні літери як у верхньому, так і в нижньому регістрі. Пакет [**`amsfonts`**](https://www.ctan.org/pkg/amsfonts?lang=en) пакет або, еквівалентно, Пакет [**`amssymb`**](https://www.ctan.org/pkg/amssymb?lang=en) потрібно завантажити, щоб використовувати цей шрифт. |
| euscript         | Функція [**`euscript`**](http://tug.ctan.org/fonts/amsfonts/doc/euscript.pdf) пакет надає нам ще один каліграфічний алфавіт, який називається письмом Ойлера.                                                                                                                      |

**Текстові еквіваленти наведених вище математичних шрифтів:**

| Шрифт математичного режиму | Текстовий еквівалент                  |
| -------------------------- | ------------------------------------- |
| \mathnormal{...}           | \textit{...}.                         |
| \mathrm{...}               | \text{...}                            |
| \mathbf{...}               | \textbf{...}.                         |
| \mathcal{...}              | Не має текстового шрифту-еквівалента. |
| \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/uk/pomilki-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.
