Can Scrivener replace double hyphens with EN dashes?

Scrivener has the great feature of automatically replacing double hyphens with em-dashes. This is great for standard manuscript format.

Unfortately, my Dutch publisher doesn’t want em dashes, they want en dashes. (Also, they want spaces before and after the dash, which I’ve now taught myself to type when writing in Dutch, but that’s beside the point.)

Of course, this is a simple search-and-replace command in Word, and in fact, the editing staff at my publisher takes care of it.

But perfectionist that I am, I’d much prefer to have Scrivener do it “right”, and I’d prefer to have my source correct instead of me or my publisher correcting the dashes after compile. (Also makes it easier to compare MS with edits to Scrivener-compiled originals, since the dashes don’t throw out false positives.)

Can I configure Scrivener to replace double hyphens with en dashes instead? Or is there a way to search-and-replace em dashes with en dashes in Scrivener?

Edit > Find > Project Replace
Do not enter your dashes manually into the respective Replace and With fields, but use Copy and Paste to do so.

Depending on whether you want to target hyphens with spaces around them or not, adjust the Contains/Whole Word dropdown accordingly.

Pick your scope from the available checkboxes further down and you are set to go.
Most importantly: Backup your project before running this function.

To replace/ auto-correct on the fly while typing:
Edit > Options > Corrections tab, at the very bottom it says “Enable additional substitutions”. Click the Plus-symbol and enter your dashes.

3 Likes

I had the same issue where I needed long em-dashes for dialog – but shorter en-dashes, like I am doing just now – within the text as parentheses.

My solution was to turn off image from the option, then rather use substitutions, having it replace - - - for an em-dash, and - - for an en-dash.

image

6 Likes

Additional substitutions, that’s perfect!

For my purposes, the combination of the standard double hyphen - em-dash substition with an additional solves my whole dash issue.

Writing in English, I can enter a double hyphen, and get the em dash I need.

Additionally, I’ve created a substitution that replaces [space][em dash][space] with [space][en dash][space]. So if I type a double hyphen preceded by a space, the double hyphen first gets replaced with an em dash, and when I then type a space after the em dash, the em dash is replaced with an en dash. (The spaces are also replaced, but with spaces, so that makes no difference.)

End result: dashes without spaces around them become em dashes, and dashes surrounded by spaces become en dashes. Exactly what I need in English and Dutch, respectively.

Perfect!

2 Likes

The only problem with that (because it is otherwise a smart way to go about it), and you should test it, or pay attention to it whenever doing so, is that if you insert your en-dash during editing afterwards, and thus one of your two spaces is already present between the two words, the substitution won’t occur, as you will most likely not keep typing, but rather grab back your mouse.

You could go around the problem and fix whatever occurrences of the em-dash might not have been replaced, by inserting the very same substitution routine in your compile format, or straight in the compiler’s replacements.
→ Note that image doesn’t behave any better. You have to make sure that you insert it after the already present space when editing it in afterwards, no matter the case.

[EDIT] (But now that I think of it, because of the way you went about it – having the second space as part of the condition to trigger the replacement -, I’m afraid that whether you edit in an en-dash before or after the already present space won’t make any difference, as it won’t work for you any which way.)

Typing this here post, I realized that rather using the replacement method I depicted above, I actually have developed inserting the final space as a reflex, no matter whether one is already present or not, and then backspacing the extra one, or now and then using ctrl-space to fix double spaces.
That might be a solution for you too, in addition to the auto-replace conditions you’ve set up.

Yes, that’s something to keep in mind. Thanks!

When I input the “double hyphen” then try to close the quote marks Scrivener puts in another “Open quote” instead.

Yeah, that’s my experience too, @JerryC , smart quotes don’t close correctly under all circumstances. I’ve developed the reflex to type a 2nd quote when I see this happen, and then back-backspace to delete the wrong one.

1 Like

Weird. Nevertheless, Ctrl+Q changes all straight quotes to smart quotes.

If it is so, you could set a substitution so that Scrivener does it for you.
Replace opening-closing with closing.
You’d just have to type a second quote and that’s it.

And since an opening quote mark is never followed by a space, you could also substitute opening-space for closing-space, and no longer have to worry with this specific case.