How can I insert auto-numbered sentences in LibreOffice Writer?

3

2

I want to achieve a formatting like this:

Some text which references (1), for example because (1) might be an example sentence for some grammatical structure which is explained here.

This is auto-numbered text object 1.                                                                                      (1)
The number on the right is assigned automatically. If another auto-numbered object
is inserted before this, it will change to (2), as will all references in the surrounding text.

Some more surrounding text.

How can I insert such numbered sentences and references to them in LibreOffice?

Felix Dombek

Posted 2012-04-11T00:40:16.590

Reputation: 1 729

Answers

4

Tohuwawohu's way will work, and it will produce the most accurate result visually to what you want.

The method I would use, however, won't produce a right-side numbering like you want, but it's more semantically accurate.

Basically, I would create numbered paragraphs. When you create the numbered paragraphs, you can set the Character Style to "example", and change the Before and After fields to "(" and ")".

Then, where you want to insert references to these paragraphs, you simply go to the Insert menu and select Cross-references.... Then in the dialog that pops up, select Numbered Paragraphs and choose the numbered paragraph you want from the Selection list. Lastly, change the Insert reference to... option to "Number".

enter image description here

Lèse majesté

Posted 2012-04-11T00:40:16.590

Reputation: 3 129

1A very nice solution, and much more easier to implement than my approach! I thought about using the numbering mechanism, too, but i didn't find a way to "move" the number to the right margin. Maybe the paragraph numbering would be another solution, so the number will appear always on the "outer" margin of the page. – tohuwawohu – 2012-04-13T10:03:19.803

4

There are different ways to do this:

The easiest solution would be to insert Frames with captions and let LibreOffice auto-number those frames (to be precise: its captions). But there's a drawback: the caption will appear above or below the Frame, not at its right or left, like in your example. If this doesn't matter and if it's ok for the caption to appear beneath the frame, i recommend this solution.

Another way would be again to use frames, but without captions. Instead, place another "marginal" frame besides the main "content" frame. In the second frame, insert a field that will get automatically updated: Menu Insert -> Fields... -> Other... -> Tab Variables -> Type Number Range, Selection Text or Illustration:

Insert Fields

You will have to insert the field manually only the first time. Afterwards, just copy and paste the second, "margin" frame besides any object you want to count. If want want complete flexibility, use the Set Variable / Show Variable field type instead.

tohuwawohu

Posted 2012-04-11T00:40:16.590

Reputation: 8 627

0

Since I don't have drawings in my papers, I select "Drawing" in "variables, insert the number (which increases automatically each time I insert), I then select the number in the text and give it a name in "set reference" (but I do this only for the examples to which I intend to refer) and then I go to "insert reference" point to the name I want as reference and insert. If the numbers in the text are put in parentheses, the parentheses can be included in "set reverence".

Sylvain Bromberger

Posted 2012-04-11T00:40:16.590

Reputation: 1