> 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/no/matematikk/12-mathematical-fonts.md).

# Matematiske skrifttyper

## Innledning

Noen matematiske elementer må settes med skrifttyper som inneholder tegn/symboler av en bestemt stil; for eksempel er det vanlig å representere reelle tall med en blackboard bold-skrift (som $$\mathbb{R}$$), eller topologiske rom med kalligrafisk skrift (som ($$\mathcal{T}$$ ). Denne artikkelen viser hvordan du bruker forskjellige skriftstiler når du setter matematikk, med følgende eksempel:

```latex
La \( \mathcal{T} \) være et topologisk rom, en basis er definert som
\[
 \mathcal{B} = \{B_{\alpha} \in \mathcal{T}\, |\,  U = \bigcup B_{\alpha} \forall U \in \mathcal{T} \}
\]
```

[Åpne dette eksemplet i Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Maths+typeface+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0ALet+%5C%28+%5Cmathcal%7BT%7D+%5C%29+be+a+topological+space%2C+a+basis+is+defined+as%0A%5C%5B%0A+%5Cmathcal%7BB%7D+%3D+%5C%7BB_%7B%5Calpha%7D+%5Cin+%5Cmathcal%7BT%7D%5C%2C+%7C%5C%2C++U+%3D+%5Cbigcup+B_%7B%5Calpha%7D+%5Cforall+U+%5Cin+%5Cmathcal%7BT%7D+%5C%7D%0A%5C%5D%0A%5Cend%7Bdocument%7D)

Dette eksemplet gir følgende resultat:

![Eksempel på matematiske skrifttyper](/files/2751a77b20d541aa905c6ede45618ae03bc48fe4)

Bruk av enkelte matematiske skriftstiler krever at linjen `\usepackage{amssymb}` legges til dokumentets preamble: se [`amsfonts` pakken](https://ctan.org/pkg/amsfonts) for mer informasjon.

## Skrifttyper kun for store bokstaver

Det finnes noen skrifttyper som bare støtter et begrenset antall tegn; disse skriftene betegner vanligvis noen spesielle mengder. For eksempel, for å vise R-en i blackboard bold-skrift kan du bruke `\(\mathbb{R}\)` for å produsere $$\mathbb{R}$$. Følgende eksempel viser kalligrafiske, fraktur- og blackboard bold-skrifter:

```latex
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
\begin{align*}
RQSZ \\
\mathcal{RQSZ} \\
\mathfrak{RQSZ} \\
\mathbb{RQSZ}
\end{align*}
\end{document}
```

[Åpne dette eksemplet i Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Using+different+math+fonts\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamsmath%7D%0A%5Cusepackage%7Bamssymb%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cbegin%7Balign%2A%7D%0ARQSZ+%5C%5C%0A%5Cmathcal%7BRQSZ%7D+%5C%5C%0A%5Cmathfrak%7BRQSZ%7D+%5C%5C%0A%5Cmathbb%7BRQSZ%7D%0A%5Cend%7Balign%2A%7D%0A%5Cend%7Bdocument%7D)

Dette eksemplet gir følgende resultat:

![Endre skrifttyper for matematisk setting](/files/b16dfc35d16c2f86ca5521e08daeb45852e33c30)

## Andre matematiske skrifttyper

Det er mulig å sette en annen skriftfamilie for et helt matematisk uttrykk:

```latex
\begin{align*}
3x^2 \in R \subset Q \\
\mathnormal{3x^2 \in R \subset Q} \\
\mathrm{3x^2 \in R \subset Q} \\
\mathit{3x^2 \in R \subset Q} \\
\mathbf{3x^2 \in R \subset Q} \\
\mathsf{3x^2 \in R \subset Q} \\
\mathtt{3x^2 \in R \subset Q}
\end{align*}
```

[Åpne dette eksemplet i Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Using+a+font+family+for+mathematical+expressions\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamsmath%7D%0A%5Cusepackage%7Bamssymb%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cbegin%7Balign%2A%7D%0A3x%5E2+%5Cin+R+%5Csubset+Q+%5C%5C%0A%5Cmathnormal%7B3x%5E2+%5Cin+R+%5Csubset+Q%7D+%5C%5C%0A%5Cmathrm%7B3x%5E2+%5Cin+R+%5Csubset+Q%7D+%5C%5C%0A%5Cmathit%7B3x%5E2+%5Cin+R+%5Csubset+Q%7D+%5C%5C%0A%5Cmathbf%7B3x%5E2+%5Cin+R+%5Csubset+Q%7D+%5C%5C%0A%5Cmathsf%7B3x%5E2+%5Cin+R+%5Csubset+Q%7D+%5C%5C%0A%5Cmathtt%7B3x%5E2+%5Cin+R+%5Csubset+Q%7D%0A%5Cend%7Balign%2A%7D%0A%5Cend%7Bdocument%7D)

Dette eksemplet gir følgende resultat:

![Endre skrifttyper for matematisk setting](/files/24229ff02e54fc12f1c4223de95578bdaa253ebe)

I dette tilfellet endrer ikke bare bokstaver, men alle tegn utseende; for eksempel, `$\mathit{3x^2}$` kursiverer hele uttrykket og gir $$\mathit{3x^2}$$.

## Videre lesning

For mer informasjon, se

* [`amsfonts` pakkedokumentasjon](https://ctan.org/pkg/amsfonts)
* [Matematiske uttrykk](/latex/no/matematikk/01-mathematical-expressions.md)
* [Nedsenkede og hevede tegn](/latex/no/matematikk/02-subscripts-and-superscripts.md)
* [Fet skrift, kursiv og understreking](/latex/no/grunnleggende-latex/03-bold-italics-and-underlining.md)
* [Skriftstørrelser, skriftfamilier og stiler](/latex/no/skrifter/01-font-sizes-families-and-styles.md)
* [Skrifttyper](/latex/no/skrifter/02-font-typefaces.md)
* [Tekstjustering](/latex/no/formatering/06-text-alignment.md)
* [Den ikke helt korte introduksjonen til LaTeX2ε](http://www.ctan.org/tex-archive/info/lshort/)


---

# 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/no/matematikk/12-mathematical-fonts.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.
