# 4 digit paragraph enumeration

hi,

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 close merge delete

Sort by » oldest newest most voted

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.

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.

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?

( 2018-04-30 16:43:02 +0100 )edit
1

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

( 2018-04-30 17:24:18 +0100 )edit

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

( 2018-04-30 17:27:08 +0100 )edit

Thank you.

but:

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

( 2018-05-01 05:13:13 +0100 )edit
1

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

( 2018-05-01 08:31:04 +0100 )edit

Thank you guys for the info!

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

more

1

( 2018-05-03 21:31:46 +0100 )edit

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.

Done.

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.

more

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.

more