Customizing Number Format of each level in "Writer->Tools->Outline Numbering"

Hi Sina
Sina Momken schrieb:

Let me show you what exact Outline Numbering I want using the example
below:

Level Example(desired output) Associated Paragraph Style
1 Chapter 3: Chapter
2 3.2- Heading 1
3 3.2.5- Heading 2
4 3.2.5.9- Heading 3
5 (b) none
6 Fig (3.12) Fig Caption
7 (3.27) Formula
8 Table (3.20) Table Caption

As you can see in the example above the '3' in "Fig (3.12)", "(3.27)"
and "Table (3.20)" is the chapter number at level 1.
[..]

How can I achieve my desired output I mentioned in first example using
LO Writer?

You do the outline numbering with Chapter, Heading 1 , ... with normal
outline numbering. You need to define a paragraph style "Chapter" and
alter the assignment between paragraph style and level in the outline
numbering dialog.

LibreOffice uses the field "Number range" for numbering in captions.
Therefore these are not at all in the outline numbering. But when you
insert a caption to a table or figure, you will see a Options-buttons.
There you can tell LibreOffice to count newly for each chapter.

The "caption" item in the context menu is only a shortened way to set a
caption. You can also write your own caption inserting the field
"Number
range" manually. That will be the right way for numbering formulas.

The Autotext FN puts the formula and the formula-numbering in a
table. I
would not use it, because it is not easily possible to move paragraphs,
when the movement crosses a table. I would position the formula number
using a tab. For display formulas in own paragraphs you can define a
suitable paragraph style.

The captions are normal paragraphs, so you can add the needed brackets
manually as you need them.

Each "Number range" will generate its own index later on.

The numbers of the outline can be inserted using fields.

Do not try to mimic the way things are done in Word, the concepts are
different. But you can be sure, that you can write well formatted
academic papers in LibreOffice.

Kind regards
Regina

Using LibreOffice internal captions or "Number range" has some problems
that MUST be solved to be used:

1. Cross-Reference in the text body: Assume you has inserted a new
"Number range" named "Fig" either using "Caption" or inserting manually.
Regardless of the need to manually correct brackets and the whole
format, when you want to insert the Fig number in your text using
Cross-reference, there is NO way to insert the whole Fig number while
preserving its format. For example if you has entered the text "Fig
(2.1) something" under a picture, there is no way to automatically
insert "Fig (2.1)" in your text using Cross-reference.

I first must admit that I didn't read this whole thread and I'm not
sure what you actually need, but think you can insert text "Fig (2.1)"
in a cross reference.

I hope I understood you well and I really wont to help you:

First you should insert your picture and set anchoring as Regina said.
Then insert text "Fig." after that go Insert - Cross-reference, choose
Variable tab and there (in format box) select Text, enter e.g "(2.1)"
and then write rest of the caption text.

There is no need to insert "(2.1)" in this way manually. This way of
inserting caption numbers doesn't count automatically and is not
recommended at all. The "Number range" solution which Regina has also
explained above is much better.

Now select only "Fig. (2.1)" or what ever you need and go to
Cross-reference tab, choose Set reference, enter it's name in Name
box, and choose Insert.

Place your cursor in desire position and then in Cross-reference tab
choose insert reference, select reference, and in a white box left to
the Name select Reference, hit Insert.

This is good way to define a reference to any position of document and
then refer to it (or its page number, etc.) later. But as I said before
referring to a "Number range" could be enough. However I have to retype
"Fig (" before and ")" after where I want to insert a reference to a
Number_range.

I hope that's what you wont to do. You still have to manually insert
Variables and set cross-reference, but you sort the brackets problem.

Manually inserting variables is very bad idea. The alternatives I've
described above are better.

Kruno

And, you can always define a custom style for that "Fig (2.1)" variable
text and then go Insert - Indexes and tables - Indexes and tables -
Additional styles, choose three dots right to label and define that
style to level you need...

I already knew this way to make table of figures using specific
paragraph styles. I think this is best (or maybe only) way to make table
of figures and and it was one of the reasons I wanted to assign a
paragraph style to fig_captions.

