Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using the paragraph settings shown below: Correct use of \paragraph titles?

1) How can I reduce the size between the paragragphs?

2) Should I reduce the gap between paragraph title and text, and if yes, how can I do it?

MWE:

\documentclass[12pt,ngerman,twoside]{article}

\let\originalparagraph\paragraph
\renewcommand{\paragraph}[2][.]{\originalparagraph{#2#1}}

\begin{document}

\paragraph{Paragraph name}

Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text.Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text. Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text.Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text.

\paragraph{Paragraph name}

Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text.Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text. Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text.Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text.

\end{document}
share|improve this question
1  
Use the titlesec package. It has a \titleformat and a \titlsespacing commands. –  Bernard Jul 20 at 16:52

2 Answers 2

up vote 4 down vote accepted

I would not recommend changing \parskip or any other parameters which often are used in unexpected places and will inevitably have unintended consequences down the road.

You could just rewrite the definition for \paragraph as follows:

\let\originalparagraph\paragraph
\makeatletter
\renewcommand\paragraph{%%
  \@startsection{paragraph}%%                        name                
                {4}%%                                level               
                {\z@}%%                              indentation         
                {1ex \@plus1ex \@minus.2ex}%%        beforeskip
                {-1em}%%                             afterskip
                {\normalfont\normalsize\bfseries}}%% style
\makeatother

In the above snippet, I just copied and pasted the definition for \paragraph and then made changes to the arguments (namely beforeskip) to illustrate how you can modify this to achieve the effects you desire.

Alternatively, you can (as suggested in the comments) use the titlesec package:

\let\originalparagraph\paragraph
\titleformat\paragraph[runin]
                        {\normalfont\normalsize\bfseries}
                        {mypar}
                        {0pt}
                        {}{}
\titlespacing\paragraph{0pt}%%             left margin spacing
                       {1ex minus 0.5ex}%% spacing above the \paragraph
                       {1em}%%             horizontal offset from title (horizontal because the `runin` shape was used.)

The titlesec package gives you a lot of power to control just about anything you would want with how your section commands are formatted that otherwise could be rather difficult to realize.

share|improve this answer

1) Add \setlength{\parskip}{-5mm} before \begin{document} or add \vspace {-1ex} after each paragraph.

2) Add \hspace{-1em} between each paragraph definition and text.

Modify values as needed.

share|improve this answer

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.