1

It was tricky to find related questions given the specific wording. I hope I'm not making a duplicate, and I apologise if it is the case.

Question

In my \subsubsection I have 3 “named paragraphs” A, B and C. Each “named paragraph” introduces a wide space before them. I would like to keep writing my subsection, after C, but no separation space is inserted. What am I doing wrong?

\subsubsection{Title}
Bla bla bla.

\paragraph{A.} Bla bla bla.
\paragraph{B.} Bla bla bla.
\paragraph{C.} Bla bla bla.

Bla bla bla.

Paragraphs

Answer

Correct usage of “named paragraph” is done with the description environment from enumitem package, as pointed out by @Gustavo Mezzetti and illustrated by @Werner.

\subsubsection{Title}
Bla bla bla.

\begin{description}[leftmargin=0pt]
  \item[A.] Bla bla bla.
  \item[B.] Bla bla bla.
  \item[C.] Bla bla bla.
\end{description}

Bla bla bla.

Description

Note: one needs to include \usepackage{enumitem} in the preamble.

Atcold
  • 1,727
  • 2
    That's expected: the name \paragraph was an unfortunate choice; it is a sectioning command just like \section, \subsection.and \subsubsection, ranking after the last one. In the article class it is realized with an in-line title. Since it starts a sectional unit, it can consist of several paragraphs. – egreg Jul 27 '16 at 23:23
  • 1
    If I understand correctly what you are asking for, you could use, for example, a description environment. – GuM Jul 27 '16 at 23:32
  • That's it, @Gustavo. I was after description, and I thought it was paragraph instead. Thank you for your answer. – Atcold Jul 28 '16 at 06:11

3 Answers3

2

You can insert the same amount of space by looking at the definition of \paragraph in article.cls:

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

The fourth argument passed to \@startsection defines the space inserted above the \paragraph unit, or the beforeskip - 3.25ex \@plus1ex \@minus.2ex - see Where can I find help files or documentation for commands like \@startsection?. It's a flexible (or rubber) length, but you can insert that manually as follows:

enter image description here

\documentclass{article}

\usepackage{lipsum}

\begin{document}

\subsubsection{Title}
Bla bla bla.

\paragraph{A.} \lipsum[1]
\paragraph{B.} \lipsum[2]
\paragraph{C.} \lipsum[3]

\vspace{3.25ex plus 1ex minus .2ex}% Space above a typical \paragraph

\noindent
Bla bla bla.

\end{document}

The reason why there's no gap between your \paragraph{C.} and the subsequent Bla bla bla is because that distance is governed by \parskip which is 0pt (actually 0.0pt plus 0.1pt) under the default article class.

There are other ways of achieving your goal, like using a list like description:

enter image description here

\documentclass{article}

\usepackage{lipsum,enumitem}

\begin{document}

\subsubsection{Title}
Bla bla bla.

\begin{description}[leftmargin=0pt]
  \item[A.] \lipsum[1]
  \item[B.] \lipsum[2]
  \item[C.] \lipsum[3]
\end{description}

\noindent
Bla bla bla.

\end{document}
Werner
  • 603,163
  • Well, perhaps also \addpenalty{\@secpenalty}, in this case? – GuM Jul 28 '16 at 00:04
  • If I am permitted to add another suggestion, I would also recommend using \addvspace rather than \vspace, here. – GuM Jul 28 '16 at 00:22
  • Thank you for posting a workaround. But I was more into understanding how to properly use the tools that LaTeX offers. It looks like I'll have to delve into the description environment, as suggested by @Gustavo. – Atcold Jul 28 '16 at 02:45
  • @Atcold: Then consider not asking "What am I doing wrong?" Be specific in your request. I've added a list-like option using description. – Werner Jul 28 '16 at 05:50
  • Well, one of the comments above mentioned that the name \paragraph was an unfortunate choice and it is a sectioning command just like \section, \subsection and \subsubsection, ranking after the last one. In the article class it is realized with an in-line title. Hence, it addresses my question, i.e. the usage is not relative to a single paragraph but it's a sectioning element. And I understand I can add extra space, although this does not explain why the space was not the in first place. – Atcold Jul 28 '16 at 06:09
  • From the title I'm referring to 'named paragraphs' because that's how they look in the article class. I would have been more precise if I knew what I was doing, but I was not. Therefor, the answer is, "named paragraphs are realised with the description environment and not with the \paragraph command". Sorry for the confusion. – Atcold Jul 28 '16 at 06:15
  • Using the [leftmargin=0pt] I get a Something's wrong--perhaps a missing \item. leading text: \item[A.]. Without it, it works, but indentation is still there. I'm puzzled... Oops, ok \usepackage{enumitem} is required. I thought it was standard LaTeX. – Atcold Jul 28 '16 at 16:24
  • @Atcold: Strange that you accepted an answer that doesn't use a list, yet you placed that as the Answer in you post. – Werner Jul 28 '16 at 16:35
  • The Answer points out my misunderstanding, which addresses the question "What am I doing wrong?". I've included a more targeted answer (with your working example) in my question. There was no need to down-vote my question, though. – Atcold Jul 28 '16 at 16:40
1

Expanding on @Gustavo Mezzeti's suggestion, you might use this:

\usepackage{enumitem}
. . . . . .
\begin{document}
. . . . . .
\begin{enumerate}[label=\Alph*, wide=0pt, font=\bfseries]
\item Blah blah blah 
\item Booh booh booh
\item Fiddle dee dee!
\end{enumerate}
. . . . . .
\end{document}
Manuel
  • 27,118
Bernard
  • 271,350
1

You're being confused by the command's name: \paragraph is actually one of the standard sectioning command hierarchy:

\part
\chapter
\section
\subsection
\subsubsection
\paragraph
\subparagraph

These commands are defined in the standard classes (but article doesn't have \chapter) and most other classes follow the same convention.

It's rather common opinion that the names for the last two commands was badly chosen, but it's too late for changing them, as they've been in LaTeX for thirty years.

The usual difference between \(sub)paragraph and \(sub)(sub)section is that the latter type prints the title as a block, whereas the former type print the title in-line.

Being a sectional command, it doesn't act on a single (text) paragraph, but just marks a division in the document. Hence it does nothing special at the end of the (text) paragraph it's in.

You could abuse \paragraph by making your own environment; the spacing below is the same as the space above in the article class and with other classes it might be necessary to change it; defining an environment will enable doing the modification very easily.

\documentclass{article}

\newenvironment{namedparagraph}[1]
  {\paragraph{#1}}
  {\par\addvspace{3.25ex plus 1ex minus 0.2ex}}

\begin{document}

\subsubsection{Title}
Bla bla bla.

\begin{namedparagraph}{A.}
Bla bla bla.
\end{namedparagraph}

\begin{namedparagraph}{B.}
Bla bla bla.
\end{namedparagraph}

\begin{namedparagraph}{C.}
Bla bla bla.
\end{namedparagraph}

Bla bla bla.

\end{document}

enter image description here

However, you are probably looking for the description environment, maybe tailored to your needs with the help of enumitem.

egreg
  • 1,121,712