3

Inside a section, I have plain text and a paragraph. The section starts with normal text, then there is a short paragraph, and finally the normal section text continues. The last part of the text should look different from the paragraph and continue in the same style as the first part of the section.
How can the paragraph be ended? This is what my code looks like:

\section{My_section}
%...text here...  
\paragraph{My_paragraph}
%...text paragraph...  
%?How to end the paragraph?
%...the text of the section continues
  • normally I do an empty line to indent the the next paragraph but not sure if this is what you want. – Rico Jun 3 '13 at 7:54
  • how is, in your case, »normal text« different from a paragraph? In my documents, all normal text is divided into paragraphs; i.e. all paragraphs consist of normal text. Would a centered asterisk be an option? Something like this? – Nils L Jun 3 '13 at 8:18
  • What's the purpose of the paragraph in the middle of your section? Is it a theorem? A quotation? – John Wickerson Jun 3 '13 at 8:28
  • 2
    \paragraph is a sectioning unit it should come in the sequence \section, \subsection, \subsubsection, \paragraph, \subparagraph so should not appear after \section. Perhaps you want the quote environment to make a visually distinct paragraph? – David Carlisle Jun 3 '13 at 8:57
3

\paragraph only marks the beginning of a paragraph; there is no way for it to be closed.
I would recommend using an custom environment instead, because it allows you to control what is happening inside of it.

For instance, to mimic the \paragraph{} command, you could define

\newenvironment{para}[1]
    {%here comes what is processed before
    \noindent\textbf{#1}\hspace{1em}\ignorespaces}
    {%and here what is processed after
    \par}

Now, you can use

\begin{para}{My_paragraph}
    here goes the paragraph text
\end{para}
...and you can continue your section.

You can add whatever you like to the definition of the environment, like \small for the text to be in smaller font, or ending it with a special symbol, like Nils suggested.

  • It sounds a bit odd as solution. Is this because we are not supposed to exiting sub-levels? As @David is suggesting, "\subparagraph so should not appear after \section"... so, is there some base idea that we have not clear yet? I say "we" because I came across this question since I was trying to do the exact thing @Marco was doing. – Atcold Nov 13 '13 at 18:06

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.