Skip to main content
v2026.11,858 entries · CC-BY 4.0
LAC HealthMedical Supply Distributor100,000+ medical supplies. 48-hour critical dispatch.Ships from 8 regional U.S. hubs. Net-30 terms for verified institutional accounts.Shop lac.us CodeCASRAIlac.us

Indentation in LaTeX: Commands and Alignment

Learn how to control indentation in LaTeX. Configure parindent, noindent, the parskip package, block indents, and text alignment for research manuscripts.

Written and maintained by CASRAI Editorial Board

Last updated

Indentation in LaTeX is controlled primarily through the parindent length parameter, which defines first-line paragraph indents, and parskip, which sets vertical inter-paragraph spacing. Standard documents default to indented paragraphs with no vertical skip. Researchers can insert indents with indent, suppress indents with noindent or the parskip package, format block paragraphs using quote or adjustwidth, and align text with flushleft, flushright, or center.

What It Is Used for in Research

In academic research, precise typographic control is essential for preparing journal manuscripts, conference proceedings, doctoral dissertations, and research grant applications. Major scholarly publishers—such as IEEE, ACM, Elsevier, and Springer Nature—enforce strict layout specifications to maintain legibility, structure mathematical proofs, and meet strict page budgets.

Paragraph indentation signals thematic transitions in continuous prose without wasting vertical space. In traditional scholarly publishing, first-line indentation provides a visual rhythm across multi-page research articles. Conversely, technical reports, laboratory manuals, and camera-ready proposals often employ block paragraphs separated by vertical whitespace to enhance readability across complex multi-column figures and tables.

Beyond standard prose, academic manuscripts require distinct indentation mechanisms for:

  • Block quotations: Highlighting qualitative interview transcripts, archival extracts, and statutory text indented from both left and right margins.
  • Equations and theorems: Separating mathematical derivations and formal proofs from regular narrative flow.
  • Algorithmic listings and code: Preserving hierarchical structure in computational workflows alongside Open Source Software documentation.
  • Reference citations: Formatting hanging indents for bibliographies compiled using tools like Zotero (see our guide on How to Get Citations From Zotero).

Install or Access (Official Sources)

LaTeX is an open-source typesetting system available through major official TeX distributions and cloud-based authoring platforms:

  • TeX Live: The comprehensive, cross-platform TeX distribution maintained by the TeX Users Group (TUG). Available for Linux, Windows, and macOS at tug.org/texlive.
  • MacTeX: The dedicated macOS distribution bundled with TeX Live, Ghostscript, and GUI applications at tug.org/mactex.
  • MiKTeX: An alternative open-source TeX distribution for Windows, macOS, and Linux that downloads missing packages on the fly, available at miktex.org.
  • Overleaf: An official online collaborative LaTeX platform (overleaf.com) that provides cloud-hosted TeX Live compilation without local software installation.

Core packages mentioned in this guide—including parskip, indentfirst, and changepage—are standard components of the LaTeX distribution and available on the Comprehensive TeX Archive Network (CTAN at ctan.org). Command-line users can access full official package documentation at any time by running texdoc parskip or texdoc indentfirst in their terminal.

Step-by-Step Task: Configuring Indentation and Alignment in LaTeX

Managing indentation in LaTeX involves five core tasks, spanning document-wide settings, local overrides, block environments, and text alignment.

1. Set Document-Wide Paragraph Indentation

Standard LaTeX document classes (article, report, and book) automatically indent the first line of every paragraph. The width of this indent is governed by the length variable parindent. Its default value depends on the base font size: 15 pt at 10 pt font, 17 pt at 11 pt font, and 1.5 em at 12 pt font.

To modify the paragraph indent globally, define a new dimension in the document preamble using setlength:

documentclass[12pt]{article}
% Set paragraph indentation to 2 em (scales with font size)
setlength{parindent}{2em}

begin{document}
This paragraph begins with a custom 2em first-line indentation.
end{document}

2. Suppress Indentation Globally or Locally

