I wish to follow the convention of marking paragraph breaks with a line break as opposed to the LaTex default of an indent. However I do not wish to have a new line after section headings.
Previous questions have solved how to add line breaks after paragraphs e.g.:
Have new line between paragraphs, no indentation
and: https://stackoverflow.com/questions/2195908/latex-multiple-linebreaks
Other questions have solved how to remove linebreaks after headings e.g.
Reducing spacing after headings
However when I combine these approaches the linebreaks after the paragraph override the commands removing the linebreaks from below the headings. How can both effects be achieved simultaneously?
To illustrate:
\documentclass[11pt]{article}
\usepackage{titlesec}
\setlength{\parindent}{0pt}
\parskip = 12pt plus 6pt minus 4pt
%Settings for the headings
\titlespacing\section{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\subsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\begin{document}
\section{This is a section}
Here is my first paragraph; it should appear directly below the section heading.
This is my second paragraph. there should be a line break before it and the one above.
\end{document}
Best Answer
Page 4 of the manual of the
titlesec
manual, description of the\titlespacing
command:So just do that:
The output I obtain is: