> 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/es/preguntas-sobre-latex/01-how-can-i-typeset-text-in-cyrillic-e.g.-in-russian.md).

# ¿Cómo puedo componer texto en cirílico (p. ej., en ruso)?

## Introducción

Para componer texto cirílico en Overleaf, tendrás que cargar algunos paquetes adicionales; los paquetes exactos dependerán del compilador que estés usando: pdfLaTeX, XeLaTeX, LuaLaTeX o LaTeX (es decir, DVI a PDF).

## Composición tipográfica del cirílico con pdfLaTeX o LaTeX

Si estás usando pdfLaTeX o LaTeX como compilador, entonces lo siguiente funcionaría:

```latex
\documentclass{article}
\usepackage[T2A,T1]{fontenc}
\usepackage[main=english,russian]{babel}
\begin{document}
Esto es inglés y esto es ruso: \textcyrillic{Здравствуй, мир!}
\end{document}
```

[Abre este `pdfLaTeX` ejemplo en 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 ejemplo produce la siguiente salida:

![Cirílico ruso compuesto tipográficamente en LaTeX](/files/faac6e0f6dbb46d30f459bb82a35b32a68794e7f)

## Composición tipográfica del cirílico con XeLaTeX o LuaLaTeX

Los compiladores XeLaTeX y LuaLaTeX tienen compatibilidad integrada con texto codificado en UTF-8, por lo que no es necesario usar `\inputenc` paquete (`\usepackage[utf8]{inputenc}`). Desde 2018 ya no es necesario usar `\usepackage[utf8]{inputenc}` con pdfLaTeX también—consulta la [número de abril de 2018 de LaTeX News](https://www.latex-project.org/news/2018/04/10/issue28-of-latex2e-news-released/) y la entrada del blog de Overleaf [*Actualización de TeX Live — septiembre de 2019*](https://www.overleaf.com/blog/tex-live-upgrade-september-2019).

Para XeLaTeX o LuaLaTeX, el [`polyglossia` paquete](https://ctan.org/pkg/polyglossia?lang=en) puede ser útil, especialmente si quieres elegir una fuente personalizada.

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

[Abra este ejemplo de LuaLaTeX en 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 ejemplo de LuaLaTeX produce la siguiente salida:

![aly=texto cirílico compuesto tipográficamente con LuaLaTeX](/files/a2ccb66531a61c94442107c8ec787b5af2b83e6a)

## CONSEJO: Cómo cambiar de compilador de LaTeX

Ten en cuenta que puedes cambiar el compilador a XeLaTeX o LuaLaTeX haciendo clic en el **Menú** botón de la parte superior izquierda y cambiando la **Compilador** configuración; el siguiente video corto te muestra cómo hacerlo.

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

## Algunos artículos relacionados de Overleaf

* [Ruso](/latex/es/idiomas/14-russian.md)
* [Compatibilidad con idiomas internacionales](/latex/es/idiomas/03-international-language-support.md)
* [Composición multilingüe en Overleaf usando polyglossia y fontspec](/latex/es/idiomas/01-multilingual-typesetting-on-overleaf-using-polyglossia-and-fontspec.md)
* [Uso de fuentes con XeLaTeX](/latex/es/fuentes/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/es/preguntas-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.
