> 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/uk/pomilki-latex/22-misplaced-noalign.md).

# Неправильно розміщений \noalign

Ця помилка з’являється, коли ви використали **`\hline`** неправильно.

## Поширені причини

**Використання \hline поза таблицею:**

Функція **`\hline`** команду можна використовувати лише всередині **`tabular`** середовища. Ви не можете використовувати її для вставлення горизонтальних ліній в інших місцях документів, наприклад на титульних сторінках або в колонтитулах. Прикладом цієї помилки є:

```latex
%У преамбулі
\title{Про загальну молекулярну теорію теплоти}
\author{А. Ейнштейн}

% У тілі вашого документа
\maketitle

\hline
```

Це згенерує помилку, показану нижче

main.tex, рядок 5

Невідповідно розташований \noalign.

\hline ->\noalign {\ifnum 0=\`}\fi \hrule \\@height \arrayrulewidth \futurelet... l.10 \hline Я очікую побачити \noalign лише після \cr у вирівнюванні. Продовжуйте, і я проігнорую цей випадок.

Коли ви хочете вставити горизонтальні лінії поза середовищем tabular, ви повинні використовувати **`\hrule`**.

**Використання \hline неправильно в таблиці:**

Під час використання **`\hline`** у таблиці кожному випадку, окрім першого, має передувати **`\\`**. Приклад цієї помилки наведено нижче

```latex
\begin{tabular}{|l|l|} \hline
    Ім'я: & Альберт \\ \hline
    Прізвище: & Ейнштейн \hline
\end{tabular}
```

Перший **`\hline`** команда тут цілком допустима, оскільки перша **`\hline`** у таблиці не потрібно передувати **`\\`**. Проблема в нашому останньому **`\hline`** якому потрібно передувати **`\\`**. Правильний спосіб записати цю таблицю:

```latex
\begin{tabular}{|l|l|} \hline
    Ім'я: & Альберт \\ \hline
    Прізвище: & Ейнштейн \\ \hline
\end{tabular}
```

![Table.PNG](/files/9cb7b2abb49c303e03435f6f64841c1198b74651)


---

# 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/uk/pomilki-latex/22-misplaced-noalign.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.