Not sure does thins helps you, but hey... :slight_smile:

Thank for your suggestions,
Sina

Hi Sina,

Sina Momken schrieb:

Hi Sina

[..]

You do the outline numbering with Chapter, Heading 1 , ... with normal
outline numbering. You need to define a paragraph style "Chapter" and
alter the assignment between paragraph style and level in the outline
numbering dialog.

LibreOffice uses the field "Number range" for numbering in captions.
Therefore these are not at all in the outline numbering. But when you
insert a caption to a table or figure, you will see a Options-buttons.
There you can tell LibreOffice to count newly for each chapter.

The "caption" item in the context menu is only a shortened way to set a
caption. You can also write your own caption inserting the field "Number
range" manually. That will be the right way for numbering formulas.

The Autotext FN puts the formula and the formula-numbering in a table. I
would not use it, because it is not easily possible to move paragraphs,
when the movement crosses a table. I would position the formula number
using a tab. For display formulas in own paragraphs you can define a
suitable paragraph style.

The captions are normal paragraphs, so you can add the needed brackets
manually as you need them.

Each "Number range" will generate its own index later on.

The numbers of the outline can be inserted using fields.

Do not try to mimic the way things are done in Word, the concepts are
different. But you can be sure, that you can write well formatted
academic papers in LibreOffice.

Kind regards
Regina

Using LibreOffice internal captions or "Number range" has some problems
that MUST be solved to be used:

1. Cross-Reference in the text body: Assume you has inserted a new
"Number range" named "Fig" either using "Caption" or inserting manually.
Regardless of the need to manually correct brackets and the whole
format, when you want to insert the Fig number in your text using
Cross-reference, there is NO way to insert the whole Fig number while
preserving its format. For example if you has entered the text "Fig
(2.1) something" under a picture, there is no way to automatically
insert "Fig (2.1)" in your text using Cross-reference.
When using Cross-reference, after selecting Fig as the type, you can
insert the whole paragraph (i.e. "Fig (2.1) something") by selecting
"Insert reference to = Reference" or you can even insert "Fig (2.1" by
selecting "Insert reference to = Category and Number" but you can never
insert the well-formatted text "Fig (2.1)".
The ability to cross-reference a caption is very very important, since I
can not insert Fig numbers manually because in that case I must update
all caption numbers in text whenever they've changed in the caption.

That is correct. The number of the "Number range" is the delimiter.
You can
- write the text around the referenced number directly and only insert
the number itself as reference
- insert category and number from reference and add the closing bracket
manually
- mark the part of the caption, that you want to be shown in the
reference, set is as bookmark, and then reference the bookmark.

In German the first option is in many cases appropriate, because the
category often has the wrong ending for the current grammatical context.

Yeah, I'll choose the first option too. It's more flexible for many
languages and is very similar to referring to a label in LaTeX. However
whenever I want to refer to a fig, I must manually type "Fig (" before
and ")" after the reference number; But this procedure can be automated
by defining a new Autotext. Thanks for introducing Autotexts to me.

A different way is to use an autotext. I will describe it below.

2. Insertion of a frame when Right-click->Caption: Using "caption" item
in context-menu is very easy, but unfortunately it places both the image
and it caption in a frame. Using frame can be good to maintain image and
its caption in a page, but I don't like it because unfortunately the
frame resizes the image! Actually some of the images I've inserted are
very big and I intentionally resized them to be wider than width of the
paragraph. Also having images wider than the paragraph maybe not
standard, but if I keep them smaller their details may become unreadable.
Is there any way to not insert a frame or not resize the image after
insertion of frame when we're using "context-menu->caption"?

Right-click the picture (not the frame). Item 'Picture' > tab 'Type'. In
the section 'Size' you will see, that the automatism has set the width
to relative 100%. When you change this back to an absolute value, the
picture size will be independent of the frame size.

Yeah it worked. However I had to deselect "Keep ratio" too.

This automatically inserted frame has another disadvantage. It is not
possible to set a footnote to the caption.

Here a way to get a caption without using the wizard:

