View Single Post
Old 07-25-2014, 12:37 AM   #10
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by AlexBell View Post
This may be off topic but for what it is worth I really don't like to see single ndashes or right quotation marks on a line by themselves; it just looks ugly to me. Most of the ebooks I do were written in the 19th century, and it was quite common to see something like:

[...]

Any comments?
Pick a Style Guide that says they should be Set Closed:

https://en.wikipedia.org/wiki/En_das...d_substitution

But, if you still want to keep the Set Open (as some languages require), the   is probably the best way to handle it in EPUB since the more complex spaces (hair space, thin space, etc. etc.) are not supported very well on devices.

I don't have any Regex on hand to handle all the situations (since I Set Close all em/en dashes), but it shouldn't be too hard to come up with a bunch of Regex to substitute spacing around dashes to Set Open.

I use this to Regex to Set Close all Em Dashes:

Search: [ ]*—[ ]*
Replace:

I am also not too sure if it would be valid to only have   only BEFORE the Set Open en dash, and not BEFORE+AFTER (this will make sure the device doesn't see both words combined into one very large word, and mangle the justification algorithm).

Same sort of thing happens in certain languages with spacing before/after other punctuation. I was converting a French Canadian book once, and the typographic rules made my head hurt, and created ugly code.

Here is a paragraph from the French Canadian book:

Quote:
<p>Pour comprendre le rôle de la monnaie, nous devons commencer par le commencement, et nous demander&nbsp;: après tout, pourquoi les hommes échangent-ils&nbsp;? L’échange est le fondement de notre vie économique. Sans échanges, aucune économie ne peut réellement se développer, la société même est impossible. À l’évidence, si un échange a lieu volontairement, c’est que les deux parties espèrent en bénéficier. Un échange, c’est un accord entre A et B pour céder les biens et services de l’un contre les biens et services de l’autre. Les deux en profitent parce que chacun accorde plus de valeur à ce qu’il reçoit qu’à ce qu’il cède. Par exemple, lorsque Crusoé échange du poisson contre du bois, il accorde plus de valeur au bois qu’il «&nbsp;achète&nbsp;» qu’au poisson qu’il «&nbsp;vend&nbsp;». Pour Vendredi c’est le contraire&nbsp;: il accorde plus de valeur au poisson qu’au bois. Mais depuis Aristote jusqu’à Marx, les hommes ont cru à tort que l’échange correspondait à une sorte d’identité de valeurs – que si une barrique de poisson était échangée contre dix rondins de bois, cela voulait dire qu’implicitement il y avait <em>égalité</em> entre les deux. Mais c’est le contraire. L’échange a lieu justement parce que chaque partie, <a id="page_14"></a>parmi ses préférences, range les deux produits dans un ordre <em>différent</em>.</p>
As you can see, they even use &nbsp; before colons, and question marks.

Side Note: Alex, I sent you an email a few months back, never got a response, did you change your email or something? Maybe it got lost in the spam folder, I did attach A TON of stuff to get your input/ideas on.

Last edited by Tex2002ans; 07-25-2014 at 01:17 AM.
Tex2002ans is offline   Reply With Quote