vivliostyle / vfm

⬇️ Open and extendable Markdown syntax and toolchain.
https://vivliostyle.github.io/vfm/#/vfm
Other
72 stars 12 forks source link

spec: Text combine upright (縦中横) #6

Open uetchy opened 4 years ago

uetchy commented 4 years ago

Goals

令和^15^年
<p>令和<span class="tcu">15</span>年</p>

Prior Art

でんでんマークダウン 令和^15^年

https://conv.denshochan.com/markdown#tcy

Discussion

MurakamiShinyu commented 4 years ago

I wrote in https://github.com/vivliostyle/vfm/issues/1#issuecomment-577289611:

ただしこの縦中横の記法(例: 昭和^53^年)は、他のMarkdown拡張(pandocなど)では上付き文字(superscript)だったりするので、ほかの記法に変えた方がよいかもしれません。

See Pandoc's Markdown: Superscripts and subscripts:

Superscripts may be written by surrounding the superscripted text by ^ characters; subscripts may be written by surrounding the subscripted text by ~ characters. Thus, for example,

H~2~O is a liquid.  2^10^ is 1024.

This superscript notation in markdown is not very common, however using same symbol ^ may cause problem when we want to add superscript notation in the future.

spring-raining commented 4 years ago

I understand that Text combine upright is a necessary one for writing Japanese, but I don't think it would be good to add it to Markdown extensions. Markdown's merit is a separation between semantics and style, so I think it's weird to incorporate Text combine upright as grammar. (If it is really semantic, there should be a tag of <tcu> in HTML instead of CSS definition)

My solution 1: Implement text-combine-upright correctly in Vivliostyle; currently we can only use none and all, but originallydigits can display it properly. I suppose there is none of a special environment that cannot be fulfilled with digits.

My solution 2: Generalize inline class annotations; I think it's a useful feature to attach arbitrary classes with VFM and add CSS as users like. Until the implementation of text-combine-upright of Vivliostyle is completed, we can achieve the desired expression for the time being if we reserve one of the annotations means for Text combine upright.

lostandfound commented 4 years ago

でんでんマークダウンでもこの記法は現在非推奨です。autoTcyオプションを指定して自動化するか、手作業で <span class="tcy"> を指定する方法を推奨しています。

akabekobeko commented 3 years ago

現状、記法の議論が途中で止まっています。実際に対応するかは v2.0 で改めて検討するため v1.0 では見送ります。