0

This answer shows how we may achieve a numbering of paragraphs with \S.

How may we in the following have the same spacing between §1 and §2 as the line spacing in the text above §1, without changing the line spacing in the latter? Also, how may the space between §1 and the text above conform to the same spacing?

The SECOND of the following codes is the solution I use based upon the answer accepted.

\documentclass[12pt]{article}
\usepackage{chngcntr}
\counterwithout{paragraph}{subsubsection}
\renewcommand{\theparagraph}{\S\arabic{paragraph}}
\setcounter{secnumdepth}{4}

\begin{document}

Here are just some words to show the normal spacing between lines in the main document. \paragraph{} 1st paragraph

\paragraph{} 2nd paragraph

\end{document}


\documentclass{article}

\usepackage{chngcntr,titlesec}
\counterwithout{paragraph}{subsubsection}
\renewcommand{\theparagraph}{\S\arabic{paragraph}}
\setcounter{secnumdepth}{4}

\titlespacing{\paragraph}
{15pt}{0pt}{-8pt}
\usepackage{showframe}

\begin{document}


Here are just some words to show the normal spacing between lines in the main document.
\paragraph{} 1st paragraph

\paragraph{} 2nd paragraph

\end{document}```





1 Answers1

1

From your post, understood that you need to modify the vertical spacing before the tag \paragraph, is my understanding correct, then please use the below MWE:

\documentclass{article}

\usepackage{chngcntr,titlesec} \counterwithout{paragraph}{subsubsection} \renewcommand{\theparagraph}{\S\arabic{paragraph}} \setcounter{secnumdepth}{4}

\makeatletter

\titlespacing{\paragraph} {0pc}{3.5ex @plus -1ex @minus -.2ex}{10pt} \makeatother

\begin{document}

Here are just some words to show the normal spacing between lines in the main document. \paragraph{} 1st paragraph

\paragraph{} 2nd paragraph

\end{document}

Note: As you mentioned in comment that you are using article class file, hence I kept the same above vertical space for first level heading for \paragraph also...

Here is the solution I use on the basis of the accepted anser:

\documentclass{article}

\usepackage{chngcntr,titlesec} \counterwithout{paragraph}{subsubsection} \renewcommand{\theparagraph}{\S\arabic{paragraph}} \setcounter{secnumdepth}{4}

\titlespacing{\paragraph} {15pt}{0pt}{-8pt} \usepackage{showframe}

\begin{document}

Here are just some words to show the normal spacing between lines in the main document. \paragraph{} 1st paragraph

\paragraph{} 2nd paragraph

\end{document}

MadyYuvi
  • 13,693