When you insert the picture, it is anchored to an empty paragraph as
default. Open the paragraph properties of this paragraph and enable
option "Keep with next paragraph" in tab "Text flow". Then in the next
paragraph enter your caption.

Honestly speaking I don't know what exactly the Anchor is. My images are
mostly "Image_Select->Context_Menu->Anchor->To_Character". And I don't
know how to select the paragraph a image is anchored to. But I know what
you mean by this technique. Using this technique the image and its
caption will always be with each other (and not seperated to 2 different
pages). My main question is whether there is a way to automate this
procedure too? Because setting these options whenever I want to insert a
caption is a hard and lengthy task. Isn't there a macro or something to
do this too?

To enter the caption quickly, you can generate an autotext. You need to
do this only once. Mark the whole paragraph of an proper styled caption
and generate an autotext of type "New", not type "New (only text)". This
autotext will include the paragraph style too. Open it for edit and
delete the special picture title, but not the closing bracket and the
space and save it.
Now you can insert the caption by inserting an autotext. It will be the
same as inserted by the caption wizard, but including the closing
bracket and without generating a frame. Of cause you have to enter the
current picture title after inserting the autotext.

There are also some LESS SEVERE problems in using "Number range" or
"caption":

A. Insertion of a well-formatted caption: Unfortunately there is no
short and easy way to insert a well-formatted caption in Writer. Anytime
I insert a caption I have to manually correct the brackets and other
things I need. I wished there was a way to do so automatically.

This is solved when using an autotext, see above.

B. Using "Number range" is not as easy as using a predefined Numbering:
When you use a predefined Numbering you don't need to worry about
numbering format and correct it anytime.
Plus you can associate that predefined numbering to a paragraph style
and whenever you use that style for your caption, the proper numbers and
their constant text will appear as a special kind of numbering without
the need to manually insert them.
Using a Numbering like those in "Outline Numberings" also gives the
option to precisely determine Position of each numbering which is more
accurate than manually placing a "Number range" before our caption text.

Position of the caption should be the left edge of the picture. If you
do not have an enclosing frame, you can align them by using a tab for
both the picture and the caption or align both left and use the left
indent of the paragraphs.

So do you think these problems or at least the first serious problems
can be solved when using "Number Ranage" or "caption"?

I can only describe which features LibreOffice has. It is up to you to
decide whether you will use LibreOffice or go with Word.

Thank yo very much for describing features of LibreOffice. It seems that
you're very professional in LO settings and your guides almost solved my
issues. I'll not go back to MS Word, because I work in Linux, I don't
want to use proprietary software and I've almost done most of my thesis
using LO Writer and shifting back to Word takes much more time and effort.

Fortunately the Word template was compatible enough with LO Writer and I
only have to change the Outline_Numbering and its associated styles. I
also have to manually replace numbering of all (figures, tables and
formulae) captions and references to them which may take some hours.

If you can introduce a way to automate the "Keep with next paragraph"
solution, all the problems will be solved.

Best,
Sina Momken

Hi Sina,

Sina Momken schrieb:
[..]

Here a way to get a caption without using the wizard:

When you insert the picture, it is anchored to an empty paragraph as
default. Open the paragraph properties of this paragraph and enable
option "Keep with next paragraph" in tab "Text flow". Then in the next
paragraph enter your caption.

Honestly speaking I don't know what exactly the Anchor is. My images are
mostly "Image_Select->Context_Menu->Anchor->To_Character". And I don't
know how to select the paragraph a image is anchored to. But I know what
you mean by this technique. Using this technique the image and its
caption will always be with each other (and not seperated to 2 different
pages). My main question is whether there is a way to automate this
procedure too? Because setting these options whenever I want to insert a
caption is a hard and lengthy task. Isn't there a macro or something to
do this too?

That can be likely done by a macro, but I have not written such a macro. If you accept the dispatcher kind macros, you can record a macro for setting this property. In LibreOffice you need to enable this first in the Advanced sections in the General options. You can make a toolbar button for executing the macro or define a shortcut key. This way will be really quick once it is prepared.

