Change space between title and text in \paragraph command

by Julie Røsok   Last Updated January 20, 2018 10:23 AM

I am wondering if there is a way to remove the space that comes between the title and the text when using the \paragraph command. I am working on my thesis, and have gotten it proof read by someone who is used to Word, and she says that this space looks odd, and not correct. I have only used LaTeX, so I am kind of used to it, but is there any way of changing it?



Answers 2


In book paragraph is defined by

\newcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                                    {3.25ex \@plus1ex \@minus.2ex}%
                                    {-1em}%
                                    {\normalfont\normalsize\bfseries}}

the space after the heading is 1em specified by the 5th argument to \@startsection (negative so it is a run-in not a display heading).

so you can use \renewcommand to set that to any other negative value.

Note \paragraph is a section heading of level 4 as specified there, and should only be used in the sequence \chapter, \section, \subsection, \subsubsection, \paragraph.

David Carlisle
David Carlisle
May 11, 2015 08:48 AM

After reading the discussion between you and David Carlisle, I realize now you'd like to adjust the paragraph heading (also called title—but I didn't expect that from a new user, sorry ;)

You can use the titlesec package for this.

Code

Adjust the .5em to your liking. I used em as the unit because it is a horizontal unit designed for text. You can even make it a negative value if you want to. titlespacing does require a unit, however.

\documentclass{article}
\usepackage{fontspec}
\usepackage[explicit]{titlesec}
\titlespacing{\paragraph}{0pt}{0pt}{.5em}[]
\begin{document}
\paragraph{This} is an example.
\end{document}

Output

enter image description here

Jonathan Komar
Jonathan Komar
May 12, 2015 05:43 AM

Related Questions


Make \section unaffected by \parfillskip

Updated March 10, 2017 13:23 PM

How to write in the following manner?

Updated April 14, 2017 04:23 AM

Vertical spacing for paragraph environment

Updated March 10, 2018 22:23 PM