[LH2534] Styles in RTF External Folder Sync

pe
perezbalen
Posts: 37
Joined: Tue Jan 02, 2018 8:44 pm
Platform: Windows

Wed Jul 25, 2018 9:35 pm Post

I don't know if this is a bug, or a non implemented feature in the Windows version (have no idea if it happens in macOS).

One of the nice changes in V3 is the use of styles. I'm a fan of styles, and have been using them in word for a while now. The thing is that I'm also using "Sync with External Folder" and Word 365 to edit documents in conjunction with Scrivener. And the styles are not migrating.

An example:

I create a file in scrivener. And I ad a style call "Heading 1" to a block of text.
Then I sync with folder.
This creates an rtf file for me to edit.
I open it in Word, and the text has the font, color and syze of the "Heading 1" style, but it's actually "Normal" Style.
I edit the document. Maybe select (in Word) a Heading 2 style.
Save, close, sync back in scrivener.
The scrivener file is all style "No Style". Both the "Header 1" i applied originally in Scrivener, as well as the "Header 2" I applied in Word.

Given the welcome addition of styles to Scrivener, I find this behaviour odd.

rw
rwfranz
Posts: 905
Joined: Thu May 28, 2015 9:41 pm
Platform: Windows

Thu Jul 26, 2018 3:43 am Post

perezbalen wrote:I create a file in scrivener. And I ad a style call "Heading 1" to a block of text.
Then I sync with folder.
This creates an rtf file for me to edit.
I open it in Word, and the text has the font, color and syze of the "Heading 1" style, but it's actually "Normal" Style.
I edit the document. Maybe select (in Word) a Heading 2 style.
Save, close, sync back in scrivener.
The scrivener file is all style "No Style". Both the "Header 1" i applied originally in Scrivener, as well as the "Header 2" I applied in Word.


Doesn't surprise me.
https://diaryproducts.net/for/geek/micr ... _nightmare

You can look at the spec for version 1.9.1 here: https://www.microsoft.com/en-us/downloa ... x?id=10725 (download of doc.docx file required)
Version 1.0 of the spec is here: http://latex2rtf.sourceforge.net/RTF-Spec-1.0.txt

Here's a short file -- and there are THREE styles applied in this doc:

Code: Select all

{\rtf1\ansi\ansicpg1252\uc1\deff0
{\fonttbl{\f0\fnil\fcharset0\fprq2 DejaVu Serif;}{\f1\fnil\fcharset0\fprq2 Arial;}}
{\colortbl;\red0\green0\blue0;\red255\green255\blue255;\red128\green128\blue128;}
\paperw12240\paperh15840\margl1800\margr1800\margt1440\margb1440\fet2\ftnbj\aenddoc
\pgnrestart\pgnstarts0
\pard\plain \tx0\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2880\tx3600\tx4320\fi567\sl262\slmult1\ltrch\loch {\f1\fs28\b1\i0 This is a test}
\par\pard\plain \tx0\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2880\tx3600\tx4320\fi567\sl262\slmult1\ltrch\loch {\f0\fs28\b0\i0 This is not a test.}
\par\pard\plain \tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2880\tx3600\tx4320\sl262\slmult1\qc\ltrch\loch {\f0\fs28\b0\i0 This should be Scraggly Poof.}}


First one has a style (font Roboto Light).
Second one has No Style.
Third one has a style (Centered text).

And you can see there are traits saved, but are those traits styles?
No. There's supposed to be a stylesheet spec somewhere.
From MS's specification (ALL their RTF specs contain this): {' \stylesheet <style>+ '}
I don't see that anywhere in this document. This particular project has five documents, and that's not in any of them.

Now, OpenOffice saves styles in its RTF files. I checked by saving the MS spec 1.9, and it contains this code:

Code: Select all

{\stylesheet{\s0\snext0\ql\widctlpar\ltrpar\hyphpar0\cf0\dbch\af14\dbch\af0\afs24\alang1033\langfe2052\loch\f7\fs24\lang1033 Normal;}
{\s1\sbasedon0\snext0\ilvl0\outlinelevel0\ql\widctlpar\sb240\sa60\keepn\ltrpar\cf0\b\kerning1\dbch\af18\dbch\af8\afs32\alang1033\ab\loch\f8\fs32\lang1033 Heading 1;}
{\s2\sbasedon0\snext0\ilvl1\outlinelevel1\ql\widctlpar\sb240\sa60\keepn\ltrpar\cf0\i\b\dbch\af18\dbch\af8\afs28\alang1033\ai\ab\loch\f8\fs28\lang1033 Heading 2;}
{\s3\sbasedon0\snext0\ilvl2\outlinelevel2\ql\widctlpar\sb240\sa60\keepn\ltrpar\cf0\b\dbch\af18\dbch\af8\afs26\alang1033\ab\loch\f8\fs26\lang1033 Heading 3;}
{\s4\sbasedon0\snext0\ilvl3\outlinelevel3\ql\widctlpar\sb240\sa60\keepn\ltrpar\cf0\b\dbch\af14\dbch\af0\afs28\alang1033\ab\loch\f7\fs28\lang1033 Heading 4;}
{\s5\sbasedon0\snext0\ilvl4\outlinelevel4\ql\widctlpar\sb240\sa60\ltrpar\cf0\i\b\dbch\af14\dbch\af0\afs26\alang1033\ai\ab\loch\f7\fs26\lang1033 Heading 5;}


I'd bet Word saves it correctly, too. Scrivener isn't using all of the spec. Yet.

So, styles aren't being saved by Scrivener as styles in the RTF documents, and they're not being read by Scrivener as styles, either. The traits of the style are being saved, but not the style itself.

That's a bug.

However, this is Beta. Styles in sync and RTF may not be implemented yet.
This may be a source of the issues we're having with styles themselves.
Just another user.

th
thePhilosoraptor
Posts: 1287
Joined: Sat Feb 13, 2016 3:28 am
Platform: Windows

Mon Nov 12, 2018 8:45 pm Post

Thanks. This has been filed.
Bryan Bender

pe
perezbalen
Posts: 37
Joined: Tue Jan 02, 2018 8:44 pm
Platform: Windows

Sun Mar 24, 2019 10:12 pm Post

Any news on this? I just checked in Version: 2.9.0.15 Beta (505019) 64-bit - 21 Mar 2019, and I still get no styles in any direction.

th
thePhilosoraptor
Posts: 1287
Joined: Sat Feb 13, 2016 3:28 am
Platform: Windows

Mon Mar 25, 2019 7:40 pm Post

You can see a list of bugs fixed in the latest version here:

viewtopic.php?f=57&t=40621

If a ticket number does not appear on that list it has not yet been fixed, but we are still aware of it.

Thanks!
Bryan Bender

pe
perezbalen
Posts: 37
Joined: Tue Jan 02, 2018 8:44 pm
Platform: Windows

Mon Aug 26, 2019 5:50 pm Post

Still happening on 2.9.0.21 Beta, which I believe is a Release Candidate.