pandoc2review 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/pandoc.yml +18 -0
  3. data/.gitignore +47 -0
  4. data/Gemfile +6 -0
  5. data/LICENSE +339 -0
  6. data/README.md +105 -0
  7. data/Rakefile +13 -0
  8. data/exe/pandoc2review +12 -0
  9. data/lib/pandoc2review.rb +99 -0
  10. data/lua/filters.lua +163 -0
  11. data/lua/review.lua +620 -0
  12. data/markdown-format.ja.md +721 -0
  13. data/pandoc2review.gemspec +29 -0
  14. data/samples/format.md +276 -0
  15. data/samples/reviewsample/.gitignore +154 -0
  16. data/samples/reviewsample/Gemfile +4 -0
  17. data/samples/reviewsample/Rakefile +3 -0
  18. data/samples/reviewsample/catalog.yml +10 -0
  19. data/samples/reviewsample/ch01.md +38 -0
  20. data/samples/reviewsample/ch02.re +3 -0
  21. data/samples/reviewsample/config-ebook.yml +6 -0
  22. data/samples/reviewsample/config.yml +20 -0
  23. data/samples/reviewsample/images/cover-a5.ai +5836 -16
  24. data/samples/reviewsample/images/cover.jpg +0 -0
  25. data/samples/reviewsample/images/pandoc2review.png +0 -0
  26. data/samples/reviewsample/lib/tasks/review.rake +128 -0
  27. data/samples/reviewsample/lib/tasks/z01_pandoc2review.rake +69 -0
  28. data/samples/reviewsample/sty/README.md +168 -0
  29. data/samples/reviewsample/sty/gentombow.sty +769 -0
  30. data/samples/reviewsample/sty/jsbook.cls +2072 -0
  31. data/samples/reviewsample/sty/jumoline.sty +310 -0
  32. data/samples/reviewsample/sty/plistings.sty +326 -0
  33. data/samples/reviewsample/sty/review-base.sty +530 -0
  34. data/samples/reviewsample/sty/review-custom.sty +1 -0
  35. data/samples/reviewsample/sty/review-jsbook.cls +503 -0
  36. data/samples/reviewsample/sty/review-style.sty +49 -0
  37. data/samples/reviewsample/sty/reviewmacro.sty +15 -0
  38. data/samples/reviewsample/style.css +494 -0
  39. metadata +128 -0