Other idea: If the paragraph is empty apart from the image, you can use a special paragraph style. If you have assigned it once, it is listed in the paragraph style drop-down-list of the toolbar. That will be a quicker access then opening the paragraph properties dialog.

[..]

I can only describe which features LibreOffice has. It is up to you to
decide whether you will use LibreOffice or go with Word.

Thank yo very much for describing features of LibreOffice. It seems that
you're very professional in LO settings and your guides almost solved my
issues.

I'm user since 1999 with StarOffice 5.1 and happy to try out new things. This way a lot of knowledge collects over time. But there are still parts in the application, which I do not know at all, for example "XML Form Document".

  I'll not go back to MS Word, because I work in Linux, I don't

want to use proprietary software and I've almost done most of my thesis
using LO Writer and shifting back to Word takes much more time and effort.

Fortunately the Word template was compatible enough with LO Writer and I
only have to change the Outline_Numbering and its associated styles. I
also have to manually replace numbering of all (figures, tables and
formulae) captions and references to them which may take some hours.

If you can introduce a way to automate the "Keep with next paragraph"
solution, all the problems will be solved.

I hope my suggestions will solve it for you.

Kind regards
Regina

Hi Sina,

Sina Momken schrieb:

Hi Sina

[..]

You do the outline numbering with Chapter, Heading 1 , ... with normal
outline numbering. You need to define a paragraph style "Chapter" and
alter the assignment between paragraph style and level in the outline
numbering dialog.

LibreOffice uses the field "Number range" for numbering in captions.
Therefore these are not at all in the outline numbering. But when you
insert a caption to a table or figure, you will see a Options-buttons.
There you can tell LibreOffice to count newly for each chapter.

The "caption" item in the context menu is only a shortened way to set a
caption. You can also write your own caption inserting the field "Number
range" manually. That will be the right way for numbering formulas.

The Autotext FN puts the formula and the formula-numbering in a table. I
would not use it, because it is not easily possible to move paragraphs,
when the movement crosses a table. I would position the formula number
using a tab. For display formulas in own paragraphs you can define a
suitable paragraph style.

The captions are normal paragraphs, so you can add the needed brackets
manually as you need them.

Each "Number range" will generate its own index later on.

The numbers of the outline can be inserted using fields.

Do not try to mimic the way things are done in Word, the concepts are
different. But you can be sure, that you can write well formatted
academic papers in LibreOffice.

Kind regards
Regina

Using LibreOffice internal captions or "Number range" has some problems
that MUST be solved to be used:

1. Cross-Reference in the text body: Assume you has inserted a new
"Number range" named "Fig" either using "Caption" or inserting manually.
Regardless of the need to manually correct brackets and the whole
format, when you want to insert the Fig number in your text using
Cross-reference, there is NO way to insert the whole Fig number while
preserving its format. For example if you has entered the text "Fig
(2.1) something" under a picture, there is no way to automatically
insert "Fig (2.1)" in your text using Cross-reference.
When using Cross-reference, after selecting Fig as the type, you can
insert the whole paragraph (i.e. "Fig (2.1) something") by selecting
"Insert reference to = Reference" or you can even insert "Fig (2.1" by
selecting "Insert reference to = Category and Number" but you can never
insert the well-formatted text "Fig (2.1)".
The ability to cross-reference a caption is very very important, since I
can not insert Fig numbers manually because in that case I must update
all caption numbers in text whenever they've changed in the caption.

That is correct. The number of the "Number range" is the delimiter.
You can
- write the text around the referenced number directly and only insert
the number itself as reference
- insert category and number from reference and add the closing bracket
manually
- mark the part of the caption, that you want to be shown in the
reference, set is as bookmark, and then reference the bookmark.

In German the first option is in many cases appropriate, because the
category often has the wrong ending for the current grammatical context.

Yeah, I'll choose the first option too. It's more flexible for many
languages and is very similar to referring to a label in LaTeX. However
whenever I want to refer to a fig, I must manually type "Fig (" before
and ")" after the reference number; But this procedure can be automated
by defining a new Autotext. Thanks for introducing Autotexts to me.

