Help with replacement of scene separators in epub export

I’m trying to find the syntax for global replacement on export.

What I have: #, the usual SMF separator.

What I would like - for the epub separator - is:

But centred. I can’t currently centre the markers in the text, because the formatting is lost on export.

Can someone tell me what the syntax is for replacing and centering in this fashion, or is it not currently possible?


Are your hash marks being generated out of the compiler, or have you typed them all in by hand? If the compiler is doing those for you, then you could just visit the Separators panel in the compile window and change the appropriate custom separator to “* * *” from “#”. This custom separator option centres the text you enter automatically.

If you’ve typed them all in by hand, that’s going to be more difficult to work with. You could try using Replacements, another compile pane. It just works like a list of stored search & replaces. You enter the search term in the first column and what to replace it with in the second column. That won’t insert formatting, so if your hashes are not already centred the asterisks won’t be centred either—but hashes typically are in submission formats, so you should be all right. If you do get false positive matches, you could try changing the search parameter to look for “#” and then hold down the Option key and press the Return key. This will insert a carriage return after the hash, so only those that fall on the end of a line will get replaced.

Yeah sounds more like you have them typed in then. That’s one reason why it is usually best to use Separators for this sort of thing, though if you’ve started this one before Scrivener it’s understandable that you’d have them typed in already in the files themselves. There is a way to protect their alignment, but you’d have to go through, finding each and every one of them, and adding a Format/Formatting/Preserve Formatting blue-box to it.

Honestly, if that were the case, I’d rather spend that time cutting up the manuscript into scene sized chunks and deleting the manually typed in separator so that its agility will allow for a single switch in the compiler to change the separator form.

Might be easier to just turn of reformatting in the compiler, if that is feasible.

Thanks so much for the answer - yes, the # are entered in the text; I don’t generally work with separated scenes.

I’ll have to think about that in future - but I have 60 documents, each between 5 and 20k words, that I’d be formatting and exporting, and I was hoping to be able to tag the text and export it by replacing it with formatted asterisks, which in this case sounds like it’s not possible without going back to the text and altering it.

But - it’s good to know!

– Michelle

I’d give Replacements a shot then, and I thought of a better option for keeping these centred: in the Formatting compiler pane, click the Options button near the top and then set the option to preserve alignment.