@@ -0,0 +1,29 @@
1
+ Gem::Specification.new do |spec|
2
+ spec.name = "pandoc2review"
3
+ spec.version = "1.2.0"
4
+ spec.authors = ["Kenshi Muto"]
5
+ spec.email = ["kmuto@kmuto.jp"]
6
+ spec.license = "GPL-2.0"
7
+
8
+ spec.summary = %q{Pandoc2review is a converter from any document to Re:VIEW format (using Pandoc)}
9
+ spec.description = %q{It provides Re:VIEW Writer/Filter for Pandoc, and Ruby script to make it easier to handle.}
10
+ spec.homepage = "https://github.com/kmuto/pandoc2review"
11
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
12
+
13
+ spec.metadata["homepage_uri"] = spec.homepage
14
+ spec.metadata["source_code_uri"] = "https://github.com/kmuto/pandoc2review"
15
+ # spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
16
+
17
+ # Specify which files should be added to the gem when it is released.
18
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
19
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
20
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21
+ end
22
+ spec.bindir = "exe"
23
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
+ spec.require_paths = ["lib", "lua"]
25
+
26
+ spec.add_dependency('unicode-eaw')
27
+ spec.add_development_dependency('simplecov')
28
+ spec.add_development_dependency('test-unit')
29
+ end
@@ -0,0 +1,276 @@
1
+ レベル1ヘッダ
2
+ ============
3
+
4
+ <http://sky-y.github.io/site-pandoc-jp/users-guide/> を参考にする
5
+
6
+ レベル2ヘッダ
7
+ ------------
8
+
9
+ ### レベル3ヘッダ ###
10
+
11
+ ### ヘッダの後ろにはいくらでも`#`を付けてもよい ######
12
+
13
+ # 見出し1
14
+ ## 見出し2
15
+ ### 見出し3
16
+ #### 見出し4
17
+ ##### 見出し5
18
+ ###### 見出し6
19
+
20
+ # ヘッダ {#foo}
21
+ # ヘッダ {-}
22
+ # ヘッダ {.unnumbered}
23
+
24
+ 段落1
25
+ の継続行
26
+
27
+ 段落2
28
+
29
+ - リスト1
30
+ - リスト1-1
31
+ - リスト1-1-1
32
+ - リスト1-1-2
33
+ - リスト1-2
34
+ - リスト2
35
+
36
+ 1. 番号リスト1
37
+ 1. 番号リスト1-1
38
+ 1. 番号リスト1-2
39
+ 1. 番号リスト2
40
+
41
+ > 引用1
42
+ >
43
+ > 引用2
44
+ > > 二重引用
45
+
46
+ 二重引用がうまくいかない。
47
+
48
+ class Hoge
49
+ end
50
+
51
+ ```haskell
52
+ qsort [] = []
53
+ ```
54
+
55
+ ``` {.haskell}
56
+ qsort [] = []
57
+ ```
58
+
59
+ | The Right Honorable Most Venerable and Righteous Samuel L.
60
+ Constable, Jr.
61
+ | 200 Main St.
62
+ | Berkeley, CA 94718
63
+
64
+ * フルーツ
65
+ + りんご
66
+ - サンふじ
67
+ - 紅玉
68
+ + なし
69
+ + もも
70
+ * 野菜
71
+ + ブロッコリー
72
+ + セロリ
73
+
74
+ #. ひとつめ
75
+ #. ふたつめ
76
+
77
+ 9) Ninth
78
+ 10) Tenth
79
+ 11) Eleventh
80
+ i. subone
81
+ ii. subtwo
82
+ iii. subthree
83
+
84
+ 用語1
85
+
86
+ : 定義1
87
+
88
+ *インラインマークアップ*の入った用語2
89
+
90
+ : 定義2
91
+
92
+ { コード、定義2の一部 }
93
+
94
+ 定義2の3つ目の段落。
95
+
96
+ これは[リンクです][FOO]
97
+
98
+ [Foo]: /bar/baz
99
+
100
+ インストールコマンドは `gem insall hoge` です。_EM_ですね。*EM*ですね。
101
+ **BOLD**ですね。__BOLD__ですね。***ITBOLD***ですね。___ITBOLD___ですね。
102
+
103
+ pandocだとスペースないと _EM_ 、 __BOLD__ 、 ___ITBOLD___ はだめっぽい。
104
+
105
+ Re:VIEWのインラインエスケープ __int{}__ $f=int_{1}^{n}$
106
+
107
+ ***
108
+
109
+ ---
110
+
111
+ [Google](https://www.google.co.jp/)
112
+
113
+ [こっちからgoogle][Google]
114
+ その他の文章
115
+ [こっちからもgoogle][Google]
116
+ これはうまくいかないようだ。
117
+
118
+ ~~取り消し~~
119
+
120
+ ~~~
121
+ class Hoge
122
+ end
123
+ ~~~
124
+
125
+ ```{caption="ほげほげ"}
126
+ class Hoge
127
+ end
128
+ ```
129
+
130
+ ```{#myhoge .foo caption="ほげほげ"}
131
+ class Hoge
132
+ end
133
+ ```
134
+
135
+ ```{.foo caption="ほげほげ"}
136
+ class Hoge
137
+ end
138
+ ```
139
+
140
+ //tsize[|idgxml|4,10]
141
+
142
+ |header1|header2|header3|
143
+ |:--|--:|:--:|
144
+ |align left|align right|align center|
145
+ |a|b|c|
146
+
147
+ ---
148
+
149
+ 表2
150
+
151
+ Right Left Center Default
152
+ ------- ------ ---------- -------
153
+ 12 12 12 12
154
+ 123 123 123 123
155
+ 1 1 1 1
156
+
157
+ Table: シンプルテーブルのデモ
158
+
159
+ * [to header1](#header1)
160
+ * [to header2](#header2)
161
+
162
+ [return to menu](#menu)
163
+
164
+ *\*hello\**
165
+
166
+ H~2~O は液体です。2^10^ は 1024 です。
167
+
168
+ `<$>`{.haskell}
169
+
170
+ <h1>HOGE!</h1>
171
+
172
+ <http://google.com>
173
+ <sam@green.eggs.ham>
174
+
175
+ ![ラ・ルーン](lalune.jpg "月への旅行")
176
+
177
+ ![ラ・ルーン](lalune.jpg)
178
+
179
+ ![](lalune.jpg)
180
+
181
+ ![](./images/hoge.lalune.jpg)
182
+
183
+ ![](path.png)
184
+
185
+ ![title](path.png)
186
+
187
+ ![title](path.png){scale=0.5}
188
+
189
+ ![title](path.png){width=50%}
190
+
191
+ ![title](path.png){height=50%}
192
+
193
+ ![title](path.png){width=30}
194
+
195
+ ![title](path.png){width=30% height=50%}
196
+
197
+ 文中の ![](lalune.jpg) というもの。
198
+
199
+ これは脚注の参照です[^1]、 そしてもう1つ[^longnote]。
200
+
201
+ [^1]: これは脚注です。
202
+
203
+ [^longnote]: これは長いブロックから成る脚注です。
204
+
205
+ インデントされたいくつかの段落が続くと、
206
+ それらは前の脚注に含まれます。
207
+
208
+ { some.code }
209
+
210
+ 段落の全体または1行目がインデントされていればOKです。このように、
211
+ 複数の段落による脚注は複数項目のリストアイテムのように機能します。
212
+
213
+ この段落は脚注ではありません。なぜならインデントされていないからです。
214
+
215
+ これはインライン脚注です。^[識別子をわざわざ探して打つ必要が無いため、
216
+ インライン脚注は楽に書けます。]
217
+
218
+ <div class="note">
219
+ HEY! <span class="A">hoge</span>
220
+ </div>
221
+
222
+ "DOUBLEQUOTE"、'SINGLEQUOTE'
223
+
224
+ 'はどうなる? **'はどうなる?**
225
+ ’はどうなる? **’はどうなる?**
226
+ `はどうなる?
227
+ **`はどうなる?**
228
+ \はどうなる? **\はどうなる?**
229
+ --はどうなる? **--はどうなる?**
230
+ –はどうなる? **–はどうなる?**
231
+ ---はどうなる? **---はどうなる?**
232
+ —はどうなる? **—はどうなる?**
233
+
234
+ ```
235
+ code内 '` \ -- --- ’ – —
236
+ ```
237
+
238
+ ## 見出し内 '` \\ -- --- ’ – —
239
+
240
+ ## foo {.column}
241
+ ## foo {.nonum}
242
+ ## foo {.nodisp}
243
+ ## foo {.notoc}
244
+ ## foo {.unnumbered}
245
+ ## foo {.unnumbered .unlisted}
246
+ ## foo {-}
247
+
248
+ This paragraph has \
249
+ br.
250
+
251
+ \noindent
252
+ don't indent this.
253
+
254
+ Blankline below.\
255
+ \
256
+ Blankline above.
257
+
258
+ <div class="note" caption="see **abc**">
259
+ **abc**
260
+
261
+ def
262
+ </div>
263
+
264
+ $$e=mc^2$$
265
+
266
+ <div id="mc2" caption="This $e$">
267
+ $$e=mc^2$$
268
+ </div>
269
+
270
+ :::{#mc2 caption="This $e$"}
271
+ $$e=mc^2$$
272
+ :::
273
+
274
+ :::{.texequation #mc2}
275
+ $$e=mc^2$$
276
+ :::
@@ -0,0 +1,154 @@
1
+ /*.pdf
2
+ /*.epub
3
+ /*.html
4
+ /webroot
5
+ /*-pdf
6
+ /*-epub
7
+ /*-text
8
+ /*-idgxml
9
+
10
+ /vendor
11
+ /.bundle
12
+
13
+ # Created by https://www.gitignore.io/api/vim,linux,macos,emacs,windows
14
+ # Edit at https://www.gitignore.io/?templates=vim,linux,macos,emacs,windows
15
+
16
+ ### Emacs ###
17
+ # -*- mode: gitignore; -*-
18
+ *~
19
+ \#*\#
20
+ /.emacs.desktop
21
+ /.emacs.desktop.lock
22
+ *.elc
23
+ auto-save-list
24
+ tramp
25
+ .\#*
26
+
27
+ # Org-mode
28
+ .org-id-locations
29
+ *_archive
30
+
31
+ # flymake-mode
32
+ *_flymake.*
33
+
34
+ # eshell files
35
+ /eshell/history
36
+ /eshell/lastdir
37
+
38
+ # elpa packages
39
+ /elpa/
40
+
41
+ # reftex files
42
+ *.rel
43
+
44
+ # AUCTeX auto folder
45
+ /auto/
46
+
47
+ # cask packages
48
+ .cask/
49
+ dist/
50
+
51
+ # Flycheck
52
+ flycheck_*.el
53
+
54
+ # server auth directory
55
+ /server/
56
+
57
+ # projectiles files
58
+ .projectile
59
+
60
+ # directory configuration
61
+ .dir-locals.el
62
+
63
+ # network security
64
+ /network-security.data
65
+
66
+
67
+ ### Linux ###
68
+
69
+ # temporary files which can be created if a process still has a handle open of a deleted file
70
+ .fuse_hidden*
71
+
72
+ # KDE directory preferences
73
+ .directory
74
+
75
+ # Linux trash folder which might appear on any partition or disk
76
+ .Trash-*
77
+
78
+ # .nfs files are created when an open file is removed but is still being accessed
79
+ .nfs*
80
+
81
+ ### macOS ###
82
+ # General
83
+ .DS_Store
84
+ .AppleDouble
85
+ .LSOverride
86
+
87
+ # Icon must end with two \r
88
+ Icon
89
+
90
+ # Thumbnails
91
+ ._*
92
+
93
+ # Files that might appear in the root of a volume
94
+ .DocumentRevisions-V100
95
+ .fseventsd
96
+ .Spotlight-V100
97
+ .TemporaryItems
98
+ .Trashes
99
+ .VolumeIcon.icns
100
+ .com.apple.timemachine.donotpresent
101
+
102
+ # Directories potentially created on remote AFP share
103
+ .AppleDB
104
+ .AppleDesktop
105
+ Network Trash Folder
106
+ Temporary Items
107
+ .apdisk
108
+
109
+ ### Vim ###
110
+ # Swap
111
+ [._]*.s[a-v][a-z]
112
+ [._]*.sw[a-p]
113
+ [._]s[a-rt-v][a-z]
114
+ [._]ss[a-gi-z]
115
+ [._]sw[a-p]
116
+
117
+ # Session
118
+ Session.vim
119
+ Sessionx.vim
120
+
121
+ # Temporary
122
+ .netrwhist
123
+ # Auto-generated tag files
124
+ tags
125
+ # Persistent undo
126
+ [._]*.un~
127
+
128
+ ### Windows ###
129
+ # Windows thumbnail cache files
130
+ Thumbs.db
131
+ Thumbs.db:encryptable
132
+ ehthumbs.db
133
+ ehthumbs_vista.db
134
+
135
+ # Dump file
136
+ *.stackdump
137
+
138
+ # Folder config file
139
+ [Dd]esktop.ini
140
+
141
+ # Recycle Bin used on file shares
142
+ $RECYCLE.BIN/
143
+
144
+ # Windows Installer files
145
+ *.cab
146
+ *.msi
147
+ *.msix
148
+ *.msm
149
+ *.msp
150
+
151
+ # Windows shortcuts
152
+ *.lnk
153
+
154
+ # End of https://www.gitignore.io/api/vim,linux,macos,emacs,windows