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 Answers
\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
-
1
-
-
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".– AnandDec 16, 2012 at 21:37
-
1so 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
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}
-
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
\paragraph
is made. and a question about your big formulas -- do you input them separately, or do you use something like theamsmath
multi-line structures?