Preserve / Add Annotations During Sync From Text File...

…and / or provide a setting that would automatically transform text surrounded in square brackets (or some other suitable, not-as-likely-to-be-used symbol) into Scrivener inline annotations.

A little background: My work-flow includes syncing a project as plain text to an external folder that then gets synced via SugarSync to my iPhone. With a folding bluetooth keyboard that fits in my pocket, I am then able to edit the plain text files in the sync folder on my iPhone using Docs-2-Go. Which is ultra-portable, way geek, and freakin’ awesome…

Except that the inline Annotations in Scrivener get turned into [square bracket surrounded text]–which I actually wouldn’t mind–IF this [square bracket surrounded text] would remember that it’s actually supposed to be an inline annotation when it gets re-synced and re-imported back into Scrivener for additional editing.

I need this because I have a metric crap ton of annotations in each and every file, so highlighting them all individually and doing the ‘Shift-Command-A’ salute isn’t practical. And I NEED inline annotations, because I need a reliable method of stripping them all out en-masse during compile.

I’ve search the forums for a workaround (and I’m open to another way of accomplishing this), but haven’t been able to find anything.

Please, Keith, if there’s any way to make this happen, I’d be much obliged.


Jeremy Lee James
Webmaster, Southern California Writers’ Conference

A month late in replying, but with good news at least: this has been added to the next free update, 2.0.5, as an option in folder sync (which is off by default, so you’ll need to turn it on).
Thanks and all the best,

Thanks Keith!


Will there be any characters which surround the annotations in the text version, so you can easily tell them apart? Something like:


Some splendid prose here.[/code]



Related request: an option to convert double dash to em-dash, three dots to ellipses, smarten straight quotes, and other typography changes.

That’s all done at the compile stage - that sort of thing won’t be coming to file sync, as that’s not its purpose, sorry.
All the best,

Not quite what you’re asking, and you may already do this, but you can use Format>Convert>Quotes to Smart Quotes while you’re still working in Scrivener and Find/Replace for the others.

I’m assuming this was addressed to my comment. It now occurs to me, that simply by including whatever visual cues in the form of bracketing characters that I want to use by convention, when I’m working in the text file, any annotations will be obvious.

I could just do something like:

# My annotation goes here
Prose goes here.

The “#” would indicate (to me anyway) that the line is an annotation, and it would be visible in both versions of the file regardless. Good enough for me. So when does this build drop? I just downloaded .04

I think it was addressed to thatguy, but I could be wrong. I realize I did not address my post either, which was in reply to the request for converting quotes, etc. Whoops. Fixed that

Going by the beta builds and something Ioa said recently in another post, the annotation/footnote text in the .txt file should be identifiable by something like ((annotation)) and {{footnote}} so stuff pushed out of Scrivener will convert to that form and anything between the markers gets converted to an annotation or footnote when you bring it back into Scrivener. If that’s not enough visual reference, you could always add another character cue inside the markers to make it pop out for you but to keep it still inside the annotation text so it’s stripped when you compile without annotations.

Maybe I’m missing the option in the compile settings. I’m compiling to RTF. There are options to straighten smart quotes, but not the other way around. MM’s solution works but is quite a few steps.

Perhaps I can make my case, and if you still don’t like the idea, fair enough.

Scrivener does a great job with its new folder sync feature. Paragraphs convert out and back in flawlessly. WIth the recent build, inline annotations and footnotes do too. I can add these with minimal markup, and it just works. This is how software was supposed to be designed. When I come back into Scrivener, it looks like I never left.

In Scrivener with autocorrect on, double hyphens get converted to em-dashes, three dots to ellipses, etc. It would seem to fit in well if when these plain text equivalents were added externally and were brought back into Scrivener, the substitutions were done automatically without having to do a pseudo-find and replace, or Format > Convert. But if you feel it is better placed in the Compile settings, that seems reasonable enough. At least that is the software taking care of it, rather than me manually having to take multiple steps.

I boldly think Scrivener’s sync solution can go even one step further. In the Editor, there is Format > Convert > Bold and Italics to Multimarkdown syntax. Why not convert bold and italics to ** ** and * * when syncing to plain text, and convert back to bold and italics on the way back? I know this can be done by just using MMD. But MMD is almost too powerful, and the conversion from MMD → RTF is not as good as Scrivener’s RTF. The reason for using the markup is due to the plain text limitation, and so it would seem to be a good fit in the syncing step, so that when I come back to Scrivener, it was as if I never left. Again, the alternative of doing it the Compile stage seems reasonable enough if that is a better fit.

Hopefully I haven’t belaboured the point but rather given some food for thought.

Hmm, you can use the “Replacements” pane to put the ellipsis and em-dash substitution in manually. It’s not a checkbox, but since the settings save for the project, you only have to put it in once (and you can save the compile settings for use in other projects, too).

Sorry Jeremy, no, that was addressed at thatguy - I had missed your comment, my apologies. To add annotations or comments to plain text files in folder sync, all you will need to do is type:

