Ask Your Question

4 digit paragraph enumeration

asked 2018-04-29 15:05:49 +0200

ShokoBo gravatar image


is there a way to enumerate paragraphs in the format:

[0001] qqq ...

[0010] wwww ...

[0132] rrrr

this format is common in patent applications

edit retag flag offensive close merge delete

4 Answers

Sort by » oldest newest most voted

answered 2018-04-30 15:51:44 +0200

Jim K gravatar image

updated 2018-05-16 09:48:46 +0200

David gravatar image

The 0's in @David'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 @David described.

edit flag offensive delete link more


Nice refinement, @Jim K - 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?

David gravatar imageDavid ( 2018-04-30 16:43:02 +0200 )edit

@David 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 gravatar imageRGB-es ( 2018-04-30 17:24:18 +0200 )edit

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

David gravatar imageDavid ( 2018-04-30 17:27:08 +0200 )edit

Thank you.


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

ShokoBo gravatar imageShokoBo ( 2018-05-01 05:13:13 +0200 )edit

@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.)

David gravatar imageDavid ( 2018-05-01 08:31:04 +0200 )edit

answered 2018-05-03 20:52:37 +0200

ShokoBo gravatar image

Thank you guys for the info!

...very important to have an alternative to MS Office

edit flag offensive delete link more



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.

Jim K gravatar imageJim K ( 2018-05-03 21:31:46 +0200 )edit

answered 2018-04-30 00:13:52 +0200

David gravatar image

updated 2018-04-30 09:35:53 +0200

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.

edit flag offensive delete link more

answered 2018-04-29 15:16:12 +0200

ajlittoz gravatar image

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.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-04-29 15:05:49 +0200

Seen: 62 times

Last updated: May 16