> ## Documentation Index
> Fetch the complete documentation index at: https://resources.latex-cloud-studio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# LaTeX Paragraphs and New Lines: Blank Lines, \\, and \newline

> Learn how paragraphs and new lines work in LaTeX. Use blank lines for paragraphs, `\\` or `\newline` for manual breaks, and control indentation cleanly.

To start a new paragraph in LaTeX, leave a blank line in your source file. To force a manual line break inside the same paragraph, use `\\` or `\newline`. LaTeX handles normal line wrapping automatically, so most formatting problems on this topic come from confusing paragraphs with manual line breaks.

<Info>
  **Key concept**: LaTeX decides line breaks for you to create optimal text flow. You control paragraph breaks, and LaTeX handles the rest.
</Info>

## How LaTeX Handles Paragraphs

### Creating Paragraphs

In LaTeX, a blank line creates a new paragraph:

<Tabs>
  <Tab title="Code">
    <CodeGroup>
      ```latex paragraphs.tex theme={null}
      \documentclass{article}
      \begin{document}

      This is the first paragraph. It can span multiple lines in your source file, but LaTeX will format it as one continuous paragraph in the output.

      This is the second paragraph. Notice the blank line above - that's what tells LaTeX to start a new paragraph. LaTeX automatically indents the first line.

      \end{document}
      ```
    </CodeGroup>
  </Tab>

  <Tab title="Rendered output">
    <div className="latex-preview-shell">
      <div className="latex-preview-paper latex-preview-paper--narrow">
        <p className="latex-preview-paragraph">
          This is the first paragraph. It can span multiple lines in your source
          file, but LaTeX will format it as one continuous paragraph in the
          output.
        </p>

        <p className="latex-preview-paragraph latex-preview-indent">
          This is the second paragraph. Notice the blank line above - that's what
          tells LaTeX to start a new paragraph. LaTeX automatically indents the
          first line.
        </p>
      </div>
    </div>
  </Tab>
</Tabs>

### Multiple Spaces and Line Breaks

LaTeX treats multiple spaces as one and ignores single line breaks:

<Tabs>
  <Tab title="Code">
    <CodeGroup>
      ```latex spacing.tex theme={null}
      This    has    multiple    spaces.
      This is on
      multiple lines
      in the source.

      This is a new paragraph.
      ```
    </CodeGroup>
  </Tab>

  <Tab title="Rendered output">
    <div className="latex-preview-shell">
      <div className="latex-preview-paper latex-preview-paper--narrow">
        <p className="latex-preview-paragraph">
          This has multiple spaces. This is on multiple lines in the source.
        </p>

        <p className="latex-preview-paragraph latex-preview-indent">
          This is a new paragraph.
        </p>
      </div>
    </div>
  </Tab>
</Tabs>

<Tip>
  LaTeX ignores extra whitespace to give you flexibility in formatting your source code without affecting the output.
</Tip>

## Manual Line Breaks

### Using Double Backslash

Force a line break within a paragraph using `\\`:

<Tabs>
  <Tab title="Code">
    <CodeGroup>
      ```latex line-breaks.tex theme={null}
      \documentclass{article}
      \begin{document}

      First line\\
      Second line\\
      Third line

      This is still the same paragraph, but with forced line breaks.

      This is a new paragraph.

      \end{document}
      ```
    </CodeGroup>
  </Tab>

  <Tab title="Rendered output">
    <div className="latex-preview-shell">
      <div className="latex-preview-paper latex-preview-paper--narrow">
        <p className="latex-preview-paragraph">
          First line<br />
          Second line<br />
          Third line
        </p>

        <p className="latex-preview-paragraph">
          This is still the same paragraph, but with forced line breaks.
        </p>

        <p className="latex-preview-paragraph latex-preview-indent">
          This is a new paragraph.
        </p>
      </div>
    </div>
  </Tab>
</Tabs>

### Line Break with Extra Space

Add vertical space after a line break:

<CodeGroup>
  ```latex line-break-space.tex theme={null}
  First line\\[10pt]
  Second line with 10pt gap\\[0.5cm]
  Third line with 0.5cm gap

  Normal line break:\\
  Next line
  ```
</CodeGroup>

### The \newline Command

Alternative to `\\`:

```latex theme={null}
This is one line\newline
This is the next line
```

## Preventing Line Breaks

### Non-breaking Space

Use `~` to prevent line breaks between words:

<CodeGroup>
  ```latex non-breaking.tex theme={null}
  % Prevent breaks in names
  Dr.~Smith wrote Chapter~5.

  % Keep units together  
  The temperature is 25~°C.

  % Prevent awkward breaks
  See Figure~\ref{fig:example} on page~\pageref{fig:example}.
  ```
</CodeGroup>

### \mbox Command

Keep text together on one line:

```latex theme={null}
The URL is \mbox{www.example.com/very-long-path}.
```

## Paragraph Formatting

### Paragraph Indentation

Control first-line indentation:

<CodeGroup>
  ```latex indentation.tex theme={null}
  \documentclass{article}

  % Remove indentation globally
  \setlength{\parindent}{0pt}

  % Or set custom indentation
  % \setlength{\parindent}{1cm}

  \begin{document}

  This paragraph has no indentation because we set parindent to 0pt.

  This paragraph also has no indentation. All paragraphs follow the global setting.

  \indent This paragraph is manually indented using the indent command.

  \noindent This paragraph has no indentation even if parindent is set.

  \end{document}
  ```
