How to code Hanging Indents once so that apply throughout document

Court filings often require that paragraphs be numbered sequentially throughout the filing. Even if there are headings that interrupt the paragraphs, the next paragraph must be numbered sequentially from the paragraph above it.

In Typst, the use of the + to number a paragraph does not number sequentially (or I could not make it work) if a heading is inserted. Numbers of the paragraph start over.

To overcome the problem of paragraphs not being numbered sequentially if a heading is inserted I used counter.

#let para(body) = [
  #para-counter.step()
  #context para-counter.display("1.") #body
]

Each paragraph is in a block, like so:

#para[
This is a test of numbering paragraphs of a complaint and of using double
spacing for the text-24pt. Let's see if it wraps around and then does a
correct hanging indent.]\

But the paragraph does not create a hanging -indent, which is something I want.

The code

#set par(hanging-indent: 1.3em)

does create a hanging-indent in the #para[ block text, but only in the first paragraph. The remaining paragraphs are indented in the wrong place.

The problem is I have to put #set par(hanging-indent: 1.3em) above each @par to get hanging-indents to form correctly with each paragraph.

If I don’t do that, I get the first paragraph correctly numbered and correctly formated with a hanging-indent. But the subsequent paragraph indent in the wrong place, as the screen shot shows.

What I need is code that sets up hanging-indents that works throughout the document.

Any suggestions?

To reply to myself, it looks like this code may work:

#set par(
  leading: 24pt,
  spacing: 15pt,
  hanging-indent: 1.3em,
  justify: true,
)

Might you repost the code please. There’s a closing “]” missing in the first code fence and the counter #para-counter does not exist so the code does not compile.

To go back to the original usage of enum, the package itemize can help you with resuming the count. Package itemize is also a good idea since it implements references to paragraphs which may come in handy:

#import "@preview/itemize:0.2.0" as el
#show: el.default-enum-list.with(auto-resuming: (true, false))
#show: el.config.ref.with(supplement: "Paragraph")

= Case
+ #lorem(25)
  + And I have a nested list
  + continued
  + continued
  
  - and this kind of list
+ #lorem(25)

== Count I

+ #lorem(15)
  #lorem(15) #el.elabel("item")
+ #lorem(15)

+ See previous claim in @item