Skip to content

slack project markupdown 2020 01 22

akabeko edited this page Feb 15, 2020 · 1 revision

2020-01-22

Time (UTC) Icon Name Message
01:42 shinyu pandocでテスト:

https://pandoc.org/try/?text=%23+Test+GFM+HTML+blocks%0A%0A%3Cdiv%3E%0A*+In+HTML+block%2C+**markdown**+disabled%0A%3C%2Fdiv%3E%0A%0A%3Cdiv%3E%0A%0A*+not+in+HTML+block%2C++**markdown**+enabled%0A%3C%2Fdiv%3E%0A&from=gfm&to=html5
01:42 Kiara Translation 🇬🇧: Tested with pandoc:

<https://pandoc.org/try/?text=%23+Test+GFM+HTML+blocks%0A%0A%3Cdiv%3E%0A*+In+HTML+block%2C+**markdown**+disabled % 0A% 3C% 2Fdiv% 3E% 0A% 0A% 3Cdiv% 3E% 0A% 0A * + not + in + HTML + block% 2C ++ ** markdown ** + enabled% 0A% 3C% 2Fdiv% 3E% 0A & amp; from = gfm & amp; to = html5>
01:53 shinyu ↑“from” を“Markdown (pandoc)” に変えると結果が変わります。GFMと違って pandoc markdown では空白行を入れなくてもHTMLブロック要素内がmarkdown有効になるようです。
“Markdown (strict)” だと、空白行を入れてもダメです。

“from” を GFM、“to” を “Markdown (pandoc)” にすると GFM のHTMLブロックがどのように扱われるのかが分かりやすいです。
01:53 Kiara Translation 🇬🇧: 変 え る Changing “from” to “Markdown (pandoc)” will change the result. Unlike GFM, pandoc markdown seems to enable markdown inside HTML block elements without blank lines.
With “Markdown (strict)”, blank lines are not allowed.

Setting “from” to GFM and “to” to “Markdown (pandoc)” makes it easy to understand how GFM HTML blocks are handled.
02:14 shinyu GFMあるいはPandoc Markdownの方式を採用するならば、Markdown→HTML→Markdown→… というネストは自由にできるので、特別な構文を使う必要性はあまりないと思います。

しかし特別な構文を導入するのであれば、pandoc拡張の fenced_divs を使うのがよいと思います。

Example:
::::: {#special .sidebar}<br>Here is a paragraph.<br><br>And another.<br>:::::
https://pandoc.org/MANUAL.html#divs-and-spans
02:14 Kiara Translation 🇬🇧: If you adopt GFM or Pandoc Markdown method, you can freely nest Markdown → HTML → Markdown →… so I don't think it is necessary to use special syntax.

However, if you want to introduce a special syntax, I recommend using the fenced_divs pandoc extension.

Example:
`::::: {#special .sidebar}<br>Here is a paragraph.<br><br>And another.<br>::::: `
https://pandoc.org/MANUAL.html#divs-and-spans
03:01 shinyu 提案: Pandoc’s Markdown を採用する。
https://pandoc.org/MANUAL.html#pandocs-markdown

不足するものだけ追加する。例:ルビ [親文字]{ルビ・テキスト} は、bracketed_spans [This is *some text*]{.class key="val"} に似ているけど、{ } 内が . あるいは # で開始しない、また途中に= がない、ということで区別できます。
03:01 Kiara Translation 🇬🇧: * Suggestion *: Adopt Pandoc ’s Markdown.
https://pandoc.org/MANUAL.html#pandocs-markdown

Add only the missing ones. Example: Ruby [base character] {ruby text} is similar to bracketed_spans [This is * some text *] {. Class key =" val "}, but inside {} is . It can be distinguished by not starting with or#and not having an=in the middle.
03:07 uetchy @shinyu提案ありがとうございます!scoped inline block構文を採用する必要があったのですが、[This is *some text*]{.class key="val"} という記法はかなり有望ですね。ただめちゃくちゃ紛らわしいのでルビ記法とインライン記法のどちらかを変更してわかりやすくしたいです。
03:07 Kiara Translation 🇬🇧: Proposed Thank you! I had to adopt the scoped inline block syntax, but the notation [This is * some text *] {. class key =" val "} looks pretty promising. I just want to change either ruby or inline notation to make it easier to understand.
03:08 uetchy Issueを作りました。こちらでドラフトに対してコメントをしたり、あるいは提案を行う形にしていきます。
https://github.com/vivliostyle/vfm/issues/1
<https://user-images.githubusercontent.com/431808/72223580-c0e6f100-35b3-11ea-8b00-bbd6d863ceb7.png
03:08 Kiara Translation 🇬🇧: Issue was created. Here you can comment on the draft or make a suggestion.
https://github.com/vivliostyle/vfm/issues/1
03:09 uetchy 脚注記法などがまだ含まれていませんが、現状のドラフトはこちらから参照できます。
土曜日までにまとめて、正式にコメントを募ります。もちろんそれ以前でも補足的コメントをしていただいて大丈夫です。
https://github.com/vivliostyle/vfm/blob/master/spec/vfm.md
# Vivliostyle Flavoured Markdown Draft

Draft of Vivliostyle Flavored Markdown (VFM), a custom Markdown syntax specialized in book authoring.

## Principles

### VFM

1. Rule of least surprise.
1. Should be lined and matched to another Markdown syntax.
1. Not intended to be a superset/subset of either CommonMark or GFM.
1. Backward compatible syntax (should not be incorrectly rendered in Markdown editor like Typora).

### HTML

- Follows WCAG 2.1.

## Spec

### Caveats

- position is omitted in mdast.

### Sentence

- A newline puts &lt;br/&gt; to the end of a line.
- Consecutive 2 newlines creates new sentence block.
md
はじめまして。

Vivliostyle Flavored Markdown(略して VFM)の世界へようこそ。
VFM は日本語の執筆に特化した Markdown の亜種であり、Vivliostyle プロジェクトのために策定・実装されました。
json
{
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "はじめまして。"
}
]
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Vivliostyle Flavored Markdown(略して VFM)の世界へようこそ。"
},
{
"type": "break"
},
{
"type": "text",
"value": "VFM は日本語の執筆に特化した Markdown の亜種であり、Vivliostyle プロジェクトのために策定・実装されました。"
}
]
}
]
}
html
<p>はじめまして。</p>
<p>
Vivliostyle Flavored Markdown(略して VFM)の世界へようこそ。<br />
VFM は日本語の執筆に特化した Markdown の亜種であり、Vivliostyle
プロジェクトのために策定・実装されました。
</p>

