Some documents turned into LaTex code [RTF code confirmed]

Hi! I’m relatively new to Scrivener and was happily writing on my phD when I noticed that the text in many of my documents in the Binder have changed encoding to something resembling LaTex.

I tried to compile and I get the same in my exported file as well.
I contacted support as well, but was hoping I could get a faster response here.
Otherwise, I’m on macos 11.6.8, if that makes a difference.
I had the project open for a couple of days and stupiditly I didn’t do backups very often.

Is there a way to get back my text? :cry:

Of course, weird. Can you post some screen shot examples?

Without backups, maybe not, but depends on above. Maybe text not lost. Dunno yet.

Meantime, before you go any further, please–for your own benefit–implement Scrivener’s standard backup. Keep the backups in a folder other than where your projects are, and preferably not in a cloud-synced-folder. Menu Scrivener → Preferences → Icon “Backup” → click on “Turn on Backups”. I have my set to keep 25 ZIP copies on both project open and close. It makes a ZIP file holding all files in the project “package”. Also recommended to run TimeMachine–just let it run routinely to a connected USB disk or something.

I had the backup set to use the default location, but now I opted to keep 25 backups and to backup with each manual save. Unfortunately I had it open for a very long time and thus didn’t have get a backup of what I had before this problem occurred.

I had the project saved in my iCloud, which I supposed was fine if I always close the project before opening it fro another computer. I’ll use Dropbox to be safe from now on.

I’m posting some of the code I get, as I can’t embed screenshots, it seems.
My text contains mostly Cyrillic + extended latin characters


Here is an excerpt of what I get in the beginning of a document:

\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 CharisSIL;\f1\fswiss\fcharset0 Helvetica;\f2\froman\fcharset0 Palatino-Roman;

\f0\fs24 \cf0 \uc0\u1050 \u1086 \u1075 \u1072 \u1090 \u1086 \u1088 \u1072 \u1079 \u1075 \u1083 \u1077 \u1078 \u1076 \u1072 \u1084 \u1077 \u1074 \u1072 \u1088 \u1080 \u1072 \u1085 \u1090 \u1072 \u1085 \u1072 \u1090 \u1072 \u1079 \u1080 \u1084 \u1077 \u1090 \u1072 \u1092 \u1086 \u1088 \u1072 \u1074 \u1098 \u1074 \u1042 \u1077 \u1076 \u1080 \u1095 \u1077 \u1089 \u1082 \u1072 \u1090 \u1072 \u1082 \u1091 \u1083 \u1090 \u1091 \u1088 \u1072 \u1085 \u1072 \u1044 \u1088 \u1077 \u1074 \u1085 \u1072 \u1048 \u1085 \u1076 \u1080 \u1103 , \u1089 \u1083 \u1077 \u1076 \u1074 \u1072 \u1076 \u1072 \u1086 \u1095 \u1077 \u1088 \u1090 \u1072 \u1077 \u1084 \u1074 \u1098 \u1090 \u1088 \u1077 \u1096 \u1085 \u1086 \u1082 \u1091 \u1083 \u1090 \u1091 \u1088 \u1085 \u1086 \u1090 \u1086 \u1088 \u1072 \u1079 \u1073 \u1080 \u1088 \u1072 \u1085 \u1077 \u1085 \u1072 \u1086 \u1089 \u1085 \u1086 \u1074 \u1085 \u1080 \u1090 \u1077 \u1082 \u1086 \u1085 \u1094 \u1077 \u1087 \u1090 \u1080 /\u1082 \u1072 \u109

I don’t know if iCloud or Dropbox safer for backups or not. As long as the files are set to be “offline”, I guess. The problem with using cloud sync services to store backups is that if the files get deleted/corrupted/lost/whatever, that flaw gets synced to everywhere there is a sync setup, so “poof”, backup gone. I keep the backups out of synced files and depend on my regulard backups for backups (TimeMachine to local USB drives, TimeMachine to NAS, Backblaze, CCC to NAS… Yes redundant, but just me).

Sounds from above you are storing your source project files in iCloud. Dropbox has more sophisticated API interfaces for apps, so that is why Literature & Latte recommends Dropbox. No telling how iCloud might have messed things up–at miniumum and you may know this, don’t use iCloud to “optimise disk space”. Moving to Dropbox a good idea, IMHO. Just make sure the Dropbox folder is set for “offline”.

Re your showing the text, this looks like raw RTF to me, not LaTeX. Surely someone here will know why RTF (which is the standard text for Scrivener files) is not being rendered for you if the reason is other than simple file corruption. Might be a fix, but I don’t know. I’ve not run across this.

1 Like

I urge you to pick either or both “On Open” and/or “On Close” and not rely on you doing a manual save. Just my two bits. The more you can make your computer do work for you, the better! :wink:

1 Like

Ok, I managed to convert manually these document following AmberV’s suggestions from an old post (Formatting Issue?? - #5 by kewms)

Still, I hope to learn how to avoid that in the future.

Open TextEdit and set it to plain-text mode, with Format/Make Plain Text.
Copy and paste what you see in Scrivener into this TextEdit window.
Save the document with File/Save…, and be sure to give it a name ending in “.rtf”. The software will complain, saying that this isn’t a normal text file extension. Ignore it by clicking the Use .rtf button.
Now drag that the file you saved in step 3 into Scrivener—it should hopefully be okay at this point.

1 Like

Good you have recovered … I had a hunch TextEdit could be used to recover, but I didn’t think of @kewms’s trick. To avoid in future: I suspect iCloud corrupted your files, but I have no way to prove. Ensure any cloud-sync service you use has the Scrivener files “offline” and not “online-only”. And to enable recovery easier make routine backups (including TimeMachine or other).

That isn’t LaTeX (or plain TeX either) it is the supposedly neutral format used for all documents in a Scrivener Project namely RTF (Rich Text Format). You could pull that into almost any traditional infinite sheet of paper word processor (Word, LibreOffice,, even macOS TextEdit) to check the contents. This enraptment of documents is normally hidden from us when using Scrivener. Maybe just ignore the format and re-import the file into SCrivener or if it is already there then use it. And leave the presentation of your thesis to Compile.

Thank you all for the quick responses!
It seems the problem was due to a partial syncing font library (in iCloud again!).
As I moved it to Dropbox and restarted Scrivener, the documents were rendered fine.

It seems the rtf rendering breaks if suddenly a font becomes not available or something.

Better to have redundant backups than not having the file you need. If it is mission critical then you can never have too many backups.


I am well aware of hard disk crashes and worse, problems caused by actions between keyboard and chair. :sweat_smile:

1 Like

I had a catastrophic failure in India way back. I shut down the system in a hurry when I arrived at my train station somehow crashing the HD. There was no backup; not that I didn’t believe in backups but doing so with Windows was complicated in the extreme in those days and I could never get it to work. I had to pay to have data recovered off my crashed drive. Next year I moved to a Mac and have been redundantly backing up to my heart’s content.

1 Like