我不明白如何\newline
对齐它断开的行。很明显,\linebreak
使用段落的对齐方式,其效果与简单地结束段落(使用\par
、空白行、环境结束等)相同,而\newline
将行的内容稍微放置在使用的对齐方式的左侧。举个例子:
\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}
生成:
答案1
的定义\newline
归结为\hfil\break
。center
环境本质上包装了中的每一行\hfil <line>\hfil
。同样,在每行前面flushlight
添加。\hfil
因此,环境\newline
内部center
相当于
\hfil text \hfil\hfil\break
并flushlight
进入
\hfil text \hfil\break
获得您所描述的效果。