4 digit paragraph enumeration


is there a way to enumerate paragraphs in the format:

[0001] qqq

[0010] wwww

[0132] rrrr

this format is common in patent applications

I am also interested in this feature. Is there a better way…now that we’ve had a few new releases?

FWIW, it will work correctly in an imported Word document. I just can figure out how to do it natively.

The 0’s in @dajare’s approach can be automated by using a conditional text field for each potential 0. This gets entered under Insert → Fields → More Fields → Functions → Conditional Text. For example, if the number range variable is named “PatentPara”, then use the following to display the first 0.

  • Condition: PatentPara > 8
  • Then: (leave blank)
  • Else: 0

The condition for the second 0 is PatentPara > 98, and the third 0 condition is PatentPara > 998.

Sample file: Conditional Padding.odt

Deleting one of the paragraphs will adjust all of the other numbers automatically, as well as the number of padded 0’s.

One way to create a new number is to copy and paste the fields. The number will automatically increment, and the padded 0’s will adjust appropriately. Or set up a hotkey as @dajare described.

Nice refinement, @jimk - thanks! I wondered about automating the “zeros”, but didn’t have more time to invest in poking into the “contitional text” field. Btw - don’t you want to set up the condition as >9 or >99, etc? If you use “~8”, as currently, then “9”, “99”, and “999” will be incorrectly padded. Or am I missing something?

@dajare I think the problem is order: the conditional zeroes “see” the previous PatentPara number range, not the following one. So if the previous value is 9 then the next will be 10, that’s why you need to use 8, 98, etc.

@RGB-es - Doh! I thought I must be missing something. :smiley: Thanks for clarifying!

Thank you.


When I add a paragraph to the Sample file “Conditional Padding.odt” it is not enumerated…

@ShokoBo - Simply hitting Enter doesn’t add the [nnnn] paragraph number. As Jim_K said: you’ll need to “copy and paste the fields”, or set up a hotkey to automate inserting that string. Could you confirm: does copy/paste work? (It works for me on that helpful sample file.)

To the best of my knowledge, unfortunately no.

You can insert square brackets with Before and After attributes in Options tab of a list style but you can’t force a fixed number of digits.

There is a “workaround” you can set up. I just did a “proof of concept” test, and it worked pretty well.

It isn’t absolutely ideal, in that it involves automating “manual” padding, but within certain constraints, it could be a real time-saver.

I’ll outline the process, and if OP has sufficient interest, I could fill this out in a proper step-by-step. Here are the concepts:

  1. Define a user variable field of the type “number range”.
  2. Assign this to Autotext.
  3. Set up a macro with the following key strokes: [00<autotext-insert>]· (where · is a space, and <autotext-insert> triggers the input of your number-range user-variable, set up in #1).
  4. Assign the macro to a “hotkey” combination of your choice.


Now, a single key input will produce a string like [0032]· in which the 32 bit will auto-update in editing to reflect new counters. It might sound a bit clunky, but once set up, works really quite well.

Obviously this test assumes that most paragraphs only need padding with two zero’s. There are only ever going to be nine (or ten, if [0000] is used) where three zero’s are needed. One could easily set up a “two-pad” hotkey for 10-99, and “one-pad” hotkey for paragaphs numbering 100-999.

Thank you guys for the info!

…very important to have an alternative to MS Office

Glad this was helpful. Please respond as described in guidelines for asking: 1) Answers are for answers only. Add a comment instead of using the answer box. 2) If one of the answers was acceptable, mark it as correct by clicking the checkmark. 3) Upvote any answers that were helpful.