LO Writer equivalent of MS Word SEQ field?

In MS Word, I can insert a SEQ field to get a number which increments on every consecutive appearance.

Does LO Writer support this? I’m looking at Insert | Field and not finding anything which looks equivalent (and I don’t want to set-a-variable and show-a-variable for every appearance).

Use a field of type Set variable and for example name it variable and as value assign variable=variable+1

Thanks. But - this is not obvious:

  • The user may not assume that setting a variable also displays its value, when there’s another field kind named “Show variable”
  • There’s not much indication of the extent of expressivity of the expression assigned to a variable.
  • The user may assume they would need to set the variable to 1 first, and use other expressions later to advance the value, while in fact, just using myvar=myvar+1 throughout works well

There are lots of unobvious with Set Variable. Start with tdf#111888.

What you are looking for is a number range in Writer parlance. It is commonly used to number tables, images, …

  • Insert>Field>More Fields, Variables tab
  • Type Number range
  • either Select and existing one or create your dedicated counter by typing a Name
  • choose the desired Format

The Value box is left blank for automatic incrementation. But you can enter a value to reset the sequence or (re)start it at a specific number.

A number range can also be automatically prefixed with the current chapter number

1 Like

But this way, I can’t copy the field which set the first value to other places, and have the value auto-increment - I would need one kind of field for the setting of the first value and another for the auto-increment.

I don’t see the problem. The Value field is a property of the occurrence. So you have two ways for doing it:

  • Insert>Field>More Fields where you select your number range “as is”
  • copy one field, paste it somewhere and double-click on it to restore the “xxx+1” in the Value field

IMHO, you never copy a number range field; it is too much fuss to restore the incrementation if you chose the “wrong” occurrence.


If you sequence starts from 1 (which is the default), you need not force the initial value. This is done by Writer for you.

Your question was about an equivalent for M$ SEQ field, but you didn’t give hints about the use of it. There may be better solutions, notably if you want to number paragraphs/items, i.e. create a list. In Writer you have list styles to define multi-level counters with a wealth of options to format both the number, its position and indents for the item.

What do you mean by “selecting the range as-is”?

I want a field whose first occurrence will have a value of, say, 789, and further occurrences (e.g. resulting from copying and pasting the first occurrence or any other occurrence) will have consecutive values: 790, 791 etc.

I don’t understand what you mean by “selecting a number range as-is”. I don’t want to have to change anything about the field after copying it - that’s the problem. Maybe I should file a bug about this? i.e. adding an initial value property to Number Range fields?

I.e. you don’t change anything in the insert dialog.

Well, you should instead Insert>Field>More Fields. It will open on the last used tab. In case this was Variables. Click on name and OK.
If you find there are too many steps and you have to leave keyboard for mouse, assign a shortcut to the menu item in Tools>Customize; the rest can be done with keyboard.

If your preferred workflow is copy/paste, copy from a non-initial occurrence.

Yet another approach is to define an AutoText entry containing an ad hoc number range field. After that, you type the AutoText “id” + F3. This may be the shortest and cleanest way.

I don’t think this is a good idea. It would impact a lot of things in Writer for a “niche” usage. IMHO setting a starting value should remain a direct formatting action, just like other formatting “accidents” (formatting directives for “exceptional” circumstances, occurring very rarely in a document).
Basically a number range is a variable with an implicitly incrementing value. A number range itself has additional properties/attributes like numbering by chapter.
The underlying device is also used in list styles with yet other extra properties, but you’re right, provision has been made for user to provide an initial value.

That’s not convenient enough.

Also, if I want to change the initial value, I’d need to scroll to the initial field appearance and modify it. I’d rather be able to modify using any copy of the field.

I understand less and less the problem. Do you want a numbered list (where the sequential number is at start of paragraph with optional separators)? Do you want some numbered caption? Or do you need a really arbitrarily positioned monotonic number?

Arbitrarily positioned field with auto-incremeting numeric value (or number-like sequence value), any instance of which can be copied and made into the next instance, and which can start with any value.

Then the simplest way is Insert>Field>More Fields though it requires keyboard/mouse switches and many strokes.

I have filed a bug against LO, bug 155263, for implementing a SEQ-like field with an initial value property.

1 Like

[A belated attempt at a solution
In general, I agree with the objections to FeatureRequest tdf#111888. The new tdf#155263 created by the OQ is, in my opinion, invalidated by the attached example. ]

That NumberRange fields don’t offer a setting for the initial value that gets repeated to every copy and can be edited from there afflicting all the other instances, also those above, may be seen “not convenient enough”. Implementing this feature, however, would block the current feature that any instance of the sequence can be used to restart the sequence with a newly set starting value only afflicting the subsequent instances.
My considerations should be clarified and exemplified in the attached example.
ask91411NumberRangeIsntMsSEQ.odt (71.4 KB)
Please note that the main demo only requires a single creation of a new NumberRange subtype, and a simple editing in each of the places where the behaviour shall change. To not make the editing of one instance of a downward monotonous sequence afflicting fields upward, I would judge to be reasonable.

1 Like

I think this discussion belongs on one of the two bugs rather than on this question page…

@Lupp Good demonstration that existing fields don’t need contorted “imported feature definition” to achieve the same result. Casual users have difficulty to understand that Writer is not word or they refuse to admit it.

As already stated many times, the closest equivalent is a number range. And a number range is nothing else than a set variable with a few additional properties (like numbering per chapter).

Personally, I prefer a somehow manual approach with a number range or set value to a more “automated” feature like SEQ because everything is under my control. OP requests the ability to define starting value in field configuration but what if another user wants a step value (e.g. to get only even values)? Should we make the SEQ definition even more complex? This can be done presently as easily as configuring variableName+2 in the Value entry box.

We’ve already established that neither Set Variable nor Number Range can have the same effect as SEQ: One still needs to insert different fields for incrementing and for resetting and can’t just copy. Thus,

This can be done presently as easily as configuring variableName+2 in the Value entry box.

… is not true.

That said - if a manual, highly-customizable option like you would like were actually available + easy enough for the user to figure out how to work with (and I mean a reasonably-proficient user, not an absolute newbie who knows nothing) - that would be fine by me.

As for SEQ - it caters to a very common use-case for fields. Common enough to merit catering by LO as well.