I was wondering whether after a \paragraph{paragraph_title} environment I might return to the main text. If so, how can I properly do it in latex?

Example:

\section{Why does the Sun shine?}
main text

\paragraph{Nuclear reactions}
paragraph text

main text pt. 2


With this code, the main text pt. 2 figures as a second paragraph of the \paragraph{} on nuclear reactions. Not as a paragraph of the main section.

• Welcome to TeX.SE! Sep 27 '21 at 14:36
• latex has no way of marking the end of a section it just marks section headings. Note \paragraph is a 4th level heading so should just follow \subsubsection not \section. How would you want to indicate to a reader that a subsection has ended? Sep 27 '21 at 14:37
• To phrase that another way, if you have another paragraph after "main text" but before your \paragraph, it will look exactly the same as "main text pt. 2". So it's not clear how you want to show that your paragraph is a part of the main section. Sep 27 '21 at 15:47
• All section levels are "main" text (i.e, a text that take the fulll text width) so that level only end when another section level start. If you want a "subtext" with title, within main text parasgraph, a description list is an easy and ready solution as this introduce a distinctive indentation, but alternatively could work also another ways to indent the text (quoting, for instance), or boxing it (tcolorbox, for instance) or just change the font type. Hard to guess without know what is your preconceived idea of the right highlight of a "subtext".
– Fran
Sep 27 '21 at 17:12

You could use the paragraph environment.

\documentclass{article}

\begin{document}

\section{Why does the Sun shine?}
main text
\begin{paragraph}{Nuclear reactions}
Paragraph text
\end{paragraph}
main text pt. 2

\end{document}


• Welcome to TeX.SE. I'm not sure this will work. Without a blank line after the end, the next line is still part of the previous paragraph. And with a blank line, I think that this is actually equivalent to OP's snippet, but with a group around the environment body. Sep 27 '21 at 15:45
• putting a group around a section heading can have unexpected results, I would not recommend this. Sep 27 '21 at 15:51
• I added the output from your suggested code. I'm not sure if that is the output the original poster wanted. Sep 27 '21 at 15:53