TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
\documentclass{article}
\usepackage{lipsum}
\begin{document}
\paragraph{First paragraph} \lipsum[4]
\paragraph{Second paragraph} \lipsum[4]
\end{document}

What is, and what sets, the space between these two paragraphs? I've looked in both article.cls and size10.clo, but I'm not able to find anything.

share|improve this question
    
The name \paragraph is a very unfortunate choice. Are you sure you're not misusing it? What really is your aim? – egreg Apr 8 at 19:36
1  
note that \paragraph is a 4th level section heading so should be used in sequence with \section,\subsection,\subsubsection,\paragraph – David Carlisle Apr 8 at 20:05
    
@egreg Oh, I'm definitely misusing it. I had to write an academic abstract in a hurry and just didn't have time to define my own sections with titlesec, so I used the predefined \paragraph because it came close to what I needed. – Sverre Apr 9 at 10:50
up vote 4 down vote accepted

The following macro definition is in article.cls:

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

The \@startsection macro takes six arguments; the fourth specifies the amount of vertical whitespace that should be inserted above sectioning headers. For sectioning headers of type paragraph, the default amount of vertical whitespace is a "rubber" length" (a TeX jargon expression...) of 3.25ex plus 1ex minus 0.2ex. The whitespace is not inserted if the sectioning command occurs at the very top of a page.

The fifth argument of \@startsection, if positive, specifies the amount of whitespace to be inserted below the sectioning header; if negative, it specifies the offset of a run-in style header.

share|improve this answer
    
Why does it say 3.25ex \@plus1ex \@minus.2ex instead of 4.05ex? – Sverre Apr 8 at 19:12
2  
@Sverre it's a rubber length, those are how much it can stretch. It's 3.25 ex under normal circumstances and it can stretch as high as 4.25 ex and as low as 3.05 ex, but 3.25 ex is where it is ordinarily – Au101 Apr 8 at 19:16
3  
@Sverre - \@plus and \@minus are (probably unsurprisingly) internal representations of plus and minus. A length of 4.05ex is a fixed or rigid length. In contrast, 3.25ex \@plus1ex \@minus.2ex can be as long as 4.25ex and as short as 3.05ex, with a default value of 3.25ex. Having a bit of vertical whitespace to "play with" is important for creating a good-looking page out of sectioning headers and text blocks. – Mico Apr 8 at 19:16

It is the \paragraph heading. You can use titlesec and its \titlespacing to remove it:

\documentclass{article}
\usepackage{lipsum}

\usepackage{titlesec}
\titlespacing{\paragraph}{0pt}{0pt}{1em}
%                          |    |    |
%                 indent --+    |    |
%                 skip before --+    |
%     sep between heading and text --+

\begin{document}
\paragraph{First paragraph} \lipsum[4]
\paragraph{Second paragraph} \lipsum[4]
\end{document}

With KOMA-Script classes one would use \RedeclareSectionCommand:

\documentclass{scrartcl}
\usepackage{lipsum}

\RedeclareSectionCommand[beforeskip=0pt]{paragraph}

\begin{document}
\paragraph{First paragraph} \lipsum[4]
\paragraph{Second paragraph} \lipsum[4]
\end{document}
share|improve this answer
    
Thanks. I know I can choose my own settings with titlesec, but in this case I want to know what the spacing is, not how to change it. – Sverre Apr 8 at 19:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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