A different way is to use an autotext. I will describe it below.

2. Insertion of a frame when Right-click->Caption: Using "caption" item
in context-menu is very easy, but unfortunately it places both the image
and it caption in a frame. Using frame can be good to maintain image and
its caption in a page, but I don't like it because unfortunately the
frame resizes the image! Actually some of the images I've inserted are
very big and I intentionally resized them to be wider than width of the
paragraph. Also having images wider than the paragraph maybe not
standard, but if I keep them smaller their details may become unreadable.
Is there any way to not insert a frame or not resize the image after
insertion of frame when we're using "context-menu->caption"?

Right-click the picture (not the frame). Item 'Picture' > tab 'Type'. In
the section 'Size' you will see, that the automatism has set the width
to relative 100%. When you change this back to an absolute value, the
picture size will be independent of the frame size.

Yeah it worked. However I had to deselect "Keep ratio" too.

This automatically inserted frame has another disadvantage. It is not
possible to set a footnote to the caption.

Here a way to get a caption without using the wizard:

When you insert the picture, it is anchored to an empty paragraph as
default. Open the paragraph properties of this paragraph and enable
option "Keep with next paragraph" in tab "Text flow". Then in the next
paragraph enter your caption.

Honestly speaking I don't know what exactly the Anchor is. My images are
mostly "Image_Select->Context_Menu->Anchor->To_Character". And I don't
know how to select the paragraph a image is anchored to. But I know what
you mean by this technique. Using this technique the image and its
caption will always be with each other (and not seperated to 2 different
pages). My main question is whether there is a way to automate this
procedure too? Because setting these options whenever I want to insert a
caption is a hard and lengthy task. Isn't there a macro or something to
do this too?

To enter the caption quickly, you can generate an autotext. You need to
do this only once. Mark the whole paragraph of an proper styled caption
and generate an autotext of type "New", not type "New (only text)". This
autotext will include the paragraph style too. Open it for edit and
delete the special picture title, but not the closing bracket and the
space and save it.
Now you can insert the caption by inserting an autotext. It will be the
same as inserted by the caption wizard, but including the closing
bracket and without generating a frame. Of cause you have to enter the
current picture title after inserting the autotext.

There are also some LESS SEVERE problems in using "Number range" or
"caption":

A. Insertion of a well-formatted caption: Unfortunately there is no
short and easy way to insert a well-formatted caption in Writer. Anytime
I insert a caption I have to manually correct the brackets and other
things I need. I wished there was a way to do so automatically.

This is solved when using an autotext, see above.

B. Using "Number range" is not as easy as using a predefined Numbering:
When you use a predefined Numbering you don't need to worry about
numbering format and correct it anytime.
Plus you can associate that predefined numbering to a paragraph style
and whenever you use that style for your caption, the proper numbers and
their constant text will appear as a special kind of numbering without
the need to manually insert them.
Using a Numbering like those in "Outline Numberings" also gives the
option to precisely determine Position of each numbering which is more
accurate than manually placing a "Number range" before our caption text.

Position of the caption should be the left edge of the picture. If you
do not have an enclosing frame, you can align them by using a tab for
both the picture and the caption or align both left and use the left
indent of the paragraphs.

So do you think these problems or at least the first serious problems
can be solved when using "Number Ranage" or "caption"?

I can only describe which features LibreOffice has. It is up to you to
decide whether you will use LibreOffice or go with Word.

Thank yo very much for describing features of LibreOffice. It seems that
you're very professional in LO settings and your guides almost solved my
issues. I'll not go back to MS Word, because I work in Linux, I don't
want to use proprietary software and I've almost done most of my thesis
using LO Writer and shifting back to Word takes much more time and effort.

Fortunately the Word template was compatible enough with LO Writer and I
only have to change the Outline_Numbering and its associated styles. I
also have to manually replace numbering of all (figures, tables and
formulae) captions and references to them which may take some hours.

If you can introduce a way to automate the "Keep with next paragraph"
solution, all the problems will be solved.

Best,
Sina Momken

Hi Sina
Sina Momken schrieb:

