Reply to topic  [ 5 posts ] 
numbered headings exported to Word: weird brackets 
Author Message

Joined: 2007-07-04 14:00:10
Posts: 18
I've been trying out NWP and I seem to have a problem with numbered headings in .rtf or .doc files.

I assigned 'Headings' list style to some headings (levels 2 and 3) so that they were auto-numbered, like this:

1. Section
1.1. Subsection

Then I saved the file (as rtf, and later as doc, with identical results) and opened it in Word (2004). There I get:

1. Section{tc \f D \l 2 "1. Section"}
1.1. Subsection{tc \f D \l 3 "1.1 Subsection"}

I guess the stuff inside the curly brackets is some sort of field code. But Show field codes is unchecked in Preferences in Word.

Does anyone know how to make all that stuff disappear? (Sorry if I've missed previous discussion of this. I had a look in the old beta forum but didn't find anything relevant.)


2007-07-04 14:19:08
Profile

Joined: 2006-12-08 00:46:44
Posts: 417
Location: London or Exeter, UK
nicka wrote:
I've been trying out NWP and I seem to have a problem with numbered headings in .rtf or .doc files.

I assigned 'Headings' list style to some headings (levels 2 and 3) so that they were auto-numbered, like this:

1. Section
1.1. Subsection

Then I saved the file (as rtf, and later as doc, with identical results) and opened it in Word (2004). There I get:

1. Section{tc \f D \l 2 "1. Section"}
1.1. Subsection{tc \f D \l 3 "1.1 Subsection"}

I guess the stuff inside the curly brackets is some sort of field code. But Show field codes is unchecked in Preferences in Word.

Does anyone know how to make all that stuff disappear? (Sorry if I've missed previous discussion of this. I had a look in the old beta forum but didn't find anything relevant.)


I have seen mention of this, perhaps on the Scrivener forum, and from what I remember, these problems arise when Word imports .rtf files. NWP .doc files are not binaries, but .rtf with a changed creator code and extension. It may be that Apple's implementation of RTF is idiosyncratic in places (which I have heard) or that Microsoft Word doesn't fully support all the features of RTF (which I have also heard) so where exactly the blame lies Martin or someone else might know.

Those are clearly the codes marking those header levels to be included in the Table of Contents, giving font and level information and the text to appear in the ToC. If you don't need that, then you can turn off the marking using the "Reference Tools" pane in the drawer (If you can't see that, click on the >> at the top of the tool drawer and it will appear.

The alternative is to leave the ToC assignment in place, and when you get into Word simply use Find and Replace to remove all those extraneous elements and set up the ToC in Word -- but I don't imagine it will be as easy as doing so under Nisus is!

I don't know if NWP respects ToC settings in Word, as it is not something I have had any experience of.

Good luck
Mark


2007-07-04 18:08:19
Profile

Joined: 2007-07-04 14:00:10
Posts: 18
Post 
Thanks for the answer, Mark. The impressive thing is that the file exported by Nisus when opened in Word retains auto-numbered headings. It would all be perfect if I could only get those fields to hide.

I've just tried deleting the fields in Word. I had imagined that that would cause damage of some sort, at least to the structure of the heading levels in the document, but in fact it apparently has no bad effect. The headings are still at the same levels and they are still auto-numbered.

Does anyone know what is going on here?


2007-07-05 00:27:05
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
xiamenese wrote:
It may be that Apple's implementation of RTF is idiosyncratic in places (which I have heard) or that Microsoft Word doesn't fully support all the features of RTF (which I have also heard)

The RTF is generated by Nisus (eg: we do not rely on Apple for RTF import/export). As for the TOC entries, Word does support them.

nicka wrote:
It would all be perfect if I could only get those fields to hide.

Unfortunately Word (on the Mac at least) doesn't obey its own preferences in this case. Theoretically you could simply uncheck View > Show > Field Codes in Word's preference pane and the "tc" field codes should hide. It works for other fields (eg: automatic date/time stamps), but for some reason not for TOC fields. You'll have to take it up with MS.

Quote:
I've just tried deleting the fields in Word. I had imagined that that would cause damage of some sort, at least to the structure of the heading levels in the document, but in fact it apparently has no bad effect. The headings are still at the same levels and they are still auto-numbered.

The "tc" field codes are only responsible for marking content for inclusion in the TOC. They do not affect list numbering or paragraph style.

In this case your Heading paragraph style specifies that the paragraph should be included in the TOC, so the "tc" fields are actually redundant. As long as your Heading style remains intact you can delete the fields in Word without damaging your document.

However, sometimes you might want to add some arbitrary content to the TOC in NWP by using the menu Insert > Table of Contents > Include in TOC > Level 1. In this case a "tc" field code will also be added. If you delete this field then the TOC will be affected.

Hopefully all that makes sense. If not, please let me know!


2007-07-05 13:42:41
Profile WWW

Joined: 2007-07-04 14:00:10
Posts: 18
Post 
Thank you Martin. That's all very clear. It's really good to get an answer from someone in Nisus -- it shows that you are looking out for the users of your software.

Somehow I'm not surprised Word doesn't honour its own preference settings. Perhaps, like so many other bugs, it will be fixed in Word 2008 and replaced with others.


2007-07-05 14:36:44
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: exegete77 and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software