Researchers frequently need to disable indentation, either for a specific opening paragraph or across the entire document.

  • Local suppression (single paragraph): Add noindent immediately before the first word of the paragraph. It must precede the text without any intervening blank lines:
    noindent This specific paragraph starts flush against the left margin.
  • Global suppression (block paragraph formatting): Rather than manually setting setlength{parindent}{0pt}—which causes paragraphs to run together if vertical spacing is omitted—load the official parskip package in your preamble:
    documentclass{article}
    usepackage{parskip}

    The parskip package automatically zeros parindent, introduces proportional vertical space between paragraphs (parskip), and correctly adjusts vertical spacing inside lists (itemize, enumerate) and table of contents entries to prevent layout distortion.

3. Insert Individual Indents or Force First-Paragraph Indentation

In standard English typographic design, LaTeX automatically suppresses indentation on the very first paragraph immediately following a section heading (section, subsection). If your target journal, university thesis guideline, or regional style manual (such as French academic typography) requires every paragraph to be indented:

documentclass{article}
usepackage{indentfirst} % Forces first paragraph after headings to indent

To insert an arbitrary horizontal indent within running text or an unindented environment, use indent (which inserts an empty box of width parindent) or specify an exact measurement with hspace{...} (or hspace*{...} to prevent suppression at line starts):

noindent Flush line.\
hspace*{1.5cm} This line is manually shifted inward by 1.5 cm.

4. Indent a Whole Paragraph or Text Block

When presenting extended quotations, research participant transcripts, or theorem statements, the entire block of text—not just the first line—must be indented from the margins. LaTeX provides several robust approaches:

  • The quote environment: Indents text from both the left and right margins with added vertical space above and below. Ideal for single-paragraph extracts:
    begin{quote}
    This entire paragraph is indented equally from both the left and right margins, setting it apart from the narrative.
    end{quote}
  • The quotation environment: Functions like quote, but preserves standard first-line paragraph indentation across multi-paragraph excerpts.
  • The adjustwidth environment (from changepage): Provides granular, independent control over left and right margins without altering global geometry:
    usepackage{changepage}
    
    begin{adjustwidth}{2em}{0pt}
    This block paragraph is indented by 2 em on the left margin while aligning with the standard right margin.
    end{adjustwidth}
  • Low-level TeX grouping: Apply local margin adjustments within braces:
    {leftskip=2.5em rightskip=0pt
    Every line inside these braces is indented by 2.5 em from the left margin until the paragraph closes.par}

5. Control Text Alignment

LaTeX justifies text across both margins by default. To align text to the left, right, or center, use the corresponding environment or declaration switch:

  • Centered text: Use begin{center} ... end{center} for standalone blocks (adds vertical padding). In floating figures or tables, use the declaration centering inside the float environment to avoid unwanted vertical spacing.
  • Left-aligned text (ragged right): Use begin{flushleft} ... end{flushleft} or the declaration raggedright. To improve hyphenation quality in narrow columns, load usepackage{ragged2e} and use RaggedRight.
  • Right-aligned text (ragged left): Use begin{flushright} ... end{flushright} or the declaration raggedleft, commonly used for author affiliations, epigraphs, and date stamps.

For tabular data and structured markdown comparisons, see our related guides on Jupyter Notebook Markdown Table: Syntax, Alignment and Headings and Footnotes in Markdown: Syntax, Multi-Paragraph Notes and Where They Render.

Output and How to Read It

When compiling a LaTeX source file into a PDF document (using pdflatex, xelatex, or lualatex), the visual output reflects the active dimension registers:

  • Default article output: Paragraphs feature a 15–17 pt first-line indent, zero vertical space between paragraphs, and flush-left formatting on opening paragraphs beneath section headers.
  • Output with parskip: Paragraphs start flush against the left margin with a clean blank line (approximately 0.5 baseline skip) separating consecutive paragraphs.
  • Diagnostic dimension inspection: To verify exact dimension values directly in your compiled PDF output, print the register values using:
    Current paragraph indent: theparindent\
    Current paragraph skip: theparskip
  • Compiler log warnings:
    • Underfull hbox (badness 10000): Occurs when authors use double backslashes (\) to force line breaks instead of proper paragraph separation, leaving sparse lines.
    • Overfull hbox: Indicates a line of text, mathematical formula, or URL extends past the right margin. Adjust hyphenation or use sloppy within localized blocks if needed.