### Heading
md
# Heading 1

## Heading 2

### Heading 3

#### Heading 4

##### Heading 5

###### Heading 6
json
{
"type": "heading",
"depth": 1,
"children": [
{
"type": "text",
"value": "Heading 1"
}
]
}

{
"type": "heading",
"depth": 2,
"children": [
{
"type": "text",
"value": "Heading 2"
}
]
}
html
<h1>Heading 1</h1>

<h2>Heading 2</h2>

The underline styled header is disabled in VFM.

This cannot be used
===================

This also cannot be used
------------------------

### Code
md<br>```javascript:app.js<br>function main() {}<br><pre>
json
{
"type": "code",
"lang": "javascript",
"meta": {
"title": "app.js"
},
"value": "function main() {}"
}

md<br>```javascript:title=app.js<br>function main() {}<br><pre>
json
{
"type": "code",
"lang": "javascript",
"meta": {
"title": "app.js"
},
"value": "function main() {}"
}
html
<pre>
<code class="language-javascript">
function main() {}
</code>
</pre>

### Ruby

This is [Ruby]{ルビ}
json
{
"type": "ruby",
"rubyText": "ルビ",
"children": [
{
"type": "text",
"value": "Ruby"
}
]
}
html
This is <ruby>Ruby<rt>ルビ</rt></ruby>

#### Other candidates

[Text]<Ruby> # disambiguate with <URL>
|Text《Ruby》 # avoid Unicode character

### Positional Image

#### Two-column images
markdown
Column 1Column 2

### Frontmatter

- title, layout are reserved metatags.
- title SHOULD be treated as section title and MAY be used in ToC.
- metatags other than reserved metatags can be used for arbitorary usage.
markdown
---
title: Introduction to VFM
layout: base
---

### Page Layout
md
---
layout: base
---

- title: Title of the book
- content: Rendered VFM
html

<html lang="{{lang}}">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width={{width}}, initial-scale=1.0" />
<title>{{title}}</title>
</head>
<body>
{{content}}
</body>
</html>

### Walled block

- Walled block populates a class labeled &lt;div&gt; element with its contents.
- Inner contents will be parsed as VFM.
- Notation candidates: ===, ~~~
md
===section-author
uetchy
===
json
{
"type": "walledBlock",
"className": "section-author",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "uetchy"
}
]
}
]
}
html
<div class="section-author">
<p>uetchy</p>
</div>

#### Nested walled block
md
===section-author
uetchy
====author-homepage
https://uechi.io
====
===
json
{
"type": "walledBlock",
"className": "section-author",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "uetchy"
}
]
},
{
"type": "walledBlock",
"className": "author-homepage",
"children": [
{
"type": "link",
"title": null,
"url": "https://uechi.io",
"children": [
{
"type": "text",
"value": "https://uechi.io"
}
]
}
]
}
]
}
html
<div class="section-author">
<p>uetchy</p>
<div class="author-homepage">
<a href="https://uechi.io">https://uechi.io</a>
</div>
</div>

#### Custom HTML
markdown
<div class="custom">
...
</div>

## References

