Apache OpenOffice (AOO) Bugzilla – Issue 2593
cross-references from Word documents; not possible to refer on paragraph number
Last modified: 2017-05-20 11:15:45 UTC
Importing cross-references to section numbers in Word documents doesn't quite work right: the link text turned into the section name, rather than (or sometimes in addition to) the section number. In this quick sample document I created in Word 97, the last line should say: Subject to paragraph 2 subparagraph 2.1, stuff happens. But instead it says: Subjec to paragraph Snort subparagraph Farkle, stuff happens. Where "Snort" and "Farkle" are the titles next to the '2' and '2.1' headings. The document was created simply by typing most of the text as-is into Word and using auto-section numbering, and then inserting the cross references using the menu.
Created attachment 839 [details] Sample cross-referencing document
Reassigned to Michael.
MRU->FT: This is a feature of Word which Writer is not capable of depicting it. Writer is not able to make a reference to simply numbered paragraph (not outline numbering!).
I notice this issue has an issue type of "Enhancement". It should remain as "Defect". This is because Writer is doing something with cross-references but not as expected. The link text is replaced by the content of the paragraph referenced. In the example case reported, the paragraph is simply the fews words of the paragraph that is being used as the section name. If the paragraph contains many sentences of text, the link is replaced with those many sentences of text thereby interrupting the flow of the sentence containing the link.
From one of these comments it appears that a reference to the paragraph with outline numbering should work. AFAICS it does not. I can create a bookmark in (say) paragraph 4.2.1.5.4 and then referencce that somewhere else. When I create the reference I can choose the format "Page" which does what I expect, but if I select "Chapter" format I just get "4" without the sublevels. I can't see how to get the full "4.2.1.5.4" to appear. Ideally I would like to be able to select "Outline" for "Type" of cross-reference in the dialog and then the outline paragraphs should be listed in "Selection" for me to choose the one to refer too. Sub-optimally, but usably, if I could just choose "Paragraph Number" under "Format" for the reference and have the paragraph number for that paragraph (i.e. formatted as defined in the outline numbering), appear as my reference. This should be OS:All too - I see the same problem under Windows and Linux.
Since issue 4439 was marked as a duplicate of this issue, I am copying the text from it here. I, frankly, don't see issue 4439 as a duplicate of this one: issue 4439 has nothing to do whatever with importing word documents. Text from 4439: In Framemaker, we can insert cross-references to headings without having to create a reference first. There is a much better chance that my boss would use OOo or SO if it had this feature. Framemaker is absolutely horrible, but this feature is why we use it. The feature is in essence the creation and insertion of a cross-reference based on paragraph style. A window is displayed showing all the paragraph "tags" (as framemaker calls them) on the left. On the right is displayed all of the paragraphs (or at least the first line of each) having that tag. You then can select the paragraph you want to cross-reference, and then click insert. On OOo, I would need to create the cross-reference first, and then insert it where I want it. This is not acceptable for large documents.
*** Issue 13150 has been marked as a duplicate of this issue. ***
The current functionality in open office hardly qualifies as cross-reference. Essentially it is the bookmark functionality from word with a more confusing user interface (IMHO don't bother to fix it but replace it with something better). This is totally inadequate for authoring large documents (anything structured > 5 pages). I write documents with numbered sections, typically a few dozen tables and figures and literature references. I need to be able to refer to all of these and currently I can't in open office. All major wordprocessors offer cross reference functionality that allows you to refer to points in your document based on the structure of the document. Word allows this for anything that is numbered, figures, tables, formulas, etc. More importantly it allows for different kind of references. You can refer to the page the referred item occurs on, the full text of the referred item or the number that it has. As argued by others, Framemaker offers an even more superior mechanism. Basically, you can define your own reference formats e.g. "See \`<$paratext>\' on page\ <$pagenum>.". The major advantage of this is that you can simply change the reference format and your document will change accordingly (e.g. to "See <$paranum>: \`<$paratext>\' on page\ <$pagenum>."). Essentially framemaker inserts a generic anchor near the referred paragraph when you refer to a paragraph. Some field code is inserted at the place you insert the reference that associates this anchor with a reference format. If you delete the item, you end up with broken crossreferences, which is detected by framemaker if you update the references. It also includes a UI for locating and fixing broken references. What I would like to see in open office is something that is at least as powerful as word (if only to import/export word documents correctly, it currently messes up all my documents because of this bug) and preferably as powerful as framemaker (but with a friendlier UI of course). I think this issue is incorrectly labeled as an enhancement. As long as word compatibility is still a goal for open office, this should be considered as a defect (and a show stopping one for me, I need this).
Dude, I respectfully admit that you're crazy. The cross-references in OOo do all those things you just said. It's *word* cross-references that suck :) That said, I do think this is a defect, because it really doesn't bloody import word files properly, even though it has all the features necessary to do so. (Note that I haven't re-tested this since the original bug report, having mostly given up importing word documents for now.)
I don't like to be called dude/crazy and you're wrong. All versions of open office (including 1.1beta) I tested were unable to do the following: - Write structured text using outline numbering, numbered figures, tables, etc.. - Click insert crossreference - Select a numbered item from a list (e.g. section 2.3.4.5) that is presented to you - Select that you want to refer to the outline number of said heading (or the page number, or the heading + text, etc.) This IMHO is one of the simplest use-cases for cross-references and OOo currently does not support it. Something similar needs to be provided in order to do round trip editing of word documents. The open office way of doing this is to make a bookmark to the number of whatever you want to refer to. This is tedious, error-prone and not the same thing. In word, bookmarks are just one of the many things you can refer to. In OOo there's only bookmarks. Converting word cross-references to bookmarks (which I gather is what you are suggesting as a quick fix to this serious defect) would mess up as soon as you export back to word.
But this is why I said you're crazy... I do this all the time. Not with numbered lists (which it seems you're right, you can't link to) but at least with numbered section headings, figures, and captions. I use OpenOffice 1.0.2 currently. Go to Tools|Outline numbering. Enable numbers for sections. Insert some headings using the Heading1 (etc) styles. Insert|Field|Other, Chapter, Number and Name, then choose the section you want. Done. What's the problem? (Note to skimmers: read the rest of the bug report. This is NOT the point of this bug, so just the fact that this feature works doesn't make the bug resolved. :))
I have done exactly as you said and no luck in 1.1beta2 (the UI is there but my heading 2 paragraphs don't show up in it). I recall that this was the case for previous versions I tried as well (641D, 1.0, 1.0.1 1.1 beta and now 1.1 beta2) so either I'm nuts or maybe I have a valid point here? Just to be sure: I created a document with one section (heading 1) and two subsections (heading 2), enabled outline numbering for these styles and attempted to insert a reference in the second subsection to the number of the first subsection (i.e. 1.1). I do exactly as you say. I select 'chapter' type and the 'chapter number' format in the 'fields' dialog (document tab). The expected behavior would be a list of all numbered chapters in the middle column (aptly named 'select'). Interestingly, the default template does not come with a predefined chapter paragraph format (i.e. bad naming in the dialog) and none of my heading 1 or 2 paragraphs show up in the select column. The insert field pops up the exact same dialog as insert crossrefence only with a different tab selected (very confusing). None of the other tabs offers a way for me to select one of my heading 2 paragraphs and have a reference to its number inserted in the text. This dialog is a wonder of unusability, by the way (and I thought framemaker was unfriendly). The best thing probably is to redesign this part of the UI. Anyway, I'm willing to take your word that the infrastructure is there and that all that remains to be done to connect it to the UI and the import/export functionality. If so, please do it before 1.1 final. The field code that is generated by the ui in Word is "\Ref paranum /r /h". These last two options tell word to refer the number and to create a hyperlink to the referred paragraph. It's not rocket science and something similar needs to be provided in OOo. The only thing the import/export should be doing is convert the paragraph number and the field codes to the appropriate OOo alternatives. There's a related few issues filed on crossreferences (others I'm aware of are 3802, 4439, 13150). They all refer to each other claiming that they are each others duplicates. The obvious way to address them all is to properly implement crossreferences.
Note that I'm not an OpenOffice developer - I'm just a mostly-happy user who's being doing chapter references exactly as I described since at least StarOffice 5.0. While I was writing the instructions above, I was doing exactly what I said in a blank OpenOffice 1.0.2 writer document. So, well, I'm afraid I don't know what's going wrong for you. I agree that the UI is horrible (particularly if you make a lot of references - all that clicking drives me crazy) but I think you should file a separate bug if you think so. This bug is mine, all mine!
I'm having a hard time believing you because I can't replicate the behaviour in my version of open office (and I really want to). I'm not an idiot, I take your instructions to the letter it doesn't work. In any case, I feel I've wasted enough of my time. Maybe some of the official developers (bug owner perhaps) would be willing to shed some light on this issue? I get a strong feeling of being ignored here and that doesn't motivate me to continue to contribute to issuezilla.
Uh, erm... I take it all back. I'm a big stupid liar. The instructions I gave only create a reference to the *current* chapter, which I just realized is all I have tried to do in recent times. You can create references to tables and figures in the way I described, but that doesn't help you. I can't believe I even followed my own instructions and thought it was working, but I didn't check to see that the link I created could be created to point *anywhere* instead of to the current chapter. Sorry. In that case, this lack of feature really *does* explain my bug.
I read this thread with interest. I think it's universally agreed: The UI to cross-references in OOo-Writer *sucks*. I think you *can* do the things you describe but it's very very non-intuitive. For EVERY heading/section/chapter/figure/object you wish to cross-reference, you need to "Set" the reference. Using the language of LateX, this means creating a marker which cross-references can refer to. The "Set References" procedure was missed out by Jilles in his description of creating his cross-references. You create the references (the markers, not the cross-references) by 1) opening the Fields dialog 2) Select the "References" tab 3) Highlight "Set Reference" 4) Enter a label for the new reference-point in the text field then hit insert (with the cursor at the appropriate point in the heading etc.). Set references to any and every point you will wish to cross-reference. Now you've set some references in your document, you can start inserting *cross-references* to them, using Fields...->Insert Reference. The previously defined references appear in the Selection column. If you want numbered cross-references then 1) Outline Numbering (NOT conventional Numbering) must be selected for the relevent paragraph/heading styles. 2) The reference format must be set to "Chapter" (regardless of whether the style relates to a chapter or anything else!). Note, if you want to cross-reference a numbered list, then you must use Outline Numbering to create the numbers. Do this by 1) turning off conventional numbering, if it was on 2) create a new custom paragraph-style for the list items and set the list items to this style 3) Choose an un-used Outline Numbering level (e.g. level 10, 9 or 8 etc) and set it to use the list-item style. 4) Select the appropriate Number Format for this numbering-level. You then need to add references (using Set Reference, as described above) at each item in the list that you wish to cross-reference, and finally you can insert in your documents the cross-references to the reference-points. Does this do everything required? I totally agree this is a completely crazy UI but once you "get" it, it is mostly functional. The main problems, as I see it are 1) confusion between Outline Numbering and conventional Numbering. 2) The "Set Reference" procedure is long-winded and hard to find in the "Fields..." dialog. BTW, I'm not a OO developer, but a sympathetic user. HTH Bryan
This looks like it might work. Thanks! unfortunately I don't have time to try it out (full inbox due to recent return from holiday :-( ) right now. I'll see if I can give it a try with the new RC1. Regardless of that, the procedure is tedious (as all seem to agree) and end-users are unlikely to figure this out. As I pointed out earlier this is more like a bookmarking facility than like a cross referencing facility. IMHO the following problems remain: - distinction between outline and regular numbering is nonsensical and can be seen as a poor design choice. Obviously any automatically generated number should be referable. Actually all relevant properties of a paragraph should be referable. As a minimum, all stuff that can be referred to in ms word should also be available in open-office because this currently impairs compatibility. - reference markers should be automatically generated for things that might be referred OR some mechanism should be available to query a document for referable stuff and dynamically insert a marker when one is needed. I think this is essentially what word does under the hood. Having to mark things manually is tedious and completely unnecessary. - The UI for making crossreferences needs to be re-thought. It's ugly, complex and full of usability issues.
I tried Bryan's suggestions and it works.
If you try to do this with sub-documents in a Master Document, the References field does not have the References for other sub-documents (I would not expect it to). So how would I go about "doing" the cross-reference across sub-documents?
Hi Andreas, before this thread goes completely OT please have a (technical) look into the initial issues: Importing a Word doc. If it is possible to preserve/import/export this issue you might want to go for it. Regarding the "Writer UI sucks" issue please note that we do not have this as an item for 2.0 (see PCD) so you possibly need to split this issue up and retarget the latter to "oo.o later".
Hi Caolán, when I'm right we need for our field "references" a new format "Numbering" to show the numbering level (similiar to our format "chapter") of the referenced paragraph. Is that right or do you have another idea to improve the import?
Yes thats right, the option in word is "\r" which is "inserts the paragraph number of the marked paragraph in relative context", there are also \n and \w which have similiar purposes. (I admit I'm a little hazy on the differences between the three options as they've the same result for simple examples). The closest option we have at the moment is chapter, so we try that.
AMA->HBrinkm: So we've to find out if it's possible and what's the effort to have such a format for references.
.
Quoting : ------- Additional comments from ama Sun Aug 24 23:45:25 -0800 2003 ------- Hi Caolán, when I'm right we need for our field "references" a new format "Numbering" to show the numbering level (similiar to our format "chapter") of the referenced paragraph. --------------------------------------------------------------------------- Issue 2204 is about easying and extending the cross referencing features, among those to numbered paragraphs. Once they have been introduced this Issue can be solved, I suppose. So I set this Issue to depend on Issue 2204. I'd like to ask all those who have voted here to transfer their votes to Issue 2204. To speed things up. This cross referencing feature sure need to be implemented soon.
new parent (specification) estimated effort In test.doc there is no outline numbering. It is a normal numbering of paragraphs. There is no reference to numbered paragraphs in OOo yet. Therefore this is an enhancement.
As I understand this issue: The test file has not used outline numbering as such - each paragraph is of style normal (Word) or default (Writer). These paragraph numbers are directly applied and are not outline numbered. Writer currently doesn't have a way of cross-referencing the numbering of paragraphs other than using outlining. Changing these paragraphs to styles Heading1, Heading2 etc and removing the existing numbering then applying Outline numbering and the references to the numbers will work. I.e. an enhancement of being able to cross-reference to the numbering of any paragraph regardless of how it is numbered would solve this issue. Word implements cross referencing by using hidden bookmarks. Hidden in this context means that they do not show up in Words user interface. They are accessible via VBA macros. The importing of these bookmarks works - the only differance being that they are now visible in Writers user interface, and as mentioned above that cross-referencing to their paragraph numbers does not work (unless they are outline numbered). Writer has a new concept of being able to set references. One of the advantages of this feature over Word's is that with field shading turned on it is possible for the user to see exactly what text is being referenced. The user interface of Writer does lack the ability to easily set such references and to do cross referencing in one hit. Thus I have written a macro to do just that. See: http://homepages.paradise.net.nz/hillview/OOo/ and issue 2204. Word has the ability, apparently, to have the numbering be relative see issue: 20555. I say "apparently" because I can not get this to work for me in Word 2000. Assuming that it does work in Word (and from other posters comments I assume that it does), Writer does not have the ability for relative referencing so this too would be a feature enhancement request. I hope this helps - Ian Laurenson
removed from OOo 2.0 agenda
P4 should be a more better value for this enhancement.
This task is retarget to OOo2.0. The product team has decided, that this is a must feature for OOo 2.0.
according to http://www.openoffice.org/servlets/ReadMsg?list=releases&msgNo=7690 this issue will be set to OOoLater
When is OOo Later going to be?
*** Issue 40518 has been marked as a duplicate of this issue. ***
*** Issue 50667 has been marked as a duplicate of this issue. ***
*** Issue 60798 has been marked as a duplicate of this issue. ***
Made summary more significant
*** Issue 61705 has been marked as a duplicate of this issue. ***
*** Issue 47432 has been marked as a duplicate of this issue. ***
*** Issue 71929 has been marked as a duplicate of this issue. ***
The blocking issue (25072) has been implemented in cws swcrossref01 with a target of 3.0
OD->HBRINKM: Please check, if you can consider this enhancement for OOo 3.0
Another note: Please check, if this enhancement can be considered also for text documents in RTF file format.
All resources in the interop area for 3.0 are consumed by our docx import. Please send any complaints to Redmond. Target now 3.x.
*** Issue 89326 has been marked as a duplicate of this issue. ***
With issue 25072 being resolved, this issue might be easier to resolve as well?
As much as i want to move away from Word, not being able to insert cross-references to numbered lists is just insane. In linguistics, we need to be able to refer to numbered examples all the time; in statistics, we need to refer to numbered equations (and that is also clumsy enough). How am I supposed to write anything longer than 20 pages (or even the occasional book) without this feature? PLEASE make this a priority!!!
There is a concrete example of the use of numbered examples in linguistics in the (duped) issue 2204 (see the March 29, 2004 comment). I would like to confirm stgries's comment that the lack of this feature makes OOo impractical for writing linguistics articles of any length, and i have often had to express reservation to colleagues interested in switching to OOo for just this reason. I am now writing a 25-page article, with about 100 examples. In Word or Latex, if i remove example (1), all of the numberings, including the references to them, change automatically. In OOo, i have to go through and renumber each one manually. This is nothing i could ever recommend to a colleague.
Another type of document, nearer to the software development world, where this feature is a "must have" is a requirements specification. Our requirements analysts weren't able to switch over to OOo and are stuck with Word because they use numbered lists heavily to describe the steps in their Use Case scenarios and need to make cross references to the steps along the document. We're planing to automate the extraction of these requirements from a document to insert them in a structured tool for analysis. Our original goal was to extract it from a ODF document, but since they will be .doc documents our script will need to first convert the documents and then extract the information.
The feature has now been implemented into Writer. It is now possible to refer to paragraph numberings. Filter now needs to be adapted to import this correctly without using the Ref to a Bookmark anymore.
*** Issue 16559 has been marked as a duplicate of this issue. ***
*** Issue 94778 has been marked as a duplicate of this issue. ***
Actually, this is the last bug blocking serious business use for me as a corporate lawyer. We use numbered references all the time and of course I cannot force everyone to use OO.o. It is great that OOo can do this by itself now, but it is not yet compatible... The current behaviour in 3.1 - turning all references to numbered paragraphs of an OOo file into unresolved references within the Word file makes OOo unusable for my kind of work. A stopgap measure would be to export plain text rather than errors. May I also kindly suggest updating the title of this bug to reflect that only the MS Word import and export filter must be updated. Suggested new title: "Update Word filters to handle cross-references to paragraph-numbers"
Created attachment 62724 [details] Faulty Word doc export of the odt file
Created attachment 62725 [details] The original odt file with working cross- references numbered paragraphs
*** Issue 106518 has been marked as a duplicate of this issue. ***
*** Issue 112637 has been marked as a duplicate of this issue. ***
What is the progress on this issue? It seems to have had a status of "Started" for some time now. Given the current behaviour it seems like this would be an easy one to finish off if it is given sufficient priority. If it's been stalled due to lack of priority I'm sure I can get enough votes moved to this issue to raise its priority.
As a law firm, we are also very keen for this feature to be fixed and working as soon as possible. We are actually willing to pay for someone to fix this issue, and urge someone to contact us regarding this for an open and informal discussion. If any of the OpenOffice developers want to discuss this further then please contact either myself or my colleague (we both work within the IT Department of Ford & Warren Solicitors. Karl Handley, Senior IT Developer Email: karl.handley@forwarn.com Garry Lodge, IT Developer Email: garry.lodge@forwarn.com Or via telephone on +44 (0)113 2436601
Is this long-standing major defect being taken care of in OO3.3? I would love to be able to use OO at work, but if I cannot exchange documents with dynamic references in word format reliably, that's a nogo. Instead of adding pretty diagrams to OO, how about fixing key functionality that's missing?
Fixing this correctly will also require fixing 94995
CC myself
Created attachment 75484 [details] Word DOC file with cross-references to numbered paragraphs
Created attachment 75485 [details] RTF files with cross-references to numbered paragraphs
Created attachment 75486 [details] PDF file showing expected output from DOC and RTF tests files
This bug was reported nearly 10 years ago now. This really is not good enough. I, like many others on this bug report page, have been waiting far too long for this. Is there any progress on this at all? Is there any chance of it actually ever being fixed?
Reset assigne to the default "issues@openoffice.apache.org".