> 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/overleaf-learn-latex-pt/erros-do-latex/11-latex-error-mathrm-allowed-only-in-math-mode.md).

# Erro LaTeX: \mathrm permitido apenas no modo matemático

Este erro aparece quando usamos uma fonte em modo de texto que só é permitida em modo matemático. Ao usar essas fontes, certifique-se de incluí-las entre sinais de dólar, como `$...$`. Para saber mais sobre fontes matemáticas, sinta-se à vontade para consultar o nosso [documentação](/latex/overleaf-learn-latex-pt/matematica/12-mathematical-fonts.md). Uma lista dessas fontes, com os respetivos pacotes, é apresentada abaixo

|                  |                                                                                                                                                                                                                                                                             |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \mathnormal{...} | Esta é a fonte itálica padrão em matemática. `$\mathnormal{Hello world}$` dará o mesmo resultado que `$Hello world$`.                                                                                                                                                       |
| \mathrm{...}     | Esta é a fonte romana padrão de texto.                                                                                                                                                                                                                                      |
| \mathbf{...}     | Isto produz letras em negrito em modo matemático.                                                                                                                                                                                                                           |
| \mathcal{...}    | Esta é uma fonte caligráfica especial em modo matemático. Só pode ser usada para letras maiúsculas, como para identificar números reais. `\mathcal{R}` dará ℝ.                                                                                                              |
| \mathsf{...}     | Isto produz letras sem serifa em modo matemático.                                                                                                                                                                                                                           |
| \mathit{...}     | Isto produzirá letras itálicas de texto. Estas podem ser diferentes das letras itálicas matemáticas, dependendo da classe específica usada.                                                                                                                                 |
| \mathtt{...}     | Isto produz letras em estilo reto da fonte de máquina de escrever utilizada.                                                                                                                                                                                                |
| \mathbb{...}     | Isto fornece uma fonte "blackboard bold" para letras maiúsculas. O [**`amsfonts`**](https://www.ctan.org/pkg/amsfonts?lang=en) pacote ou, de forma equivalente, o [**`amssymb`**](https://www.ctan.org/pkg/amssymb?lang=en) pacote deve ser carregado para usar esta fonte. |
| \mathfrak{...}   | Isto fornece letras góticas em maiúsculas e minúsculas. O [**`amsfonts`**](https://www.ctan.org/pkg/amsfonts?lang=en) pacote ou, de forma equivalente, o [**`amssymb`**](https://www.ctan.org/pkg/amssymb?lang=en) pacote deve ser carregado para usar esta fonte.          |
| euscript         | O [**`euscript`**](http://tug.ctan.org/fonts/amsfonts/doc/euscript.pdf) pacote fornece-nos outro alfabeto caligráfico chamado Euler script.                                                                                                                                 |

**Equivalentes em texto das fontes matemáticas acima:**

| Fonte do modo matemático | Equivalente de texto                       |
| ------------------------ | ------------------------------------------ |
| \mathnormal{...}         | \textit{...}.                              |
| \mathrm{...}             | \text{...}                                 |
| \mathbf{...}             | \textbf{...}.                              |
| \mathcal{...}            | Não há fonte equivalente em modo de texto. |
| \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/overleaf-learn-latex-pt/erros-do-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.