Some text.{{ This is a footnote.}}
Some text.(( This is an annotation.))

Text enclosed in {{…}} will get converted to inline footnotes on import, and text enclosed in ((…)) will get converted to inline annotations on import (provided the option is ticked in the folder sync sheet).

Note however that these bracketing conventions have changed (previously it was […] and {…}) to avoid conflicts with text that just requires square or curly brackets (which wasn’t a problem when it didn’t get interpreted on re-import), so my recommendation is to sync all text documents before updating to the next version and then start syncing again to avoid an conflicts with the old system. This new convention will be introduced in the next beta.


thatguy - Ah, I see what you mean. The trouble is that this starts turning folder sync into a much more complicated beast that would need almost as many (if not quite) options as Compile, and it already has quite a few options. Although I can certainly see a case for converting quotes and em-dashes, and may re-consider this in the future, for now I think this starts to convert too much text and make too many assumptions (or involves too many options for a feature that is supposed to be fairly basic).

As for adding asterisks, this is actually more complicated than it sounds because MMD has much stricter rules on where asterisks can go, and the way, for instance, an italic range can overlap with a bold range, than Cocoa’s text system has with its formatting, so it would involve a lot of non-trivial logic to match the two.

In general, if you are syncing to a plain text format, I think it’s only reasonable to expect that the formatting is going to require some touching up when it’s brought back into a rich text environment, as rich text will naturally lose a lot in its transition to plain text.

As I say, I rule nothing out for the future, but I’m afraid I don’t want to put anything like this on the table in the short-term as it’s a can of worms.

All the best,

Awesome, Keith. Thanks so much for your response. This is great news.

I downloaded the beta yesterday (Version build 9363), so these notes pertain to it, not the current public release (and I apologize if I misunderstood your earlier comments to imply that they should pertain to this build)…

Instead of:

(( annotation in text file, converted from an inline annotation in Scrivener ))

I’m getting:

{{ annotation in text file, converted from an inline annotation in Scrivener }}

in my text files. Not a problem, just an observation (though I do prefer the double parentheses, for what it’s worth).

Also, at least for me, I’ve not been able to get either syntax to produce an inline annotation after the sync from SimpleNote inside of Scrivener; i.e. typing either of the following inside of a SimpleNote text file:

(( I want this to formatted as an inline annotation once synced to Scrivener. ))


{{ I want this to formatted as an inline annotation once synced to Scrivener. }}

…simply reproduces the text, enclosing ‘(( ))’ and/or ‘{{ }}’ included, and not formatted as an inline annotation.

Fortunately, however, the reverse case seems to be working fine (but with ‘{{ }}’ instead of the expected ‘(( ))’ as explained above).



Yep, this is a bug, sorry - I seem to have put the brackets the wrong way around in the code! I’ve fixed this in the next build.

As for Simplenote, it’s not implemented there yet - I may move the option to the Import/Export preferences so that it can affect all the sync types.

All the best,

Thanks for the clarification, Keith. :slight_smile:

Having the annotations convert to/from enclosing ‘(( ))’ upon sync would really be a nice feature. For someone like me who is using Markdown to format, it makes the portable workflow completely “seamless” at that point.

(Can’t tell you how happy I’ve been writing on the go with an iPhone + folding Bluetooth keyboard; combined with the Vibram Five Finger shoes, it’s a total geek-gasm.)

The idea of a checkbox in the SimpleNote sync settings sounds good, although I have to wonder how many folks would really want to preserve something like:

(( Some text between double parentheses. ))

…rather than have it formatted as an inline annotation inside of Scrivener? That doesn’t correspond to any manuscript formatting syntax I’m aware of. Maybe keeping the interface leaner is better?

Thanks again for such an amazing tool, and for your responsiveness, Keith. I run a SaaS tailored to writers (web hosting / web sites), and I don’t know how you do it. Very impressive!

Hi Jeremy,

Thanks for the kind words. I’ve fixed the annotation brackets today, ready for the next build, so that annotations use ((…)) and footnotes use {{…}} as intended. I’ve also put an option in the Import & Export pane of the preferences that affects all three sync types in the File > Sync menu, which is on by default - someone somewhere is bound to need the ability to maintain these bracket combinations, it’s always the case.

Thanks and all the best,

Some wiki syntax uses (( )) for footnoting, so you might not want to change that if you just use copy/paste out of Scrivener 'cause you’re lazy. 8)

Hi Keith.

I just downloaded the latest build of the beta, and I’m pleased to confirm the annotation syncing between text files (SimpleNote in my case) works flawlessly in both directions.

Excellent! Thank you so much!

As soon as I finish up a client project I’m working on, I’ll blog about my new Scrivener + Markdown + SimpleNote + iPhone + Folding Bluetooth Keyboard workflow.

Glad you like it, and thank you for considering mentioning us on your blog, much appreciated!
All the best,