progit2 icon indicating copy to clipboard operation
progit2 copied to clipboard

Fix formatting

Open spotlesscoder opened this issue 6 years ago • 3 comments

spotlesscoder avatar Oct 18 '19 08:10 spotlesscoder

the literal "–" character was un-rendered to -- in the source code

That's not correct. The literal character you are showing is an en-dash, but if you enter -- in the source code, it will be rendered to an em-dash, as described in the Asciidoctor manual here. For English texts the use of -- is correct anyway, because the em-Dash should be used there. In German texts the en-dash must be used instead. The render code that the Asciidoctor manual suggests is– (see the table here). It's true, in text editors the en-dash is visually hard to identify from the simple dash or hyphen. Therefore, it makes sense to perform a "search&replace" pass.

Oh, and as it turns out, the GitHub renderer handles the "new style" notation properly.

That's wonderful for English writing. In the table from my second last post the left character is also called "high 66" and the right one " high 99". In German texts we use another character for the left, opening quotation mark (for which I found no code in the Asciidoctor manual). The right, closing quotation mark is the same character ("high 66") as the left, opening quotation mark in English texts. If I now follow your proposals in German texts, the renderer will recognize the correct "high 66" quotation mark at first. But it expects a closing character afterwards. Then the second time it is used, it will decode to the wrong closing "high 99" quotation mark.

This is one the main reasons why I prefer using the UTF-8 code, by keyboard shortcut, you call "frozen", as long as the files are used for printed texts. In the case of program code, this is certainly a different thing.

max123kl avatar Oct 21 '19 10:10 max123kl

You can ping me if you have agreed on a solution ;)

spotlesscoder avatar Oct 21 '19 15:10 spotlesscoder

Just to chime in (a bit late), I'm working on making the book compilable with asciidoctor 2.0.10, so we have to switch to the new syntax, which basically makes me sed through the source code. So in the end, we are tied to possible evolutions of the renderer. I would tend to agree with @max123kl that we should use full unicode source, because that way, we rely only on the coding system, not on possibly evolving publishing tools.

jnavila avatar Jan 26 '20 16:01 jnavila