UK TeX FAQ -- question 148

### Cancelling `\ragged` commands

LaTeX provides commands `\raggedright` and `\raggedleft`, but none to cancel their effect.

The following code (to be inserted in a package of your own, or as internal LaTeX code) defines a command that restores flush justification at both margins:

    \def\flushboth{%
      \let\\\@normalcr
      \@rightskip\z@skip \rightskip\@rightskip
      \leftskip\z@skip
      \parindent 1.5em\relax}

There's a problem with the setting of `\parindent` in the code: it's necessary because both the `\ragged` commands set `\parindent` to zero, but the setting isn't a constant of nature: documents using a standard LaTeX class with `twocolumn` option will have `1.0em` by default, and there's no knowing what you (or some other class) will have done.