[Tex/LaTex] \quad not working after using \newline

line-breakingspacing

I am just starting to use LaTeX and I like it a lot.

When I am in a \subsection or \section I can use \quad as much as I wish and it works properly until I use a \newline (or any line breaking command for that matter). Until I change to the next section, \quad will no longer work. Any reason why that is and how I can fix it?

An example:

\quad abc  \quad bbc \newline \quad test \newline

The output:

    abc    bbc
test

Best Answer

TeX removes spaces if they appear at the start of a line. You can insert a null object at the start of the line to prevent this.

\documentclass{article}
\begin{document}
\section{A section}
aaa  \quad\quad\quad bbb \newline
ccc  \quad\quad\quad ddd \newline
\null\quad\quad\quad eee fff
\end{document}

space

Of course, manually inserting line breaks is unusual, but this is the explanation.

Related Question