Text FormattingEnumerated Paragraphs

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
aram
Posts: 2
Joined: Fri Jan 18, 2013 7:55 am

Enumerated Paragraphs

Post by aram »

Generally paragraphs are not enumerated in Latex. But it has been a common occurrence especially on govt reports that, within a particular section/subsection, certain points are enumerated with the corresponding section/subsection number prefixed. I would like to know how to do that in Latex --either to treat each of the points as sub(sub)sections without a title, or as paragraphs specially enumerated? Thanks in advance. Which is better and how it is to be done? Thanks in advance.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Re: Enumerated Paragraphs

Post by cgnieder »

Hi aram,

Welcome to the LaTeX community!

I am not sure I understand what you mean. Can you elaborate a bit and maybe post an example of what the code and the pdf should look like in the end?

Regards
site moderator & package author
aram
Posts: 2
Joined: Fri Jan 18, 2013 7:55 am

Re: Enumerated Paragraphs

Post by aram »

What I mean by enumerated paragraphs is that, in a particular section/subsection, a list of short paragraphs which are enumerated but prefixed with the concerned section/subsection number. In some documents say,a statement of some society byelaws they list out a range of short paragraphs(hardly three or four lines in each para). But these paragraphs are actually enumerated lists, the only difference is, the numbers are prefixed by the concerned section/subsection numbers. I hope I have made it clear.
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Enumerated Paragraphs

Post by cgnieder »

aram wrote:[...] these paragraphs are actually enumerated lists, the only difference is, the numbers are prefixed by the concerned section/subsection numbers.
Maybe you should actually use a list then. The enumitem package could help here:

Code: Select all

\documentclass{article}
\usepackage[inline]{enumitem}

\newlist{paragraphs}{itemize*}{1}
\setlist[paragraphs]{
  label=(\textbf{\thesection}),
  itemjoin=\newline\hspace*{\parindent}
}

\usepackage{lipsum}% dummy text

\begin{document}

\section{Foo}

\begin{paragraphs}
 \item \lipsum[2]
 \item \lipsum[2]
\end{paragraphs}

\section{Bar}

\begin{paragraphs}
 \item \lipsum[2]
 \item \lipsum[2]
\end{paragraphs}

\end{document}
Regards
site moderator & package author
Post Reply