[Tex/LaTex] Difference between flushright and raggedleft
horizontal alignment
What is the difference between flushright and raggedleft?
Best Answer
\begin{flushright}...\end{flushright} is the environment form of \raggedleft. They are the equivalent of \begin{center}...\end{center} and \centering, respectively. Here's an example using the two:
\hfill is equivalent to \hspace\fill. However, LaTeX removes horizontal space under circumstances, such as at the end of a line. If you don't want LaTeX to remove this space, use the starred version \hspace*. Btw, it's similar with \vspace and \vspace*.
Btw. when I tested it with your code to see that it works, I noticed a missing closing brace in line 5. And I would use the geometry package instead of manually adjusting all those lengths.
Best Answer
\begin{flushright}...\end{flushright}
is the environment form of\raggedleft
. They are the equivalent of\begin{center}...\end{center}
and\centering
, respectively. Here's an example using the two:In particular, note the extra space around
flushright
.