Let me show you what exact Outline Numbering I want using the example
below:

Level Example(desired output) Associated Paragraph Style
1 Chapter 3: Chapter
2 3.2- Heading 1
3 3.2.5- Heading 2
4 3.2.5.9- Heading 3
5 (b) none
6 Fig (3.12) Fig Caption
7 (3.27) Formula
8 Table (3.20) Table Caption

As you can see in the example above the '3' in "Fig (3.12)", "(3.27)"
and "Table (3.20)" is the chapter number at level 1.
[..]

How can I achieve my desired output I mentioned in first example using
LO Writer?

You do the outline numbering with Chapter, Heading 1 , ... with normal
outline numbering. You need to define a paragraph style "Chapter" and
alter the assignment between paragraph style and level in the outline
numbering dialog.

LibreOffice uses the field "Number range" for numbering in captions.
Therefore these are not at all in the outline numbering. But when you
insert a caption to a table or figure, you will see a Options-buttons.
There you can tell LibreOffice to count newly for each chapter.

The "caption" item in the context menu is only a shortened way to set a
caption. You can also write your own caption inserting the field
"Number
range" manually. That will be the right way for numbering formulas.

The Autotext FN puts the formula and the formula-numbering in a
table. I
would not use it, because it is not easily possible to move paragraphs,
when the movement crosses a table. I would position the formula number
using a tab. For display formulas in own paragraphs you can define a
suitable paragraph style.

The captions are normal paragraphs, so you can add the needed brackets
manually as you need them.

Each "Number range" will generate its own index later on.

The numbers of the outline can be inserted using fields.

Do not try to mimic the way things are done in Word, the concepts are
different. But you can be sure, that you can write well formatted
academic papers in LibreOffice.

Kind regards
Regina

Using LibreOffice internal captions or "Number range" has some problems
that MUST be solved to be used:

1. Cross-Reference in the text body: Assume you has inserted a new
"Number range" named "Fig" either using "Caption" or inserting manually.
Regardless of the need to manually correct brackets and the whole
format, when you want to insert the Fig number in your text using
Cross-reference, there is NO way to insert the whole Fig number while
preserving its format. For example if you has entered the text "Fig
(2.1) something" under a picture, there is no way to automatically
insert "Fig (2.1)" in your text using Cross-reference.

I first must admit that I didn't read this whole thread and I'm not
sure what you actually need, but think you can insert text "Fig (2.1)"
in a cross reference.

I hope I understood you well and I really wont to help you:

First you should insert your picture and set anchoring as Regina said.
Then insert text "Fig." after that go Insert - Cross-reference, choose
Variable tab and there (in format box) select Text, enter e.g "(2.1)"
and then write rest of the caption text.

There is no need to insert "(2.1)" in this way manually. This way of
inserting caption numbers doesn't count automatically and is not
recommended at all. The "Number range" solution which Regina has also
explained above is much better.

Now select only "Fig. (2.1)" or what ever you need and go to
Cross-reference tab, choose Set reference, enter it's name in Name
box, and choose Insert.

Place your cursor in desire position and then in Cross-reference tab
choose insert reference, select reference, and in a white box left to
the Name select Reference, hit Insert.

This is good way to define a reference to any position of document and
then refer to it (or its page number, etc.) later. But as I said before
referring to a "Number range" could be enough. However I have to retype
"Fig (" before and ")" after where I want to insert a reference to a
Number_range.

I hope that's what you wont to do. You still have to manually insert
Variables and set cross-reference, but you sort the brackets problem.

Manually inserting variables is very bad idea. The alternatives I've
described above are better.

Kruno

And, you can always define a custom style for that "Fig (2.1)" variable
text and then go Insert - Indexes and tables - Indexes and tables -
Additional styles, choose three dots right to label and define that
style to level you need...

I already knew this way to make table of figures using specific
paragraph styles. I think this is best (or maybe only) way to make table
of figures and and it was one of the reasons I wanted to assign a
paragraph style to fig_captions.

Not sure does thins helps you, but hey... :slight_smile:

Thank for your suggestions,
Sina