- mdast
- GitHub Flavored Markdown Spec
- CommonMark Spec
- PHP Markdown Extra
- remark
- remark-rehype
- env-create-book
- dewriteful
03:09 Kiara Translation 🇬🇧: The footnote notation is not included yet, but the current draft can be found here.
Collect them by Saturday and solicit comment. Of course, it is okay to have additional comments before that.
https://github.com/vivliostyle/vfm/blob/master/spec/vfm.md
03:10 uetchy @shinyu fenced_divsについてGitHubの方にもコメントしてもらって良いですか?
03:10 Kiara Translation 🇬🇧:  Can GitHub comment on fenced_divs?
03:34 uetchy Pandoc Markdownから執筆時にあると良いと思える記法をピックアップして提案する形にしていただけるとわかりやすいです💪
03:34 Kiara Translation 🇬🇧: It is easy to understand if you can pick up a notation that you would like to have at the time of writing from Pandoc Markdown and propose it: muscle:
03:37 shinyu コメントはどこに書くのがよいですか?
https://github.com/vivliostyle/vfm/issues/1
にコメントを追加するとよいですか? 個別にissueを立てるのがよいですか?
03:37 Kiara Translation 🇬🇧: Where should I write comments?
https://github.com/vivliostyle/vfm/issues/1
Should I add a comment to?で す か Is it better to make an issue individually?
03:40 uetchy 1に書いていく形で良いと思います。
一方で個別にIssueを立てるメリットが十分あれば、そちらに変えても良いと思っています。
03:40 Kiara Translation 🇬🇧: I think it is good to write in 1.
On the other hand, if there is enough merits to create an issue individually, I think that it can be changed there.
03:42 uetchy @akabeko @dynamis
Frontmatterやメタデータの扱い方についてまだふわっとしているので、是非GitHubの方にアイディアを書き込んでください💪
03:42 Kiara Translation 🇬🇧:  
I'm still worried about how to handle Frontmatter and metadata, so please write your ideas on GitHub: muscle:
03:44 uetchy @spring-raining インラインのクラス付き要素の記法と、それらにid指定を許可するかどうかについて悩んでいるので、その辺り知見がありましたらコメントいただけると幸いです🙏
03:44 Kiara Translation 🇬🇧:  I'm worried about the notation for inline classed elements, and whether to allow them to have ids, so I'd be grateful if you could comment if you have any insights: pray:
03:45 akabeko @uetchy 特に結論は出ていなかったと記憶しているのですが、GitHub Issues の議論は英語ですか?
それとも日本語で書いても問題ないですか?
03:45 Kiara Translation 🇬🇧:  I remember that no conclusion was reached. Is the discussion on GitHub Issues in English?
Or is it OK to write in Japanese?
03:46 uetchy 基本英語ですが、日本語であっても問題ないと思います!機械翻訳が最後に付いてると親切かもしれません。
03:47 Kiara Translation 🇬🇧: It is basic English, but I don't think there is any problem even if it is Japanese! It may be kind if you have machine translation.
03:47 shinyu ルビの記法は、でんでんマークダウンの形式でいかがでしょうか?  例:
```{電子出版
03:47 Kiara Translation 🇬🇧: How about Ruby notation in the form of den mark down? Example:
`` `Easy to use {electronic publishing
03:48 akabeko 英語でも書けますが、母語である日本語のほうがより正確に表現できるのでそうします。
その際は機械翻訳を併記する予定です。
03:48 Kiara Translation 🇬🇧: I can write in English, but I do so because my native language, Japanese, is more accurate.
In that case, a machine translation will be added.
03:56 uetchy でんでんマークダウン形式シンプルで良いですね。これをベースにもうちょっとMarkdownらしくしたい...
03:56 Kiara Translation 🇬🇧: Denden markdown format is simple and good. I want to make it a little more Markdown based on this ...
06:24 shinyu https://pandoc.org/try/ を試すと、Pandoc’s Markdown だけでなく各種Markdown方言やその他の形式の変換ができるのは面白いです。
pandocを Vivliostyle Pub に組み込んで、ユーザーの好みのいろいろな入力形式をサポートするのがよくないでしょうか?
ほかの形式で原稿を書いていた人々が Vivliostyle Pub を利用しやすくなります。
VFM は Pandoc’s Markdown の拡張として定義するのでどうでしょう。
06:25 Kiara Translation 🇬🇧: If you try https://pandoc.org/try/, it's interesting to be able to convert not only Pandoc ’s Markdown, but also various Markdown dialects and other formats.
Wouldn't it be nice to incorporate pandoc into the Vivliostyle Pub to support a variety of user input formats?
Vivliostyle Pub will be easier for people who wrote manuscripts in other formats.
What about VFM as it is defined as an extension of Pandoc ’s Markdown?
08:46 spring-raining First round意外と近かった! 家帰ったらコメントします
08:46 Kiara Translation 🇬🇧: First round Surprisingly close! Comment when i go home
08:51 uetchy よろしくお願いします。あとFirst roundは月末までやっているので安心してください!
08:51 Kiara Translation 🇬🇧: Thank you. Also, please be assured that the First round is done until the end of the month!
Clone this wiki locally