4

When I use \paragraph{...}, the vertical spaces in general are too big. I need to manually put \vspace{-5em} in front to adjust the spacing. It is not robust and unnatural. One reason may be that I have many big formulas (with many lines). Does anyone know a good way to adjust this vertical spacing automatically?

2
  • 1
    a minimal working example (MWE) would be helpful. at least the document class you are using is necessary, since that is where the initial definition of \paragraph is made. and a question about your big formulas -- do you input them separately, or do you use something like the amsmath multi-line structures? Dec 15, 2012 at 15:23
  • Thanks barbara beeton, I am using amsmath. The documentary class is book (I am writing my thesis). For the formulas, I use align, multline, etc. :-)
    – Anand
    Dec 16, 2012 at 21:32

2 Answers 2

6

\paragraph in article class is defined by

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

so the skip before is 3.25 ex by default, so adding a negative -5em spacing would almost always make it over-print the preceding text.

You can repeat the above definition use \renewcommand instead of \newcommand and reduce the spacing. (It would need to be in a local package or between \makeatletter and \makeatother because of the @ in the command name.)

Are you sure you need to use \paragraph at all? It is not a commonly used command, it is just for 4th level sections after \section \subsection and \subsubsection

4
  • 1
    It's probably better to mention \makeatletter and \makeatother
    – egreg
    Dec 16, 2012 at 17:13
  • @egreg answer edited:-) Dec 16, 2012 at 17:24
  • Dear David Carlisle, thank you very much for your answer. I am using (intensively) paragraph environment in my proofs to indicate different cases. Probably this is not a good habit. I am writing my thesis, so the documentary class is "book".
    – Anand
    Dec 16, 2012 at 21:37
  • 1
    so in book, there is \chapter above \section so \paragraph (command, not an environment) is intended to be 5th level subsections. You haven't shown how you are using it but as I said originally there is something strange if you are getting so much space that -5em space is not causing overprinting. Dec 16, 2012 at 21:41
0
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}
1
  • 3
    \parskip is not directly related to the \paragraph command (which is a section heading) The code in this answer will affect the spacing of every paragraph in the document. Dec 16, 2012 at 15:01

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.