First time here? Check out the FAQ!
asked 2012-07-28 18:48:34 +0200elehack
In Writer, I would like a custom field, incrementing throughout the document, attached to my own counter. The end result should be somewhat like page number, but it displays instead its position within the document (so the Nth instance of this field says “N”).
The use case is numbering problems in an exam - I would like to be able to insert an automatic field in problem headings, so that the problem is labeled “Problem N”, with N auto-updating if I move problems around in the exam.
Is there a way to do this?
You can do this by defining your own field of type "
Number Range". Assuming you already have at least one heading that should contain the custom numbering, do the following:
Put the cursor to where the field should be inserted;
Open Menu "
Insert" -> "
Fields" -> "
Other..." or hit "
CTRL+F2"; the "
Insert Fields" dialogue will appear.
Select tab "
Type"), select "
Name" to create a new number range;
Format" as desired:
Insert" to insert a field for the new number range.
For further usage, the custom number range will be available in the "
Insert Fields" dialogue, tab "
Variables", list box "
Selection". Just insert fields using that number range as desired. The fields will get updated if you move the headings around.
answered 2012-07-29 09:16:35 +0200Monk
I don't know a direct way, but perhaps this workaround is useful or at least usable for you:
Open Format->Styles and formatting rightclickand choose 'new' from Contextmenu Create a new Format for your 'Problem Headline' and adjust all your formating preferences you need. If there is already a style you use you may also use the button in the right top to create a 'New Style from selection' and after creating rightclick and choose modify.
Now switch to tab 'Outline and numbering' and choose Numbering 1.
Now slect all your 'Problem Headers' and they will be numbered automatically in the order they appear in the document. When you are ready with your exam you may manually insert the problem Number taking the number from the headline.
If you already use numbering for your chapters, then disable numbering temporarily in the headline-style.
Hope that helps
LibreOffice is made available by volunteers around the globe, backed by a charitable Foundation. Please support our efforts: Your donation helps us to deliver a better product!
Asked: 2012-07-28 18:48:34 +0200
Seen: 339 times
Last updated: Jul 29 '12