Let us visit the history of Statistics (source here), and utilize this for demonstrations of paragraph, spacing, and indentation in \mathrm{\LaTeX}. Consider the following:
Executing these, we will have Output 1. This is the simplest way we can do to separate multiple paragraphs in \mathrm{\LaTeX}. That is, by allotting single white space between them (paragraph), or that is two white spaces from the last line of the preceding paragraph.
To extend the distance between passages, say into double line spacing, just put \\ at every end of it and you will have Output 2. Hence from the above codes, the first paragraph will end with Ibrahim Al-Kadi.\\, second with element in history.\\, and so on. There is option for the magnitude of space, say 0.5 centimeter, or 0.2 inch spacing is achieve by \\[0.5cm] and \\[0.2in], respectively. Now what happen when white spaces are omitted on the above codes, and leave \\ at the end of every paragraphs? I want you to explore that.
I have shown you the manual procedure so far. Manual in the sense that, every time we want space between the passages we manually put \\[option] with optional option. We can actually declare spacing globally, and that is by setting the length of \parskip, for example \setlength{\parskip}{0.3cm} extends 0.3 centimeter space between the paragraphs.
What about the spacing between the lines? How can we modify this?
To globally declare line spacing, we use the package \setspace (reference here) then immediately next to that is the desired spacing. Thus at this point, we have a preamble that looks like this.
What happen here is that all spaces will expand doubly including spaces between the title and the first paragraph. Alternatively, however, we can declare spacing locally, such as for a specific paragraph only. Consider this,
What we have done here, is we deactivate the \setspace and the \doublespace with % symbol, a character use for comments. Texts next to it are considered comments and will be ignored during the compilation. Thus, the document will have default (single) line spacing. But we added \baselineskip to 2 points on the first paragraph, enclosed in braces, {}. The effect here would be 2 points skip (or double space) between the lines of the first paragraph only. Never remove the white space (line 20 above) between the last line (line 19) of the first passage and the closing brace, } (line 21), because if you do, \baselineskip wont take effect; and therefore spacing matters for this function.
Notice every paragraph are automatically indented, this is the effect of the double white space between passages, you can remove the indentation using \noindent. Recall that \\ is a newline function; when used, texts following this are moved to the next line with no indentation. Hence, for indentation use \indent.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[12pt]{article} | |
\title{History of Statistics} | |
\author{Al-Ahmadgaid B. Asaad} | |
\begin{document} | |
\maketitle | |
Statistical methods date back at least to the 5th century BC. | |
The earliest known writing on statistics appears in a 9th-century | |
book entitled Manuscript on Deciphering Cryptographic Messages, | |
written by Al-Kindi. In this book, Al-Kindi provides a detailed | |
description of how to use statistics and frequency analysis to | |
decipher encrypted messages. This was the birth of both statistics | |
and cryptanalysis, according to the Saudi engineer Ibrahim Al-Kadi. | |
The Nuova Cronica, a 14th-century history of Florence by the | |
Florentine banker and official Giovanni Villani, includes much | |
statistical information on population, ordinances, commerce, | |
education, and religious facilities, and has been described as | |
the first introduction of statistics as a positive element in history. | |
Some scholars pinpoint the origin of statistics to 1663, with | |
the publication of Natural and Political Observations upon the | |
Bills of Mortality by John Graunt. Early applications of statistical | |
thinking revolved around the needs of states to base policy on | |
demographic and economic data, hence its stat- etymology. The scope | |
of the discipline of statistics broadened in the early 19th century | |
to include the collection and analysis of data in general. Today, | |
statistics is widely employed in government, business, and natural | |
and social sciences. | |
Its mathematical foundations were laid in the 17th century with the | |
development of the probability theory by Blaise Pascal and Pierre | |
de Fermat. Probability theory arose from the study of games of chance. | |
The method of least squares was first described by Adrien-Marie Legendre | |
in 1805. The use of modern computers has expedited large-scale statistical | |
computation, and has also made possible new methods that are impractical | |
to perform manually. | |
\end{document} |
![]() |
Output 1 |
![]() |
Output 2 |
I have shown you the manual procedure so far. Manual in the sense that, every time we want space between the passages we manually put \\[option] with optional option. We can actually declare spacing globally, and that is by setting the length of \parskip, for example \setlength{\parskip}{0.3cm} extends 0.3 centimeter space between the paragraphs.
Any declaration within the preamble is considered global, and any declaration within the body is considered local.
What about the spacing between the lines? How can we modify this?
To globally declare line spacing, we use the package \setspace (reference here) then immediately next to that is the desired spacing. Thus at this point, we have a preamble that looks like this.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[12pt]{article} | |
\title{History of Statistics} | |
\author{Al-Ahmadgaid B. Asaad} | |
\usepackage{setspace} | |
\doublespacing | |
\setlength{\parskip}{0.3cm} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[12pt]{article} | |
\title{History of Statistics} | |
\author{Al-Ahmadgaid B. Asaad} | |
%\usepackage{setspace} | |
%\doublespacing | |
\setlength{\parskip}{0.3cm} | |
\begin{document} | |
\maketitle | |
{\baselineskip = 2.0\baselineskip | |
Statistical methods date back at least to the 5th century BC. | |
The earliest known writing on statistics appears in a 9th-century | |
book entitled Manuscript on Deciphering Cryptographic Messages, | |
written by Al-Kindi. In this book, Al-Kindi provides a detailed | |
description of how to use statistics and frequency analysis to | |
decipher encrypted messages. This was the birth of both statistics | |
and cryptanalysis, according to the Saudi engineer Ibrahim Al-Kadi. | |
} | |
The Nuova Cronica, a 14th-century history of Florence by the | |
Florentine banker and official Giovanni Villani, includes much | |
statistical information on population, ordinances, commerce, | |
education, and religious facilities, and has been described as | |
the first introduction of statistics as a positive element in history. | |
Some scholars pinpoint the origin of statistics to 1663, with | |
the publication of Natural and Political Observations upon the | |
Bills of Mortality by John Graunt. Early applications of statistical | |
thinking revolved around the needs of states to base policy on | |
demographic and economic data, hence its stat- etymology. The scope | |
of the discipline of statistics broadened in the early 19th century | |
to include the collection and analysis of data in general. Today, | |
statistics is widely employed in government, business, and natural | |
and social sciences. | |
Its mathematical foundations were laid in the 17th century with the | |
development of the probability theory by Blaise Pascal and Pierre | |
de Fermat. Probability theory arose from the study of games of chance. | |
The method of least squares was first described by Adrien-Marie Legendre | |
in 1805. The use of modern computers has expedited large-scale statistical | |
computation, and has also made possible new methods that are impractical | |
to perform manually. | |
\end{document} |
Braces are also use for scope beside for enclosing arguments. \mathrm{\LaTeX} functions such as \baselineskip will take effect within braces, {}, only if enclosed by these characters.
Notice every paragraph are automatically indented, this is the effect of the double white space between passages, you can remove the indentation using \noindent. Recall that \\ is a newline function; when used, texts following this are moved to the next line with no indentation. Hence, for indentation use \indent.