</CodeGroup>

### Paragraph Spacing

Control space between paragraphs:

<CodeGroup>
  ```latex paragraph-spacing.tex theme={null}
  \documentclass{article}

  % Add space between paragraphs
  \setlength{\parskip}{1em}

  % Remove indent when using parskip
  \setlength{\parindent}{0pt}

  \begin{document}

  First paragraph with spacing after it.

  Second paragraph with spacing before and after it.

  Third paragraph.

  \end{document}
  ```
</CodeGroup>

## Special Paragraph Commands

### \par Command

Explicitly end a paragraph:

```latex theme={null}
This is a paragraph.\par
This is another paragraph.
```

### Centered Text

<CodeGroup>
  ```latex centering.tex theme={null}
  \begin{center}
  This text is centered.\\
  Multiple lines\\
  can be centered.
  \end{center}

  % Or for short text:
  {\centering This is also centered.\par}
  ```
</CodeGroup>

### Flush Left and Right

<CodeGroup>
  ```latex alignment.tex theme={null}
  \begin{flushleft}
  This text is\\
  aligned to\\
  the left.
  \end{flushleft}

  \begin{flushright}
  This text is\\
  aligned to\\
  the right.
  \end{flushright}
  ```
</CodeGroup>

## Advanced Line Breaking

### Preventing Hyphenation

<CodeGroup>
  ```latex hyphenation.tex theme={null}
  % Prevent hyphenation for specific words
  \hyphenation{LaTeX JavaScript Python}

  % Prevent hyphenation in a word
  \mbox{unbreakableword}

  % Allow hyphenation at specific points
  super\-cali\-fragi\-listic
  ```
</CodeGroup>

### Line Breaking Commands

| Command        | Effect                     | Usage                |
| -------------- | -------------------------- | -------------------- |
| `\\`           | Line break                 | Most common          |
| `\\*`          | Line break (no page break) | Keeps lines together |
| `\newline`     | Line break                 | Alternative to `\\`  |
| `\linebreak`   | Suggests line break        | LaTeX decides        |
| `\nolinebreak` | Prevents line break        | Keeps on same line   |

### Page Breaking

Control where pages break:

```latex theme={null}
\newpage     % Start new page
\pagebreak   % Suggest page break
\nopagebreak % Prevent page break
\clearpage   % New page after floats
```

## Common Patterns

### Address Format

<CodeGroup>
  ```latex address.tex theme={null}
  John Smith\\
  123 Main Street\\
  Anytown, ST 12345\\
  USA
  ```
</CodeGroup>

### Poetry or Verses

<CodeGroup>
  ```latex poetry.tex theme={null}
  \begin{verse}
  Roses are red,\\
  Violets are blue,\\
  LaTeX is awesome,\\
  And so are you!
  \end{verse}
  ```
</CodeGroup>

### Quotations

<CodeGroup>
  ```latex quotations.tex theme={null}
  \begin{quote}
  This is a short quotation. It's indented from both margins and has no paragraph indentation.
  \end{quote}

  \begin{quotation}
  This is a longer quotation that might span multiple paragraphs. The first line of each paragraph is indented.

  This is the second paragraph of the quotation.
  \end{quotation}
  ```
</CodeGroup>

## Best Practices

<Tip>
  **Paragraph and line break tips:**

  1. **Let LaTeX decide** - Don't force line breaks unless necessary
  2. **Use blank lines** - Clear paragraph separation in source
  3. **Be consistent** - Choose either indentation or spacing
  4. **Use non-breaking spaces** - Keep related items together
  5. **Avoid `\\` at paragraph ends** - Use blank lines instead
</Tip>

## Common Mistakes

<Warning>
  **Avoid these errors:**

  1. **Using `\\` for paragraph breaks** - Use blank lines
  2. **Multiple `\\` in a row** - Use `\\[space]` instead
  3. **Ending paragraphs with `\\`** - Creates underfull hbox warnings
  4. **Too many manual breaks** - Trust LaTeX's algorithm
</Warning>

## Troubleshooting

### Underfull/Overfull hbox

If you get these warnings:

* Let LaTeX handle line breaking
* Use `\sloppy` for problematic paragraphs
* Rewrite sentences if needed

### Unwanted Page Breaks

```latex theme={null}
% Keep content together
\begin{samepage}
This content stays together on one page.
\end{samepage}
```

### Inconsistent Spacing

Check these settings:

```latex theme={null}
\setlength{\parindent}{15pt}  % First line indent
\setlength{\parskip}{0pt}     % Between paragraphs
\setlength{\baselineskip}{12pt} % Between lines
```

## Quick Reference

| What you want  | How to do it     | Example          |
| -------------- | ---------------- | ---------------- |
| New paragraph  | Blank line       | `text\n\ntext`   |
| Line break     | `\\`             | `line\\line`     |
| No indentation | `\noindent`      | `\noindent Text` |
| Keep together  | `~`              | `Fig.~1`         |
| Center text    | `\begin{center}` | Centered         |
| Extra space    | `\\[1cm]`        | With gap         |

***

<Info>
  **Next**: Learn about [Bold, italics and underlining](/learn/latex/basics/bold-italics-underlining) to add emphasis to your text.
</Info>
