How can one number paragraphs in LaTeX?

前端 未结 4 725
北恋
北恋 2021-02-05 04:35

Given a bunch of paragraphs:

Para. A ...

Para. B ...

Para. C ...

How can one have LaTeX automatically number them, i.e.

1. Pa         


        
4条回答
  •  甜味超标
    2021-02-05 05:02

    In my case I ended up solving this by redefining a new macro \P that works like a paragraph.

    \newcounter{paranum}
    \newcommand{\P}{\vspace{10pt}\noindent\textbf{\refstepcounter{paranum}\theparanum}\textbf}
    

    To write a new "paragraph" I do

    \P{Paragraph title No. 1} ...text...
    ...
    \P{Paragraph title No. 2} ...text...
    

    To make the enumeration be linked to the section I use

    \newcounter{paranum}[section]
    \newcommand{\P}{\vspace{10pt}\noindent\textbf{\thesection.\refstepcounter{paranum}\theparanum}\textbf}
    

    I know that this is actually botched-up but ended up working for me.

提交回复
热议问题