Skip to content
EasyLaTeXDocs

Paragraph Formatting, Alignment, and Spacing

Control first-line indentation, paragraph spacing, and line spacing with paragraph parameters, and change alignment with declarations. Do not simulate layout using spaces or repeated \\ commands.

EasyLaTeX compiler setting: pdfLaTeX. The examples use setspace for line spacing. Follow the requirements of your institution, journal, or publisher when a template specifies them.

First-Line Indentation

\parindent sets the indentation of ordinary paragraphs. This example uses 2em, a font-relative length rather than a fixed number of characters:

latex
\setlength{\parindent}{2em}

Use \noindent at the start of a paragraph to suppress its indentation:

latex
\noindent This paragraph starts at the left margin without indentation.

Headings, lists, and captions have their own indentation rules; do not force them all to follow \parindent.

Paragraph Spacing

\parskip controls the vertical space between paragraphs:

latex
\setlength{\parskip}{0.5em}

Indentation and paragraph spacing can coexist, but normally one should be the main visual cue. Strong use of both can make the page feel disconnected. Follow your style guide or template rather than assuming one convention applies to every English-language publication.

Line Spacing

Load setspace, then choose a preset or an explicit scale:

latex
\usepackage{setspace}
\onehalfspacing
% Alternatively: \setstretch{1.5}

You can also apply it locally:

latex
\begin{spacing}{1.2}
This text uses tighter line spacing.
\end{spacing}

Check tables, footnotes, and long equations separately; increasing body spacing should not blindly enlarge all of them.

Text Alignment

LaTeX normally justifies body text. These declarations affect the following content within their scope:

latex
\raggedright
Left aligned, with a ragged right edge.

\centering
This paragraph is centered.

\raggedleft
Right aligned.

Put local alignment changes inside a group or environment so they do not affect later text:

latex
{\centering
A centered paragraph.\par}

\centering is usually better than center inside figures and tables because it does not add the environment's extra vertical spacing.

Local Adjustments and Scope

Use braces to limit local settings:

latex
{\setlength{\parindent}{0pt}
\setlength{\parskip}{0.4em}
This note has no indentation and extra paragraph spacing.\par}

Do not tune every paragraph separately. Put repeated settings in the preamble. For a one-off layout issue, first check whether the content, figures, tables, or page structure should be adjusted instead.

Common Problems

Repeated \\ Used to Separate Paragraphs

\\ creates a line break, not paragraph spacing. It can produce unstable page breaks and warnings such as Underfull \hbox. Start paragraphs with blank lines, then set consistent spacing using \parskip.

Spaces Do Not Create Indentation

Ordinary spaces at the beginning of source lines are ignored. Set \parindent, and use \noindent for individual exceptions.

Alignment Changes Affect Later Content

Declarations such as \centering and \raggedright do not end automatically. Enclose them in braces or a suitable environment to limit their scope.

Complete Example

latex
\documentclass[a4paper,12pt]{article}
\usepackage{setspace}

\setlength{\parindent}{2em}
\setlength{\parskip}{0pt}
\onehalfspacing

\begin{document}

This first paragraph uses indentation and one-and-a-half line spacing.

This is the second paragraph. A blank line starts a new paragraph.

{\centering
This note is centered.\par}

\noindent This unindented paragraph is a short note after a heading.

\end{document}
Paragraph Formatting, Alignment, and Spacing | EasyLaTeX | EasyLaTeX