metanorma / metanorma-gb

Metanorma processor for GB: write Chinese Standards using GbDoc
BSD 2-Clause "Simplified" License
2 stars 3 forks source link

Native `zh` commands for AsciiDoc #20

Closed ronaldtse closed 3 years ago

ronaldtse commented 6 years ago

I've realized it is very tough to use original AsciiDoc commands to type in Chinese input. Most AsciiDoc commands require a switch of input language to English to type, for example (I've put in the corresponding symbol generated by the same keystroke in Simplified Chinese -- on a Mac!):

These are the same:

Either this belongs to an AsciiDoc extension or for the imaginary text format.

Thoughts?

opoudjis commented 6 years ago

Well, yes, the meta language of ASCII doc is English, and the meta script of asciidoctor is Latin. A preprocessor could deal with these in a brute force fashion, by converting all Chinese punctuation into Latin, though the round-tripping may be non-trivial.

I will look into it, but I will treat this as an enhancement.

ronaldtse commented 6 years ago

Right, it should be an enhancement, but I'm not sure if it can be easily done by hacking asciidoctor or we should consider this in the imaginary format...

ronaldtse commented 6 years ago

A simplistic preprocessing approach may be inappropriate because there are legitimate uses of such punctuation within the text? Or the pre-processor needs to be intelligent enough to actually parse and replace the commands?

opoudjis commented 6 years ago

I think the latter; Asciidoc directives are reasonably constrained. Blindly doing it on all text would indeed be trouble.

ronaldtse commented 5 years ago

Probably a future thing. Unassigning.

opoudjis commented 3 years ago

Development abandoned on this gem