rtf styles

Hi,

I am having some issues with rtf styles. I am sorry if these problems have been discussed on the forum and I am repeating them.
When I import a file, written with Nisus or LibbreOffice and saved in rtf with all the styles applied, in DevonThink (latest version on Maverick) the file looks fine and well composed with all the different styles applied. If I do not touch it and reopen with the function «Open in external editor» all the styles are still there. But: if I apply any change to text (add a word etc.) and save it and reopen it with the external editor (Nisus) all the previous styles, languages etc. disappear!! What I get are the Header, Footer an Normal style. This happens either I import or index the file.
This behavior makes the use of rtf file… useless!
Could you please give me some help or ideas?
Thank you.
ES

OS X “looks at” the filename suffix to determine the filetype of a file.

Apple’s rich text code, which is used by DEVONthink, is saved with the .rtf suffix, and the Finder by default assigns TextEdit as the parent application to open that file.

Nisus also uses the .rtf filename extension to denote its files. Nisus uses proprietary code to denote features such as footnotes in its documents, which would be lost if the file were opened and edited in TextEdit or DEVONthink. Nisus is not alone in using the .rtf extension but using features that are not available in TextEdit (i.e., OS X rich text).

That’s just the way it is. It’s unfortunate that Nisus didn’t use a unique extension, as OS X has no way to determine that the Nisus document should be opened under Nisus rather than TextEdit, unless the user instructs OS X to open all .rtf documents under Nisus (which could introduce other problems).

That puts the onus on you to remember which .rtf files were created by Nisus, and to only edit them under Nisus. There’s not much that DEVONthink could (or should) do about this.

Thank you for your very clear explanation!
Now I understand the mechanics.
So let me summerize and comment some points:

  1. Devonthink uses the same rtf engine of TextEdit, e.g the one that Apple decided to adopt.
  2. Rtf was introduced by Microsoft as a standard text markup (see: en.wikipedia.org/wiki/Rich_Text_Format). It is used to insert code for footnotes paraghraph styles character styles etc.
  3. It is used by Nisus, Word and many other soft. It has been considered a standard.
  4. Apple decided to adopt a crippled form of rtf with TextEdit (no styles and no footnotes, etc.). Now has decided to drop all together the rtf format from its main wordprocessor Pages. It seems that rtf has no future on the Apple side. It has not been fully implemented on the iPad, has we know: see the Devonthink to Go issues.
  5. Devon (and Scrivener, another wonderful soft) relies on the rtf by Apple. Which it is fine so far you use Devon to write down notes, take pieces of info, etc. Scrivener has an ingenious compiling feature that transforms any text in a well formatted one without using rtf styles. Another standard, Markup language, is getting a lot of attention (even from Devon). But it is still a little difficult to use and limited.
  6. You cannot use DevonThink to work on a project (thesis, book, etc) that requires styles (which are a very practical and not only a superfluous «thing»: you can search for styles, you can apply different languages using styles, etc.). DevonThink will transform your file on a crippled rtf file.
  7. It would be nice if this warning could be very clear in the manual: do not transfer or index your styled rtf inside Devonthink because anytime you apply a change in your file inside Devon you will loose your formatting and you have to reformat again. This is what happend to me…
  8. I Thought that having my rtf files indexed in Devon would save me time: for instance if I wish to alter a sentence, capitalize a word or whatever I could do it inside Devon instead of opening Word or Nisus. But as I said changing one instance inside the file changes completely the format of it.

Thanks for listening! And sorry for my English.
Have a nice day.
ES

I must politely disagree with your summary of my previous response. :slight_smile:

Your issue has nothing to do with Apple’s possible future directions of implementation of .rtf code in OS X or iOS. Rather, the issue is that OS X is a UNIX operating system that depends on filetype extensions to relate files to one or more applications capable of opening and editing them. As it happens, there are a number of “flavors” of .rtf filetypes that cannot be distinguished by OS X. That can also be true of plain text files, although it is relatively common in the case of .txt files to denote the parent by an explicit filetype extension. I’ve never understood why Nisus, in this OS X environment, used the .rtf extension for its documents.

