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

# Väärin sijoitettu \noalign

Tämä virhe ilmenee, kun olet käyttänyt **`\hline`** väärin.

## Yleiset syyt

**\hline-komennon käyttäminen taulukon ulkopuolella:**

Se **`\hline`** komentoa voidaan käyttää vain **`tabular`** ympäristössä. Et voi käyttää sitä vaakaviivojen lisäämiseen muualla asiakirjoissa, kuten nimisivuilla tai ylä- ja alatunnisteissa. Esimerkki tästä virheestä on:

```latex
%Esipuheessasi
\title{Yleisestä molekyylilämmön teoriasta}
\author{A. Einstein}

% Asiakirjasi rungossa
\maketitle

\hline
```

Tämä tuottaa alla näkyvän virheen

main.tex, rivi 5

Väärin sijoitettu \noalign.

\hline ->\noalign {\ifnum 0=\`}\fi \hrule \\@height \arrayrulewidth \futurelet... l.10 \hline Odotan näkeväni \noalign-komennon vain kohdistuksen \cr-komennon jälkeen. Jatka, niin jätän tämän tapauksen huomiotta.

Kun haluat lisätä vaakaviivoja tabular-ympäristön ulkopuolelle, sinun on käytettävä **`\hrule`**.

**\hline-komennon käyttäminen väärin taulukossa:**

voit käyttää **`\hline`** taulukossa jokaista esiintymää, ensimmäistä lukuun ottamatta, täytyy edeltää **`\\`**. Esimerkki tästä virheestä näkyy alla

```latex
\begin{tabular}{|l|l|} \hline
    Etunimi: & Albert \\ \hline
    Sukunimi: & Einstein \hline
\end{tabular}
```

Ensimmäinen **`\hline`** komento tässä on kunnossa, sillä ensimmäinen **`\hline`** taulukossa ei tarvitse olla edeltämässä **`\\`**. Ongelma on viimeinen **`\hline`** jonka edellä täytyy olla **`\\`**. Oikea tapa kirjoittaa tämä taulukko on:

```latex
\begin{tabular}{|l|l|} \hline
    Etunimi: & Albert \\ \hline
    Sukunimi: & Einstein \\ \hline
\end{tabular}
```

![Taulukko.PNG](/files/5e6c0050318ea17ea0725d994f25359940223731)


---

# 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/fi/latex-virheet/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.
