1

I am using \documentclass[11pt]{article} and I would like to reduce the space very slightly that is put in before each \paragraph{Some text}.

A MWE.

\documentclass[11pt]{article}
\begin{document}
\section{Intro}
Hello
\paragraph{A paragraph}
Some more text

And we continue.
\end{document}
  • \paragraph is the 4th level section heading, it's wrong to use that without \section ... \subsubsection but assuming this is just an example, copy the definition of \paragraph from article.cls into your preamble and reduce the lengths – David Carlisle Jul 3 '14 at 20:00
  • @DavidCarlisle Thank you. I am actually using \paragraph within sections. Is there a better way to get inline bold titles? – Lembik Jul 3 '14 at 20:05
  • if it is part of your section hierarchy it is more correct to use \subsection defined using \@startsection in werner's answer but with {2} instead of {4} or if it's a kind of ad hoc heading not really part of the hierarchy you could just use \textbf{} – David Carlisle Jul 3 '14 at 20:46
4

One way to do this is to adjust the fourth argument supplied to \@startsection as part of article's definition of \paragraph:

enter image description here

\documentclass{article}
\setlength{\parindent}{0pt}% Just for this example
\begin{document}
Hello
\paragraph{A paragraph}
Some more text

And we continue.

\bigskip
\hrulefill
\bigskip

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

Hello
\paragraph{A paragraph}
Some more text

And we continue.

\end{document}

My reference of reducing the space before "very slightly" was to take it down from 3.25ex \@plus 1ex \@minus .2ex to \parskip (0pt \@plus 1pt).

As a reference, see Where can I find help files or documentation for commands like \@startsection for LaTeX?.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.