> 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/es/errores-de-latex/23-misplaced-alignment-tab-character.md).

# Carácter de tabulación de alineación & fuera de lugar

Este error aparece cuando el carácter de alineación '&' se usa incorrectamente. El carácter de alineación *&* se usa para alinear elementos en entornos específicos, como *matriz*, *align*, *table* etc.

## Causas comunes del error

**No escribir \\&:**

Cuando quieras usar un ampersand *&* como carácter de texto en tu escritura, por ejemplo en un título, debes escribirlo como `\&`. Si no lo haces, obtendrás un error como se muestra a continuación

```latex
La empresa se llama `Michael & Sons'
```

main.tex, línea 5

Carácter de tabulación de alineación fuera de lugar &.

l.5 La empresa se llama \`Michael & Sons' No logro entender por qué querrías usar aquí un signo de tabulación. Si solo quieres un ampersand, la solución es sencilla: simplemente escribe \`I\\&' ahora. Pero si alguna llave derecha más arriba ha terminado prematuramente una alineación anterior, probablemente te esperan más mensajes de error, y podrías probar a escribir \`S' ahora solo para ver qué se puede rescatar. \[1

Para corregir este error, cambia `&` a `\&`.

**Macro matrix utilizada en lugar de amsmath:matrix:**

En la distribución básica de LaTeX, hay una macro llamada *matriz*. Esto suele usarse incorrectamente cuando lo que realmente quieres usar es la *entorno* matriz proporcionada por el *amsmath* paquete. Si olvidas cargar el paquete amsmath y simplemente escribes

```latex
$$
\begin{matrix}
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9
\end{matrix}
$$
```

entonces aparecerá un *carácter de tabulación de alineación fuera de lugar* mensaje de error. Esto se debe a que esta no es la forma correcta de usar la *matriz* macro proporcionada por la distribución de LaTeX. Para resolver este problema, simplemente carga el *amsmath* paquete.

```latex
% En el preámbulo (antes de \begin{document})
\usepackage{amsmath}

% En tu documento

$$
\begin{matrix}
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9
\end{matrix}
$$
```

![Amsmathmacro.PNG](/files/aaa48ef3b287fc0c3cde122881794d4985b5bbb1)


---

# 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/es/errores-de-latex/23-misplaced-alignment-tab-character.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.