I’ve got at least 25 applications on my Mac that can open or produce .rtf files, each of them using different coding schemes to manage various formatting or layout features. Most of these different “flavors” of .rtf can be opened and edited under a non-parent .rtf creator application that, if the edit is saved, can screw up formatting or layout of the document.

That’s not an issue that DEVONthink can (or should) attempt to solve. DEVONthink simply captures files of any filetype (including variants of the .rtf filetype) without modifying them in any way when they are captured. If variants of a filetype are opened, edited and saved by the user under the appropriate parent application, there won’t be a problem. If a Nisus .rtf file with footnotes is opened, edited and saved under TextEdit (DEVONthink uses OS X rich text), the footnote formatting will be lost. Indeed, if that Nisus .rtf document were opened, edited and saved under any of the other .rtf-generating applications, it is likely that formatting/layout commands will be scrambled. That puts the onus on the user to remember which external application should be used for editing.

As for me, I use Apple’s rich text for note-taking and draft writing within my databases. I can use text formatting, include images, links, lists and tables while at the same time the information in that database is at my fingertips. For final editing and polishing I copy/paste into Pages. That copy/paste will include images in one pass (which doesn’t work with Word, for example).

This is one reason to use Mellel for files that will be stored within or indexed by Devonthink. They will be opened by Mellel only, and there is thus no risk of losing formatting or footnotes.

Declan

Thank you Bill for the long answer which clarifies many details. But I have to disagree with you again and politely! The issue is there: expecially with a naive user (as I am). I see rtf and I think (wrongly of course) that all the file with this extension are similar. For what I know rtf files in Nisus, Word and LibbreOffice are almost interchangeable; there are few issues, but if you work with not heavely formatted text, you will be ok. Even with track changes and annotations.
If you use Apple rtf you will loose a good portion of everything in terms of style and formatting.
You confirm my saying: you use DevonThink to take notes etc. and then you use Pages (which has lost the rtf coding, by the way!) to format your paper. And I think that you are right: DevonThink is a wonderful product to take notes etc, the best.
My problem is different: how come in changing even a word in a rtf file, the file looses all the format. Should not this be warned in the manual?
Mellel is another great program which uses a proprietary format. If you index a file made with Mellel you can read it inside Devon: but my problem is different, it has to do with working directly in Devon, changing a portion of the file, a word or whatever. With a Mellel file you just read it but you cannot do anything not even copy text.
So my conclusion is that, according also to what Bill has said, there is not a rtf universal format, and that we should not trust this format, as for instance the img format which is readable etc universally, transformed etc.
Sorry for my wording!
Thank you!
ES

Emilio, there are a number of assumptions in the world of computing that can be dangerous. One, as you have now discovered, is that not all .rtf files behave the same way when opened in various applications capable of opening them and editing them.

Your assumption that the .img file format is a “universal” one is incorrect.

The Portable Document Format (PDF) was developed by Adobe as a file format that can be displayed across all common computer platform. But that doesn’t mean that there are not “flavors” of PDF that are highly specific for some feature(s), such that the availability of the feature(s) differ depending on the application chosen to open/edit the PDF.

There are many other examples. Image file formats such as .jpeg and .tiff also come in different “flavors” and unexpected results can happen when some of these files are opened, edited and saved under an application different from the creating application (or even edited and saved by their creator application, but with different options selected). And I’ve seen .jpeg files produced by a Windows application that seem malformed to some (but not all) Mac applications that might be chosen to open them.

Dear Bill,

thanks for the always clear explanations. I made a mistake in referring to image files. I wanted to say .jpeg not .img. Sorry. But still you are correct that all kind of files have flavors when read or created by different softwares. The world is various and we have to enjoy this fact!
Have a nice day and thanks for your support.
ES