Troubleshooting

Common issues encountered by researchers when configuring LaTeX indentation, along with verified solutions:

Issue Underlying Cause Verified Fix
noindent has no effect A blank line or \ separates noindent from the paragraph text, resetting vertical mode. Place noindent immediately adjacent to the first word of the paragraph without empty lines or linebreaks.
First paragraph after section heading is unindented Standard LaTeX classes intentionally suppress first-line indentation after section titles per English typography conventions. Add usepackage{indentfirst} to your document preamble to enforce indentation on all paragraphs.
Lists and TOC have excessive vertical gaps Manually modifying setlength{parskip}{...} applies extra vertical spacing to list items and table of contents entries. Replace raw parskip adjustments with usepackage{parskip}, which preserves compact list spacing.
Unwanted indent appears after an equation or table An empty line was left between the mathematical environment (equation, align) and the following text. Remove blank lines after the display math environment if the subsequent text is part of the same paragraph; otherwise use noindent.
Journal class ignores parindent changes Publisher classes (such as IEEEtran.cls, acmart.cls, or elsarticle.cls) hardcode paragraph geometry in class definitions. Retain journal class defaults for camera-ready submissions; only modify dimensions if permitted by author instructions.

Free Alternatives

Researchers evaluating manuscript authoring and typesetting tools have several open-source and free alternatives to LaTeX:

Software Format Paradigm Mathematical Typesetting Typical Research Use Case
LaTeX Source code markup compiled via TeX engines Industry benchmark (AMS-LaTeX, comprehensive symbols) Physical sciences, mathematics, computer science papers, doctoral theses
Typst Modern open-source markup with instant preview Native, readable math syntax with fast compile times Technical reports, lab documentation, preprints requiring rapid iteration
Quarto / Pandoc Markdown with embedded code cells (R, Python, Julia) MathJax / LaTeX syntax rendered via Pandoc Reproducible research reports, computational notebooks, data science manuscripts
LibreOffice Writer WYSIWYG desktop word processor (OpenDocument) Built-in formula editor (MathML and LaTeX-like syntax) Humanities and social science manuscripts, administrative reports, collaborative drafts
GNU TeXmacs Structured WYSIWYG scientific editor High-fidelity mathematical typography based on TeX algorithms Interactive mathematical exploration, lecture notes, textbook authoring

FAQ

How do I insert an indent?

To insert a paragraph indent in LaTeX, ensure your document has a non-zero parindent setting (the default in standard article and report classes). To force an indent on an unindented line or within an unindented environment, use the indent command at the start of the paragraph. For custom horizontal indents, use hspace*{2em} or quad to insert specific spacing.

How do I align text in LaTeX?

Text alignment in LaTeX can be managed using either structural environments or declaration switches. To center text, use begin{center} ... end{center} or the centering declaration. For left-aligned (ragged-right) text, use begin{flushleft} ... end{flushleft} or raggedright. For right-aligned (ragged-left) text, use begin{flushright} ... end{flushright} or raggedleft.

How do I indent a whole paragraph in LaTeX?

To indent an entire paragraph on both the left and right margins, wrap the text in a begin{quote} ... end{quote} environment. For multi-paragraph excerpts where individual first-line indents should be retained, use begin{quotation} ... end{quotation}. For precise left-margin-only indentation without altering the right margin, load the changepage package and use begin{adjustwidth}{2em}{0pt} ... end{adjustwidth}.

How to get LaTeX to not indent?

To prevent LaTeX from indenting a single paragraph, place noindent immediately before the first word of that paragraph. To remove indentation across the entire document in favor of modern block paragraph formatting, add usepackage{parskip} to your document preamble. This zeroes out parindent and introduces clean vertical separation between paragraphs without disrupting list item spacing.

Sources

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about Indentation in LaTeX: Commands and Alignment

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →