LaTeX forum ⇒ Text FormattingEnumerated Paragraphs

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

Enumerated Paragraphs

Postby aram » Fri Jan 18, 2013 8:08 am

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.

Tags:

User avatar
cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm

Postby cgnieder » Fri Jan 18, 2013 3:08 pm

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
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

aram
Posts: 2
Joined: Fri Jan 18, 2013 7:55 am

Postby aram » Tue Jan 29, 2013 1:23 pm

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: 1988
Joined: Sat Apr 16, 2011 7:27 pm

Postby cgnieder » Tue Jan 29, 2013 1:36 pm

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:

  1. \documentclass{article}
  2. \usepackage[inline]{enumitem}
  3.  
  4. \newlist{paragraphs}{itemize*}{1}
  5. \setlist[paragraphs]{
  6. label=(\textbf{\thesection}),
  7. itemjoin=\newline\hspace*{\parindent}
  8. }
  9.  
  10. \usepackage{lipsum}% dummy text
  11.  
  12. \begin{document}
  13.  
  14. \section{Foo}
  15.  
  16. \begin{paragraphs}
  17. \item \lipsum[2]
  18. \item \lipsum[2]
  19. \end{paragraphs}
  20.  
  21. \section{Bar}
  22.  
  23. \begin{paragraphs}
  24. \item \lipsum[2]
  25. \item \lipsum[2]
  26. \end{paragraphs}
  27.  
  28. \end{document}


Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim


Return to “Text Formatting”

Who is online

Users browsing this forum: Google [Bot] and 5 guests