Separating sentences
In $\LaTeX$, in order to separate two sentences one needs to
- insert two spaces between the period and the first letter of the second sentence, e.g.,
First sentence. Second sentence.
, or -
separate the two sentences with a new line, e.g.,
First sentence. Second sentence.
Using a single latex line for each sentence, allows for better diffs when using version control systems since one can easily observe which sentences have been changed and how.
Separating paragraphs
In LaTeX, in order to separate two paragraphs one needs to leave an empty line between the last sentence of the first paragraph and the first sentence of the second paragraph.
E.g.,
First paragraph.
Second paragraph.
Alternatively, one may force a new paragraph by adding \\
at the end of the last sentence of the first paragraph and by starting the second paragraph on the next line.
E.g.,
First paragraph.\\
Second paragraph.
Forcing two words to stay on the same line
LaTeX by default will automatically break long sentences and align them properly.
LaTeX usually breaks sentences at spaces.
However, there are cases where one wants to prevent LaTeX from braking at specific points to improve readability.
To achieve this one needs to use ~
in place of a space.
LaTeX treats any words separated by ~
as one word, and thus it won't break them.
A good practice is to always separate a citation from the previous word using ~
to avoid new lines starting with a citation, e.g., "[13] find that X is bigger than Y".
E.g.,
Zakkak et al.~\cite{zakkak} in Figure~\ref{myfig} presented in Section~\ref{intro} ...
Quoting text
In most text editors we quote text by simply wrapping it in "
.
In LaTeX, however, we need to use different symbols to denote the beginning of a quotation and different symbols to denote the ending of it.
The beginning is denoted by ``
and the ending by ''
, note that this is two '
and not a single "
.
E.g.,
The following is a quoted phrase, ``quoted phrase''.