| View previous topic :: View next topic |
| Author |
Message |
commo1 Newbie

Joined: 06 May 2004 Posts: 3
|
Posted: Thu May 06, 2004 9:52 am Post subject: paragraph references |
|
|
Hello, new to forum.
Does anyone know how to refer to a paragraph in a way that would change the reference paragraph number when the paragrph number changes?
example: I have 99 paragraphs in a document, with paragraph numbering taking care of assigning numering to each given paragraph. I have a statement in par. 50, which refers to "as stated in paragraph 46". If I insert a new paragraph at, say 20, paragraph 50 becomes 51, but the paragraph I want referenced is no longer 46, it's 47. How could it autimatically be made to reflect the changes in numbering?
Thanks. |
|
| Back to top |
|
 |
Iannz OOo Advocate

Joined: 14 Feb 2004 Posts: 494 Location: Christchurch, New Zealand
|
Posted: Mon May 31, 2004 6:20 pm Post subject: |
|
|
For outline numbered paragraphs there is text filed called chapter and you use it to return the number of the paragraph. To be able to use it the paragraph needs to be either bookmarked or use a set reference. Some people have commented about bookmarks not being as reliable as set references so these are used by way of preferance. To make life easier assigning such references I wrote a macro which is in a document called OutlineCrossRef3.sxw which is available from http://homepages.paradise.net.nz/hillview/OOo/ The document has instructions for its use and installation. _________________ Cheers, Ian
http://wiki.services.openoffice.org/wiki/Extensions_development_basic a wiki about writing OpenOffice.org extensions. |
|
| Back to top |
|
 |
ftack Moderator


Joined: 27 Jan 2003 Posts: 3102 Location: Belgium
|
Posted: Tue Jun 01, 2004 1:56 am Post subject: |
|
|
Iannz, I think you are confusing between Outline numbering and Numbered lists here. Outline Numbering, applied using Tools Outline Numbering, can directly be cross referenced. In contrast, the number of Numbered Lists cannot be crossreferenced currently and that has been filed as an issue.
In the case of the original poster, I would suggest to use number ranges instead.
Insert your paragraph numbers as automatic "Number Ranges". These numbers are automatically updated, and they can also be immediately reference to. Only drawback is that you need to insert the number field manually once, but this can be easily done copying an already existing number or after creating an autotext entry. |
|
| Back to top |
|
 |
Iannz OOo Advocate

Joined: 14 Feb 2004 Posts: 494 Location: Christchurch, New Zealand
|
Posted: Tue Jun 01, 2004 3:22 am Post subject: |
|
|
| ftack wrote: | | Iannz, I think you are confusing between Outline numbering and Numbered lists here. Outline Numbering, applied using Tools Outline Numbering, can directly be cross referenced. In contrast, the number of Numbered Lists cannot be crossreferenced currently and that has been filed as an issue. |
My apologies - how does one directly cross reference to outline numbering other than by using set references or bookmarks?
However, I can see how to do ftack's suggestion using number fields:
1. Insert > Fields > Other... > Variables > Number Range
2. giving a new name such as paragraph,
that you can then cross reference to that number by:
Insert > Cross Reference > number field as specified in step 2 above
select number in middle list box
select number in right list box
Click Insert _________________ Cheers, Ian
http://wiki.services.openoffice.org/wiki/Extensions_development_basic a wiki about writing OpenOffice.org extensions. |
|
| Back to top |
|
 |
ftack Moderator


Joined: 27 Jan 2003 Posts: 3102 Location: Belgium
|
Posted: Tue Jun 01, 2004 4:43 am Post subject: |
|
|
| Ianzz, indeed I was wrong: while you can reference outline numbers, you can't without inserting bookmarks first. So this leaves the option of using Range Numbers as the fastest approach for the problem. I've seen, Ianzz, that you already have your interim solution before this is build-in into OOo (http://www.openoffice.org/issues/show_bug.cgi?id=25072). |
|
| Back to top |
|
 |
|