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

# LaTeX-fejl: \mathrm kun tilladt i matematiktilstand

Denne fejl vises, når vi bruger en skrifttype i teksttilstand, som kun er tilladt i matematiktilstand. Når du bruger sådanne skrifttyper, skal du sørge for at inkludere dem inden i dollartegn som `$...$`. For at lære mere om matematiske skrifttyper er du velkommen til at se vores [dokumentationen](/latex/da/matematik/12-mathematical-fonts.md). En liste over sådanne skrifttyper med deres tilhørende pakker vises nedenfor

|                  |                                                                                                                                                                                                                                                                        |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \mathnormal{...} | Dette er standardskriften i kursiv i matematiktilstand. `$\mathnormal{Hello world}$` vil give samme resultat som `$Hello world$`.                                                                                                                                      |
| \mathrm{...}     | Dette er den standard tekst-Roman-skrift.                                                                                                                                                                                                                              |
| \mathbf{...}     | Dette giver fede bogstaver i matematiktilstand.                                                                                                                                                                                                                        |
| \mathcal{...}    | Dette er en særlig kalligrafisk skrifttype i matematiktilstand. Den kan kun bruges til store bogstaver, for eksempel til at betegne de reelle tal. `\mathcal{R}` vil give ℝ.                                                                                           |
| \mathsf{...}     | Dette giver sans serif-bogstaver i matematiktilstand.                                                                                                                                                                                                                  |
| \mathit{...}     | Dette vil give kursiverede tekstbogstaver. Disse kan være forskellige fra matematiske kursiverede bogstaver afhængigt af den specifikke klasse, der bruges.                                                                                                            |
| \mathtt{...}     | Dette giver opretstående bogstaver fra den anvendte skrivemaskineskrift.                                                                                                                                                                                               |
| \mathbb{...}     | Dette giver en "blackboard bold"-skrift til store bogstaver. Pakken [**`amsfonts`**](https://www.ctan.org/pkg/amsfonts?lang=en) pakken eller tilsvarende [**`amssymb`**](https://www.ctan.org/pkg/amssymb?lang=en) pakken skal indlæses for at bruge denne skrifttype. |
| \mathfrak{...}   | Dette giver gotiske bogstaver i både store og små bogstaver. Pakken [**`amsfonts`**](https://www.ctan.org/pkg/amsfonts?lang=en) pakken eller tilsvarende [**`amssymb`**](https://www.ctan.org/pkg/amssymb?lang=en) pakken skal indlæses for at bruge denne skrifttype. |
| euscript         | Den [**`euscript`**](http://tug.ctan.org/fonts/amsfonts/doc/euscript.pdf) pakken giver os et andet kalligrafisk alfabet kaldet Euler-skrift.                                                                                                                           |

**Tekstækvivalenter til ovenstående matematiske skrifttyper:**

| Matematisk tilstand-skrifttype | Tekstækvivalent                               |
| ------------------------------ | --------------------------------------------- |
| \mathnormal{...}               | \textit{...}.                                 |
| \mathrm{...}                   | \text{...}                                    |
| \mathbf{...}                   | \textbf{...}.                                 |
| \mathcal{...}                  | Ingen tilsvarende skrifttype i teksttilstand. |
| \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/da/latex-fejl/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.
