Text Alignment in LaTeX

LaTeX supports center, left, right, and justified alignment using environments or commands.

Quick Answer

latex
\begin{center}
  Centered text
\end{center}

\begin{flushleft}
  Left-aligned text
\end{flushleft}

\begin{flushright}
  Right-aligned text
\end{flushright}

Alignment Environments

Wrap any block of text in an alignment environment. These also add a small amount of vertical space around the block.

latex
\documentclass{article}
\begin{document}

Normal paragraph text is justified by default — both left and right
edges are aligned, with spacing adjusted between words.

\begin{center}
  This paragraph is centered.\\
  Each line is individually centered.
\end{center}

\begin{flushleft}
  Left-aligned (ragged right). Natural reading alignment.
  No hyphenation adjustments are made.
\end{flushleft}

\begin{flushright}
  Right-aligned (ragged left).
  Often used for dates and signatures.
\end{flushright}

\end{document}

Writing your thesis in LaTeX?

MonsterWriter's LaTeX Workspace gives you real-time PDF preview with no compile limits — at a fraction of Overleaf's price. Works just like Overleaf, costs 11× less.

Try MonsterWriter free

Single-Line Shortcuts

For single lines, the declaration commands are more concise than full environments.

latex
{\centering This line is centered.\par}

% Or use \centerline (TeX primitive):
\centerline{Centered line}

Change Default Alignment

LaTeX justifies text by default. To switch the entire document to ragged right (common for accessibility and theses):

latex
\usepackage{ragged2e}  % in preamble

% In document:
\justifying    % default, full justification
\RaggedRight   % left-aligned (improved ragged right)
\RaggedLeft    % right-aligned
\Centering     % centered

Alignment in Tables

Column alignment in tables uses l, c, r in the column spec.

latex
\begin{tabular}{l c r}
  Left & Center & Right \\
  aligned & aligned & aligned \\
\end{tabular}

Related Topics