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

# Fontes matemáticas

## Introdução

Alguns elementos matemáticos precisam ser compostos usando fontes que contenham caracteres/símbolos de um certo estilo; por exemplo, é costume representar os números reais com uma fonte blackboard bold (como $$\mathbb{R}$$), ou espaços topológicos com fonte caligráfica (como ($$\mathcal{T}$$). Este artigo mostra como usar diferentes estilos de fonte ao compor matemática, começando com o seguinte exemplo:

```latex
Seja \( \mathcal{T} \) um espaço topológico; uma base é definida como
\[
 \mathcal{B} = \{B_{\alpha} \in \mathcal{T}\, |\,  U = \bigcup B_{\alpha} \forall U \in \mathcal{T} \}
\]
```

[Abra este exemplo no 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)

Este exemplo produz a seguinte saída:

![Exemplo de fontes matemáticas](/files/b7fd0050f2bc446f9d835b7ee4d67b0a09afffe6)

O uso de alguns estilos de fonte matemática requer que a linha `\usepackage{amssymb}` seja adicionada ao preâmbulo do documento: veja o [`amsfonts` pacote](https://ctan.org/pkg/amsfonts) para mais informações.

## Tipos de letra apenas com letras maiúsculas

Há alguns tipos de letra que suportam apenas um número limitado de caracteres; essas fontes geralmente denotam alguns conjuntos especiais. Por exemplo, para apresentar o R em estilo blackboard bold, pode usar `\(\mathbb{R}\)` para produzir $$\mathbb{R}$$. O exemplo seguinte mostra tipos de letra caligráficos, fraktur e blackboard bold:

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

[Abra este exemplo no 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)

Este exemplo produz a seguinte saída:

![Alterar fontes para compor matemática](/files/21acdf2e24f007d0f3edeace7f0bc863fda7f2ea)

## Outras fontes matemáticas

É possível definir uma família de fontes diferente para uma expressão matemática completa:

```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*}
```

[Abra este exemplo no 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)

Este exemplo produz a seguinte saída:

![Alterar fontes para compor matemática](/files/4377911506e63d88f104249d5ec1e7b31f69c1f2)

Neste caso, não só as letras mas todos os caracteres mudam de aparência; por exemplo, `$\mathit{3x^2}$` coloca toda a expressão em itálico para produzir $$\mathit{3x^2}$$.

## Leitura adicional

Para mais informações, veja

* [`amsfonts` documentação do pacote](https://ctan.org/pkg/amsfonts)
* [Expressões matemáticas](/latex/overleaf-learn-latex-pt/matematica/01-mathematical-expressions.md)
* [Subscritos e sobrescritos](/latex/overleaf-learn-latex-pt/matematica/02-subscripts-and-superscripts.md)
* [Negrito, itálico e sublinhado](/latex/overleaf-learn-latex-pt/nocoes-basicas-de-latex/03-bold-italics-and-underlining.md)
* [Tamanhos, famílias e estilos de fonte](/latex/overleaf-learn-latex-pt/fontes/01-font-sizes-families-and-styles.md)
* [Tipos de letra](/latex/overleaf-learn-latex-pt/fontes/02-font-typefaces.md)
* [Alinhamento do texto](/latex/overleaf-learn-latex-pt/formatacao/06-text-alignment.md)
* [A introdução não tão curta ao 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/overleaf-learn-latex-pt/matematica/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.
