8

I can't understand what \newline does to justify the line that it breaks. It's clear that \linebreak uses the justification of the paragraph and has the same effect as simply ending the paragraph (using \par, blank line, end of environment, etc), whereas \newline places the contents of the line slightly to the left w.r.t. the justification used. An example:

\documentclass{article}
\usepackage{verbatim}
\usepackage[left=7cm, right=7cm]{geometry}

\begin{document}
\begin{center}
 This is a centered paragraph that features text wrapping
 as well as \linebreak manual \linebreak breaks using \verb+\linebreak+ 

\bigskip
 This is a centered paragraph that features text wrapping
 as well as \newline manual \newline breaks using \verb+\newline+ 
\end{center}

\begin{flushright}
 This is a right-justified paragraph that features text wrapping
 as well as \linebreak manual \linebreak breaks using \verb+\linebreak+ 

\bigskip
 This is a right-justified paragraph that features text wrapping
 as well as \newline manual \newline breaks using \verb+\newline+ 
\end{flushright}

\begin{flushleft}
 This is a left-justified paragraph that features text wrapping
 as well as \linebreak manual \linebreak breaks using \verb+\linebreak+ 

\bigskip
 This is a left-justified paragraph that features text wrapping
 as well as \newline manual \newline breaks using \verb+\newline+ 
\end{flushleft}
\end{document}

produces:

enter image description here

9

The definition of \newline boils down to \hfil\break. The center environment essentially wraps every line in \hfil <line>\hfil. Similarly, flushlight adds \hfil in front of each line.

Thus a \newline inside a center environment is equivalent to

\hfil text \hfil\hfil\break

and inside flushlight to

\hfil text \hfil\break

obtaining the effect you describe.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.