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?

  • 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? – barbara beeton Dec 15 '12 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 '12 at 21:32

\paragraph in article class is defined by

                                    {3.25ex \@plus1ex \@minus.2ex}%

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

| improve this answer | |
  • 1
    It's probably better to mention \makeatletter and \makeatother – egreg Dec 16 '12 at 17:13
  • @egreg answer edited:-) – David Carlisle Dec 16 '12 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 '12 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. – David Carlisle Dec 16 '12 at 21:41
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}
| improve this answer | |
  • 2
    \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. – David Carlisle Dec 16 '12 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.