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,49 @@
1
+ \NeedsTeXFormat{LaTeX2e}
2
+ \ProvidesPackage{review-style}[2019/09/16]
3
+
4
+ \RequirePackage{fancyhdr}
5
+ \pagestyle{fancy}
6
+ \lhead{\gtfamily\sffamily\bfseries\upshape \leftmark}
7
+ \chead{}
8
+ \rhead{\gtfamily\sffamily\bfseries\upshape \rightmark}
9
+ \fancyfoot{} % clear all header and footer fields
10
+ \fancyfoot[LE,RO]{\thepage}
11
+ \renewcommand{\sectionmark}[1]{\markright{\thesection~#1}{}}
12
+ \renewcommand{\chaptermark}[1]{\markboth{\prechaptername\ \thechapter\ \postchaptername~#1}{}}
13
+ \renewcommand{\headfont}{\gtfamily\sffamily\bfseries}
14
+
15
+ \fancypagestyle{plainhead}{%
16
+ \fancyhead{}
17
+ \fancyfoot{} % clear all header and footer fields
18
+ \fancyfoot[LE,RO]{\thepage}
19
+ \renewcommand{\headrulewidth}{0pt}
20
+ \renewcommand{\footrulewidth}{0pt}}
21
+
22
+ %% using Helvetica as sans-serif
23
+ \renewcommand{\sfdefault}{phv}
24
+
25
+ %% for listings
26
+ %\renewcommand{\lstlistingname}{List}
27
+ %\lstset{%
28
+ % breaklines=true,%
29
+ % breakautoindent=false,%
30
+ % breakindent=0pt,%
31
+ % fontadjust=true,%
32
+ % backgroundcolor=\color{shadecolor},%
33
+ % frame=single,%
34
+ % framerule=0pt,%
35
+ % basicstyle=\ttfamily\scriptsize,%
36
+ % commentstyle=\color{reviewgreen},%
37
+ % identifierstyle=\color{reviewblue},%
38
+ % stringstyle=\color{reviewred},%
39
+ % keywordstyle=\bfseries\color{reviewdarkred},%
40
+ %}
41
+
42
+ %% disable hyperlink color and border
43
+ \hypersetup{hidelinks}
44
+
45
+ \floatplacement{figure}{H}
46
+ \floatplacement{table}{H}
47
+
48
+ % space between English/Japanese characters in list environments (\z@ means 0, no space. You can comment out below line for backward compatibility.)
49
+ \def\reviewlistxkanjiskip{\z@}
@@ -0,0 +1,15 @@
1
+ % Re:VIEW 2互換のlayout.tex.erb記載相当の内容
2
+ \RequirePackage{review-base}
3
+
4
+ % Re:VIEW 2互換のreviewmacro.sty(装飾カスタマイズ)内容
5
+ \RequirePackage{review-style}
6
+
7
+ % ユーザー固有の定義
8
+ \RequirePackage{review-custom}
9
+
10
+ %% run \@endofreviewmacrohook at the end of reviewmacro style
11
+ \@ifundefined{@endofreviewmacrohook}{}{%
12
+ \let\AtEndOfReVIEWMacro\@firstofone
13
+ \@endofreviewmacrohook}
14
+
15
+ \endinput
@@ -0,0 +1,494 @@
1
+ @charset "utf-8";
2
+ /* Tatujin-Publishing */
3
+ /* Style sheet for epub */
4
+ /* Ver.0.8b1 */
5
+
6
+ /*
7
+ Scale & Rhythm
8
+ line-height 1.6
9
+ 16px = 1em
10
+ x:p:h1:h2:h3 = 12px:14px:16px:24px:30px
11
+ */
12
+ * {
13
+ }
14
+ body {
15
+ margin: 0;
16
+ padding: 0;
17
+ font-size: 1em;
18
+ line-height:1.6;
19
+ font-family: "ShinGoPro-Regular","ShinGo-Regular", sans-serif;
20
+ /*
21
+ word-break: normal;
22
+ -webkit-line-break: after-white-space;
23
+ */
24
+ }
25
+ p, ul, ol, dl, pre, table {
26
+ font-family: "ShinGo Regular","ShinGo R","新ゴR","新ゴ R", sans-serif;
27
+ font-size: 0.875em;
28
+ }
29
+ /* Heading */
30
+ h1 {
31
+ margin: 0 0 3em;
32
+ padding: 0.5em 0 0;
33
+ border-top: 14px #326450 solid;
34
+ text-align: left;
35
+ font-size: 1.875em;
36
+ font-weight: bold;
37
+ }
38
+ h2 {
39
+ margin: 3em 0 0.5em;
40
+ padding: 0.5em 0 0;
41
+ border-top: 2px #326450 solid;
42
+ text-align: left;
43
+ font-size: 1.5em;
44
+ font-weight: bold;
45
+ }
46
+ h3 {
47
+ margin: 3em 0 0.5em;
48
+ padding: 0;
49
+ text-align: left;
50
+ font-size: 1em;
51
+ font-weight: bold;
52
+ }
53
+ h4, h5, h6 {
54
+ margin:0.7em 0;
55
+ padding: 0;
56
+ text-align: left;
57
+ line-height: 1.6;
58
+ font-weight: bold;
59
+ }
60
+ /* Paragraph */
61
+ p {
62
+ margin:0.7em 0;
63
+ padding: 0;
64
+ text-align: left;
65
+ text-indent: 1em;
66
+ line-height: 1.6;
67
+ }
68
+ div.lead p {
69
+ color: #666;
70
+ line-height: 1.6;
71
+ font-size: 0.75em;
72
+ }
73
+ /* List */
74
+ ul, ol {
75
+ margin: 2em 0 2em 2em;
76
+ padding: 0;
77
+ list-style-position: outside;
78
+ }
79
+ ul > li,
80
+ ol > li {
81
+ margin: 0 0 0.7em 0;
82
+ padding: 0;
83
+ line-height: 1.6;
84
+ }
85
+ dl {
86
+ margin: 2em 0;
87
+ padding: 0;
88
+ }
89
+ dt {
90
+ margin: 0;
91
+ padding: 0;
92
+ font-weight: bold;
93
+ }
94
+ dd {
95
+ margin: 0 0 1em 2em;
96
+ padding: 0;
97
+ line-height: 1.6;
98
+ }
99
+ /* Table
100
+ p.tablecaptionではなく
101
+ table caption {}を使う方が良いかも?
102
+ */
103
+ table {
104
+ margin: 0 auto 2em auto;
105
+ border-collapse: collapse;
106
+ }
107
+ table tr th {
108
+ background-color: #eee;
109
+ border:1px #aaa solid;
110
+ font-size: 0.75em;
111
+ font-weight: normal;
112
+ }
113
+ table tr td {
114
+ padding: 0.3em;
115
+ border:1px #aaa solid;
116
+ font-size: 0.75em;
117
+ }
118
+ p.tablecaption, table caption {
119
+ margin: 0;
120
+ color: #666;
121
+ font-size: 0.75em;
122
+ font-weight: bold;
123
+ text-indent: 0;
124
+ }
125
+ /* Quote */
126
+ blockquote {
127
+ margin: 2em 0 2em 2em;
128
+ padding: 0.3em 1em;
129
+ border: 1px #aaa solid;
130
+ }
131
+ /* Column Block */
132
+ div.column {
133
+ margin: 2em 0 2em 2em;
134
+ padding: 0.3em 1em;
135
+ background-color: #eee;
136
+ -webkit-border-radius: 0.7em;
137
+ }
138
+ div.column *{
139
+ margin:0.7em 0;
140
+ }
141
+ div.column ul,
142
+ div.column ol {
143
+ list-style-position: inside;
144
+ }
145
+ /* Code Block */
146
+ /*
147
+ ※シンプルにできるかも
148
+ div.code {}
149
+ div.code pre.list,
150
+ div.code pre.cmd {}
151
+ div.code p.caption {}
152
+ */
153
+ div.code, div.caption-code, div.source-code, div.emlist-code, div.emlistnum-code {
154
+ margin: 1em 0 2em 2em;
155
+ padding: 0;
156
+ }
157
+ pre.emlist, pre.source, pre.list {
158
+ margin: 0;
159
+ padding: 5px;
160
+ border: 1px #aaa solid;
161
+ }
162
+ div p.caption {
163
+ margin: 0;
164
+ color: #666;
165
+ font-size: 0.75em;
166
+ font-weight: bold;
167
+ }
168
+ div.cmd-code pre.cmd {
169
+ margin: 0;
170
+ padding: 5px;
171
+ color: #ccc;
172
+ font-weight: bold;
173
+ background-color: #444;
174
+ -webkit-border-radius: 0.5em;
175
+ }
176
+ pre.cmd, pre.emlist, pre.list, pre.source {
177
+ white-space: pre-wrap;
178
+ }
179
+
180
+ /* Image Block */
181
+ /* div.image p.caption {}
182
+ ※captionをそろえた方が良いかも?*/
183
+ div.image {
184
+ margin: 2em auto;
185
+ padding: 0;
186
+ }
187
+ div.image img {
188
+ margin: 0 auto;
189
+ padding: 0;
190
+ display: block;
191
+ }
192
+ div.image p.caption {
193
+ margin: 0 auto;
194
+ text-align: center;
195
+ color: #666;
196
+ font-size: 0.75em;
197
+ font-weight: bold;
198
+ text-indent: 0;
199
+ }
200
+ /* Footnote Block */
201
+ /* p.footnoteはいらないかも? */
202
+ div.footnote {
203
+ }
204
+ div.footnote p.footnote {
205
+ color: #666;
206
+ line-height: 1.6;
207
+ font-size: 0.75em;
208
+ text-indent: 0;
209
+ }
210
+ /* Colophon */
211
+ div.colophon {
212
+ margin: 3em auto;
213
+ }
214
+ div.colophon p {
215
+ text-indent: 0;
216
+ }
217
+ div.colophon p.title {
218
+ font-size: 1.5em;
219
+ }
220
+ div.colophon table {
221
+ margin: 1em 0 2em;
222
+ border: none;
223
+ }
224
+ div.colophon table tr th {
225
+ background-color: #fff;
226
+ font-size: 1.2em;
227
+ font-weight: normal;
228
+ border: none;
229
+ }
230
+ div.colophon table tr td {
231
+ font-size: 1.2em;
232
+ font-weight: normal;
233
+ border: none;
234
+ }
235
+
236
+ /* Inline */
237
+ a[href],
238
+ a:link,
239
+ a:visited {
240
+ border-bottom: 1px dotted #531084;
241
+ text-decoration: none;
242
+ }
243
+ b {
244
+ font-weight: bold;
245
+ }
246
+ strong{
247
+ font-weight: bold;
248
+ }
249
+ em {
250
+ font-style: italic;
251
+ }
252
+ span.balloon {
253
+ font-size: 0.9em;
254
+ }
255
+ span.balloon:before {
256
+ content: "←";
257
+ }
258
+
259
+ /**
260
+ * from Rouge
261
+ */
262
+ .highlight table td { padding: 5px; }
263
+ .highlight table pre { margin: 0; }
264
+ .highlight .cm {
265
+ color: #999988;
266
+ font-style: italic;
267
+ }
268
+ .highlight .cp {
269
+ color: #999999;
270
+ font-weight: bold;
271
+ }
272
+ .highlight .c1 {
273
+ color: #999988;
274
+ font-style: italic;
275
+ }
276
+ .highlight .cs {
277
+ color: #999999;
278
+ font-weight: bold;
279
+ font-style: italic;
280
+ }
281
+ .highlight .c, .highlight .cd {
282
+ color: #999988;
283
+ font-style: italic;
284
+ }
285
+ .highlight .err {
286
+ color: #a61717;
287
+ background-color: #e3d2d2;
288
+ }
289
+ .highlight .gd {
290
+ color: #000000;
291
+ background-color: #ffdddd;
292
+ }
293
+ .highlight .ge {
294
+ color: #000000;
295
+ font-style: italic;
296
+ }
297
+ .highlight .gr {
298
+ color: #aa0000;
299
+ }
300
+ .highlight .gh {
301
+ color: #999999;
302
+ }
303
+ .highlight .gi {
304
+ color: #000000;
305
+ background-color: #ddffdd;
306
+ }
307
+ .highlight .go {
308
+ color: #888888;
309
+ }
310
+ .highlight .gp {
311
+ color: #555555;
312
+ }
313
+ .highlight .gs {
314
+ font-weight: bold;
315
+ }
316
+ .highlight .gu {
317
+ color: #aaaaaa;
318
+ }
319
+ .highlight .gt {
320
+ color: #aa0000;
321
+ }
322
+ .highlight .kc {
323
+ color: #000000;
324
+ font-weight: bold;
325
+ }
326
+ .highlight .kd {
327
+ color: #000000;
328
+ font-weight: bold;
329
+ }
330
+ .highlight .kn {
331
+ color: #000000;
332
+ font-weight: bold;
333
+ }
334
+ .highlight .kp {
335
+ color: #000000;
336
+ font-weight: bold;
337
+ }
338
+ .highlight .kr {
339
+ color: #000000;
340
+ font-weight: bold;
341
+ }
342
+ .highlight .kt {
343
+ color: #445588;
344
+ font-weight: bold;
345
+ }
346
+ .highlight .k, .highlight .kv {
347
+ color: #000000;
348
+ font-weight: bold;
349
+ }
350
+ .highlight .mf {
351
+ color: #009999;
352
+ }
353
+ .highlight .mh {
354
+ color: #009999;
355
+ }
356
+ .highlight .il {
357
+ color: #009999;
358
+ }
359
+ .highlight .mi {
360
+ color: #009999;
361
+ }
362
+ .highlight .mo {
363
+ color: #009999;
364
+ }
365
+ .highlight .m, .highlight .mb, .highlight .mx {
366
+ color: #009999;
367
+ }
368
+ .highlight .sb {
369
+ color: #d14;
370
+ }
371
+ .highlight .sc {
372
+ color: #d14;
373
+ }
374
+ .highlight .sd {
375
+ color: #d14;
376
+ }
377
+ .highlight .s2 {
378
+ color: #d14;
379
+ }
380
+ .highlight .se {
381
+ color: #d14;
382
+ }
383
+ .highlight .sh {
384
+ color: #d14;
385
+ }
386
+ .highlight .si {
387
+ color: #d14;
388
+ }
389
+ .highlight .sx {
390
+ color: #d14;
391
+ }
392
+ .highlight .sr {
393
+ color: #009926;
394
+ }
395
+ .highlight .s1 {
396
+ color: #d14;
397
+ }
398
+ .highlight .ss {
399
+ color: #990073;
400
+ }
401
+ .highlight .s {
402
+ color: #d14;
403
+ }
404
+ .highlight .na {
405
+ color: #008080;
406
+ }
407
+ .highlight .bp {
408
+ color: #999999;
409
+ }
410
+ .highlight .nb {
411
+ color: #0086B3;
412
+ }
413
+ .highlight .nc {
414
+ color: #445588;
415
+ font-weight: bold;
416
+ }
417
+ .highlight .no {
418
+ color: #008080;
419
+ }
420
+ .highlight .nd {
421
+ color: #3c5d5d;
422
+ font-weight: bold;
423
+ }
424
+ .highlight .ni {
425
+ color: #800080;
426
+ }
427
+ .highlight .ne {
428
+ color: #990000;
429
+ font-weight: bold;
430
+ }
431
+ .highlight .nf {
432
+ color: #990000;
433
+ font-weight: bold;
434
+ }
435
+ .highlight .nl {
436
+ color: #990000;
437
+ font-weight: bold;
438
+ }
439
+ .highlight .nn {
440
+ color: #555555;
441
+ }
442
+ .highlight .nt {
443
+ color: #000080;
444
+ }
445
+ .highlight .vc {
446
+ color: #008080;
447
+ }
448
+ .highlight .vg {
449
+ color: #008080;
450
+ }
451
+ .highlight .vi {
452
+ color: #008080;
453
+ }
454
+ .highlight .nv {
455
+ color: #008080;
456
+ }
457
+ .highlight .ow {
458
+ color: #000000;
459
+ font-weight: bold;
460
+ }
461
+ .highlight .o {
462
+ color: #000000;
463
+ font-weight: bold;
464
+ }
465
+ .highlight .w {
466
+ color: #bbbbbb;
467
+ }
468
+ .highlight {
469
+ background-color: #f8f8f8;
470
+ }
471
+ .rouge-table { border-spacing: 0 }
472
+ .rouge-gutter { text-align: right }
473
+
474
+ /**
475
+ * from EBPAJ EPUB 3 File Creation Guide sample style
476
+ *
477
+ * cf. http://ebpaj.jp/counsel/guide
478
+ */
479
+
480
+ /* image width definition(pacentage) */
481
+ .width-010per { width: 10%; }
482
+ .width-020per { width: 20%; }
483
+ .width-025per { width: 25%; }
484
+ .width-030per { width: 30%; }
485
+ .width-033per { width: 33%; }
486
+ .width-040per { width: 40%; }
487
+ .width-050per { width: 50%; }
488
+ .width-060per { width: 60%; }
489
+ .width-067per { width: 67%; }
490
+ .width-070per { width: 70%; }
491
+ .width-075per { width: 75%; }
492
+ .width-080per { width: 80%; }
493
+ .width-090per { width: 90%; }
494
+ .width-100per { width: 100%; }