> For the complete documentation index, see [llms.txt](https://ayakaleaf-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://ayakaleaf-pro.ayaka.space/latex/overleaf-learn-latex-pt/questoes-sobre-latex/01-how-can-i-typeset-text-in-cyrillic-e.g.-in-russian.md).

# Como posso compor texto em cirílico (por exemplo, em russo)?

## Introdução

Para compor texto cirílico no Overleaf, você precisará carregar alguns pacotes extras — os pacotes exatos dependerão do compilador que você estiver usando: pdfLaTeX, XeLaTeX, LuaLaTeX ou LaTeX (isto é, DVI para PDF).

## Composição tipográfica de cirílico com pdfLaTeX ou LaTeX

Se você estiver usando pdfLaTeX ou LaTeX como compilador, então o seguinte funcionará:

```latex
\documentclass{article}
\usepackage[T2A,T1]{fontenc}
\usepackage[main=english,russian]{babel}
\begin{document}
Isto é inglês e isto é russo: \textcyrillic{Здравствуй, мир!}
\end{document}
```

[Abra este `pdfLaTeX` exemplo no Overleaf.](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Typesetting+Cyrillic+text\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%5BT2A%2CT1%5D%7Bfontenc%7D%0A%5Cusepackage%5Bmain%3Denglish%2Crussian%5D%7Bbabel%7D%0A%5Cbegin%7Bdocument%7D%0AThis+is+English+and+this+is+Russian%3A+%5Ctextcyrillic%7B%D0%97%D0%B4%D1%80%D0%B0%D0%B2%D1%81%D1%82%D0%B2%D1%83%D0%B9%2C+%D0%BC%D0%B8%D1%80%21%7D%0A%5Cend%7Bdocument%7D)

Este exemplo produz a seguinte saída:

![Cirílicos russos compostos em LaTeX](/files/a1815cf5562a761cdbfb21a5c8f85643275a98be)

## Composição tipográfica de cirílico com XeLaTeX ou LuaLaTeX

Os compiladores XeLaTeX e LuaLaTeX têm suporte integrado para texto codificado em UTF-8, portanto não há necessidade de usar o `\inputenc` pacote (`\usepackage[utf8]{inputenc}`). Desde 2018, não há necessidade de usar `\usepackage[utf8]{inputenc}` com pdfLaTeX também — veja o [edição de abril de 2018 do LaTeX News](https://www.latex-project.org/news/2018/04/10/issue28-of-latex2e-news-released/) e a publicação no blog do Overleaf [*atualização do TeX Live — setembro de 2019*](https://www.overleaf.com/blog/tex-live-upgrade-september-2019).

Para XeLaTeX ou LuaLaTeX, o [`polyglossia` pacote](https://ctan.org/pkg/polyglossia?lang=en) pode ser útil, especialmente se você quiser escolher uma fonte personalizada.

```latex
\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{russian}
\newfontfamily{\russianfont}[Script=Cyrillic]{CMU Serif}
\begin{document}
Isto é inglês e isto é russo: \textrussian{Здравствуй, мир!}
\end{document}
```

[Abra este exemplo LuaLaTeX no Overleaf.](https://www.overleaf.com/docs?engine=lualatex\&snip_name=Cyrillc+text+typeset+with+LuaTeX\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bpolyglossia%7D%0A%5Csetmainlanguage%7Benglish%7D%0A%5Csetotherlanguage%7Brussian%7D%0A%5Cnewfontfamily%7B%5Crussianfont%7D%5BScript%3DCyrillic%5D%7BCMU+Serif%7D%0A%5Cbegin%7Bdocument%7D%0AThis+is+English+and+this+is+Russian%3A+%5Ctextrussian%7B%D0%97%D0%B4%D1%80%D0%B0%D0%B2%D1%81%D1%82%D0%B2%D1%83%D0%B9%2C+%D0%BC%D0%B8%D1%80%21%7D%0A%5Cend%7Bdocument%7D)

Este exemplo em LuaLaTeX produz a seguinte saída:

![aly=Texto cirílico composto com LuaLaTeX](/files/0aa2ae4eba00547196badc4b9aca19ccf1825067)

## DICA: Como trocar os compiladores LaTeX

Observe que você pode trocar o compilador para XeLaTeX ou LuaLaTeX clicando no **Menu** botão no canto superior esquerdo e alterando a **Compilador** configuração — o seguinte vídeo curto mostra como fazer isso.

{% embed url="<https://www.filepicker.io/api/file/ikMVZIu9S6SurOfUPO34>" %}

## Alguns artigos relacionados do Overleaf

* [Russo](/latex/overleaf-learn-latex-pt/idiomas/14-russian.md)
* [Suporte a línguas internacionais](/latex/overleaf-learn-latex-pt/idiomas/03-international-language-support.md)
* [Composição tipográfica multilíngue no Overleaf usando polyglossia e fontspec](/latex/overleaf-learn-latex-pt/idiomas/01-multilingual-typesetting-on-overleaf-using-polyglossia-and-fontspec.md)
* [Usando fontes com XeLaTeX](/latex/overleaf-learn-latex-pt/fontes/03-xelatex.md)


---

# 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://ayakaleaf-pro.ayaka.space/latex/overleaf-learn-latex-pt/questoes-sobre-latex/01-how-can-i-typeset-text-in-cyrillic-e.g.-in-russian.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.
