latexwisdom/tex/paragraph.tex

45 lines
1.5 KiB
TeX

%! TEX program = lualatex
\input{.maindir/tex/header/preamble-section}
% inputs the preamble only if necessary
\docStart
\section{Paragraph} \label{sec:paragraph}
Paragraphs are used to structure thoughts in texts.
(Independent of \LaTeX.) So you start a new paragraph
as soon as you start a new thought in your text.
It helps me to ask myself: \enquote{If the text
is read aloud, when should the reader take a breadth?}
In \LaTeX{} a new paragraph is started with an empty line.
You can make single line breaks
in your code where ever you want, they are not different
to any other whitespace. (If you need a line break inside
a word, use a comment like here:
\lstset{language=[LaTeX]TeX}
\begin{lstlisting}
a split wo%
rd
\end{lstlisting}.)
I like to have my lines short and often put a line break
after every sentence.
Do not use \lstinline!\\!. It is evil. It ends a line
without ending the paragraph. With it your document might look
like from Word. Yuck!
Use \lstinline!\par! only with good reason.
\paragraph{Titled paragraph} You can start a paragraph
with the makro \lstinline!\paragraph{<title>}!
as a kind of sectioning command below all \lstinline!section!
levels. If you start a \lstinline!proof! environment
with a paragraph you need to add something before the
paragraph, otherwise you get a \lstinline!Missing item! error.
Like this:
\begin{lstlisting}
\begin{proof}~
\paragraph{A $$ B} Some proof text
\paragraph{B $$ A} Some proof text
\end{proof}
\end{lstlisting}
\docEnd