3

I wrote all my text using the command \paragraph{} and now I'm difficulties to indent and set the spacing between paragraphs. I would like to indent the first line of paragraphs with spacing of 1.25 cm. But when I use \setlength{\parindent}{1.25cm} the first line don't set. Is there any way to set the first line of the paragraph using the command ? And how can I set the distance between the paragraphs to 0cm, created with \paragraph ?

ex:

\documentclass[10pt,a4paper]{article}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\setlength{\parindent}{1.25cm}
\begin{document}
\paragraph{} \lipsum[1] %tow spaces between paragraph

\paragraph{} \lipsum[2]
\lipsum[3] %anyone spaces between paragraph
\lipsum[4]
\end{document}

enter image description here

  • 6
    \paragraph is a sectioning command like \section: it does not mean 'start a new paragraph'. If that is what you mean here, you should be leaving a blank line between the paragraphs. – Joseph Wright Jan 13 '15 at 7:04
  • Thank you man, I really did not know that. So what's the real utility of the command \paragraph{}? when I can use it ? – Freitas Jan 13 '15 at 7:12
  • 2
    \paragraph{<text>} is a "lower" type of heading (in the sense that \chapter{<text>} is "higher" than \section{<text>}, which is higher than \subsection{<text>}). – jon Jan 13 '15 at 7:18
  • 1
    To change the vertical distance between paragraphs, don't modify \parindent. Instead, do something like \addtolength\parskip{1\baselineskip}. – Mico Jan 13 '15 at 7:28
  • 1
    @Freitas \paragraph is just what could have been called \subsubsubsection except that that name is getting long. If you set tocdepth and secnumdepth counters higher than 4 you will see it produces numbered headings and table of contents entries assuming that it is just below subsubsection in the hierarchy. – David Carlisle Jan 13 '15 at 12:38
3

You actually chose a poor example, since \lipsum starts a new paragraph unless you call the lipsum package with the nopar option. As such, leaving an empty space between paragraphs is fine to separate paragraphs.

Issuing a \paragraph{} to start a new paragraph is, however, not the best idea. You can "rectify" this by redefining what \paragraph means. In this case, it suffices to make it equivalent to \ignorespaces:

enter image description here

\documentclass{article}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\setlength{\parindent}{1.25cm}
\let\paragraph\ignorespaces
\begin{document}
\paragraph{} \lipsum[1]

\paragraph{} \lipsum[2]
\lipsum[3]
\lipsum[4]
\end{document}
5

If you don't want to change your document, deleting all \paragraph commands, you can load the titlesec package and issue

\titlespacing*{\paragraph}{0pt}{0pt}{0cm}

MWE:

\documentclass[10pt,a4paper]{article}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum

\setlength{\parindent}{1.25cm}

\usepackage{titlesec}
\titlespacing*{\paragraph}{0pt}{0pt}{0cm}

\begin{document}
\paragraph{}\lipsum[1] %tow spaces between paragraph

\paragraph{} \lipsum[2]
\lipsum[3] %anyone spaces between paragraph
\lipsum[4]
\end{document} 

Output:

enter image description here

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.