One of the nice features of LaTeX is line justification does not depend on how many spaces you include between words. Typing two or more spaces does not matter; it always count as one. There are ways to increase blank space between words, but we skip this lesson for now. An empty line in the source file signifies a new paragraph.
A line break occurs when you type \\ at the point you need to break. Try for example:
\documentclass[12pt,a4paper]{article}
\begin{document}
Hello World\\
Hello World\\
Hello World
\end{document}
We can also set the spacing between the lines after the break explicitly. If e.g. we need to leave 3mm after the break we can write: Hello World\\[3mm]. See here: [TeX][PDF]. You will notice immediately that the first line is indented. This happens automatically for the first line of each paragraph, except when a section starts; the first paragraph is not indented. We may cancel the indentation by writing:
\documentclass[12pt,a4paper]{article}
\begin{document}
\noindent Hello World\\
Hello World\\
Hello World
\end{document}
see here: [TeX][PDF].
A new page can be created by inducing a pagebreak:
\documentclass[12pt,a4paper]{article}
\begin{document}
\noindent Hello World\\
Hello World\\
\newpage
Hello World
\end{document}
see here: [TeX][PDF]. This time we need to run LaTeX twice to produce the correct output. (run LaTeX and then run it again!). The reason is that LaTeX needs to run an intermediate step to count pages correctly before producing the final document. This is something very common as we will see later on. A couple more remarks: (a) there is an indentation of the first paragraph in the second page (b) page numbers are produced correctly.
|