Dashes and hyphens

Microsoft Word distinguishes between the hyphen you use to divide a clause (e.g. I met a man – a brave man – who would one day change the world) and dashes, which are used to join words together (e.g. The regime-affiliated third parties).

Scrivener doesn’t seem to distinguish between the two, meaning on compiling my document, all my hyphens are rendered as dashes.

Can anyone advise of a way to get my hyphens to render as hyphens?


I see you’re using the Space+En Dash+Space convention. That’s not something the macOS text engine has any built-in help for. It prefers the Word+Em Dash+Word convention, and its built-in substitution for double-hyphens is how you’d insert those. That’s probably a point of trivia to your question, but it might help identify what is going on here. Your use of the word “dash” is a bit vague, in that there are probably over half a dozen different dash characters, the hyphen (in most cases your keyboard will insert the Hyphen-Minus character rather than a true hyphen, since most software conflates these two dash types) among them. Scrivener distinguishes between all of them and the millions of other Unicode character entries.

Otherwise I have no idea how you ended up with the result you describe. When I type a “hyphen” character, as provided by the key to the left of the [+/=] key, that’s all I get. I don’t get an en dash unless I use the ⌥- combination, and an em dash with ⇧⌥-.

But your keyboard layout may differ from mine. As I say this is all basic macOS technology here, so you should be seeing this behaviour everywhere you type that uses the native Mac text toolkit. One clue, you mention this happens “on compile”. Does that mean the character code is accurate in the editor if you copy and paste it into the search field of the Emoji & Symbols palette—but incorrect when you compile? I presume there is some extra layer in here as well, such as opening the compiled document in some type of software, it might help to know what that is, and what type of file you are creating.

Replacements might be a culprit. That’s the only obvious thing I can think of that would translate characters in that direction, especially if you only ever use a single hyphen in compound words.

I create hyphens, en rules, and em rules as Ioa suggests. One additional thing, some fonts do odd things with “dashes”. For example, conflating hyphens and en rules visually- a pox upon them. i.e. hyphens and en rules look the same in the editor, yet are different characters; and so would compile as such.

I avoid using en-dashes and en-dashes in the editor for this reason – my writing font makes the differences hard to see. Instead, I turn off “Smart dashes and ellipses”, put the ellipsis auto-convert in the Mac keyboard settings, and put replacements in my Compile options – two hyphens become an en-dash and three become an em-dash.

I use pretty much the same mechanism myself, though in my case that’s because MultiMarkdown turns double-hyphens into en dashes and triple-hyphens into em dashes. Personally I find having that strong visual distinction to be helpful when editing. I tend to overuse the em dash, and it’s much easier to spot them when they look like “—”.

Speaking of how fonts handle the typographic characters themselves though, argh. I’m using a font right now that I otherwise really like (Source Code Pro), but they didn’t bother to keep these three dashes vertically aligned, which would drive me nuts, and they all look about the same. Thank goodness I don’t write with typographic punctuation, otherwise I’d have to be a lot more picky about the fonts I use.

Currently using Anonymous Pro, and echo your comments, AmberV. It’s hard to distinguish among typographic dashes even in the monospaced fonts with the most distinct glyphs. Your earlier comments on this led to my current system – thanks! I currently use the smart quotes transformation rather than typing them out each time, and so being able to distinguish among those (initial apostrophes are the worst) takes precedence.

This is a really good idea. Thanks.

As was probably clear, I’m a dash/hyphen n00b! What I was looking for the the one produced when you hit “⌥-”. I didn’t know how to get Scrivener to produce it, but I do now so thanks for that.

Just to be clear, the issue wasn’t on clicking Compile, Scrivener compiles to the Word the same characters as displayed when editing. I just didn’t know how to type the “⌥-” one, which is the one Word produces automatically when you write a word, then a space, then the “-” key to the left of “-/+”, and then another word. This is the ‘em dash’ is it?

Minor point: You’re right—Word and Scrivener (PCs and Macs in general, in fact), produce an em-dash automatically.

But… if you press opt-minus you’ll get an en-dash (–). You need shift-opt-minus for an em-dash (—).

I think it’s been mentioned above, but if you’re going to have a space around the dash, you need the en-dash (Word – Word); if you don’t use a space, you need the em-dash (Word—Word)—at least, that’s the usual convention, which Word cheerfully ignores…

Do you use a text expansion utility, like Typinator or TextExpander? If so, you might be able to get away with creating a substitution that converts “space+hyphen+space” to “space+en dash+space”. You can even set it up to only work in Scrivener, as such a blanket replacement might mess up other uses (like equations).

Unfortunately Apple’s free version of this, in System Preferences: Keyboard: Text, doesn’t work for this one. For whatever reason “spaces aren’t allowed”.

Hi Ioa… I actually don’t bother with the correction myself (I have Smart Dashes and Smart Quotes etc switched off permanently because I flit around between RTF and plain text so much), but if I did, you’re right, a third party tool (I use Keyboard Maestro) is the way to go for this sort of thing (and so much more…)

Well, this post is very interesting to me… because I have kind of opposite problem: Antidote corrects all my typography when analysing my native manuscript. But when compiling to epub, why the separation dash gets replaced by two hyphens?!?
This puzzles me completely.
Has anyone an idea of how to keep these dashes straight?
Thanks for any help.

The only thing in Scrivener that would be doing that is the Convert “smart” punctuation to “dumb” punctuation setting, in the Transformations compile option pane. For obvious reasons that is off by default in all of the stock rich text compile formats, though. Where it is on, you wouldn’t ordinarily notice (Pandoc/MMD, both of which take hyphen conventions more naturally but turn them back into typographic punctuation on output, so you should only see it if you examined the source files).