Dashes and hyphens

bu
bubbabr
Posts: 6
Joined: Sun May 19, 2019 10:13 am
Platform: Mac + Windows

Wed Jul 17, 2019 3:18 pm Post

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?

Thanks

User avatar
AmberV
Posts: 23244
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza
Contact:

Wed Jul 17, 2019 4:25 pm Post

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.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

User avatar
auxbuss
Posts: 222
Joined: Mon Nov 30, 2015 9:50 pm
Platform: Mac
Contact:

Thu Jul 18, 2019 4:10 pm Post

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.
Image

User avatar
Silverdragon
Posts: 1080
Joined: Mon Jul 29, 2013 2:52 pm
Platform: Mac + iOS
Location: Tarzana, California, USA
Contact:

Thu Jul 18, 2019 4:28 pm Post

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.
So you know where I'm coming from:
  • I'm a user, not an L&L employee.
  • Mac Scrivener 3.1.3, MacBook Air 11, MacOS 10.14.6 (Mojave)
  • IOS Scrivener 1.1.5; iPhone 8 Plus, iOS 12.4; iPad 6th gen, iOS 12.4

User avatar
AmberV
Posts: 23244
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza
Contact:

Thu Jul 18, 2019 5:15 pm Post

I avoid using en-dashes and en-dashes in the editor for this reason – my writing font makes the differences hard to see…. 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.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

User avatar
Silverdragon
Posts: 1080
Joined: Mon Jul 29, 2013 2:52 pm
Platform: Mac + iOS
Location: Tarzana, California, USA
Contact:

Thu Jul 18, 2019 5:41 pm Post

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.
So you know where I'm coming from:
  • I'm a user, not an L&L employee.
  • Mac Scrivener 3.1.3, MacBook Air 11, MacOS 10.14.6 (Mojave)
  • IOS Scrivener 1.1.5; iPhone 8 Plus, iOS 12.4; iPad 6th gen, iOS 12.4

User avatar
auxbuss
Posts: 222
Joined: Mon Nov 30, 2015 9:50 pm
Platform: Mac
Contact:

Thu Jul 18, 2019 5:46 pm Post

Silverdragon wrote: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.

This is a really good idea. Thanks.
Image

bu
bubbabr
Posts: 6
Joined: Sun May 19, 2019 10:13 am
Platform: Mac + Windows

Mon Jul 22, 2019 6:26 am Post

AmberV wrote: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.


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?

br
brookter
Posts: 1882
Joined: Wed Mar 18, 2009 12:22 pm
Platform: Mac

Mon Jul 22, 2019 7:28 am Post

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...

User avatar
AmberV
Posts: 23244
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza
Contact:

Mon Jul 22, 2019 11:14 am Post

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”.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

br
brookter
Posts: 1882
Joined: Wed Mar 18, 2009 12:22 pm
Platform: Mac

Mon Jul 22, 2019 11:38 am Post

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...)

Ad
AdKyburg
Posts: 11
Joined: Sun Nov 20, 2016 9:37 am
Platform: Mac

Tue Jul 30, 2019 12:57 pm Post

brookter wrote: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...

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.

User avatar
AmberV
Posts: 23244
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza
Contact:

Tue Jul 30, 2019 3:16 pm Post

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).
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles