Post processing to Styled Text

I’ve thought about this and I know the limitations of the text system so I can see why Scrivener doesn’t support styles and to be honest it’s a distraction from good honest writing. I’m now working for a company where, surprise surprise, they want to get my documents in Word and in the company templates of course.

Word 2011 Autoformat works… ish… it collects any bolds that my compile made and turns them into titles but also seems to add a few non titles as titles.

I have been toying with the idea of knocking together some RTF tools in Ruby that would scan an RTF file and produce a breakdown of text by the various formatting parameters that are applied. I think this would be the first stage in writing a post processor that could eventually take a template document with style descriptions, a scrivener produced RTF file and emit a document containing RTF styles and styled text… but then I thought ‘Why should I have all the fun…?’ :slight_smile:

What do you think?, if you aren’t into the idea I’m sure you have already understood the nasties and might share…?



The main problem with trying to post-process styles in RTF is the way RTF styles work. Not only is there a styles table defined at the top of the RTF file, but every time a style is set in the text, the entire formatting of the style is redefined too. It makes post-processing very, very tricky, if not impossible. To do it right, Scrivener would really need a brand new RTF parser and writer developed from scratch - a big job. I’m happy to go into more details when I have more time, though.

All the best,