metanorma-jis 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +7 -0
  2. data/.hound.yml +5 -0
  3. data/.rubocop.yml +10 -0
  4. data/CODE_OF_CONDUCT.md +74 -0
  5. data/Gemfile +12 -0
  6. data/LICENSE +25 -0
  7. data/README.adoc +81 -0
  8. data/lib/html2doc/lists.rb +166 -0
  9. data/lib/isodoc/jis/base_convert.rb +41 -0
  10. data/lib/isodoc/jis/html/header.html +934 -0
  11. data/lib/isodoc/jis/html/html_jis_intro.html +8 -0
  12. data/lib/isodoc/jis/html/html_jis_titlepage.html +79 -0
  13. data/lib/isodoc/jis/html/htmlstyle.css +47 -0
  14. data/lib/isodoc/jis/html/htmlstyle.scss +45 -0
  15. data/lib/isodoc/jis/html/isodoc.css +12080 -0
  16. data/lib/isodoc/jis/html/isodoc.scss +11551 -0
  17. data/lib/isodoc/jis/html/style-human.css +1107 -0
  18. data/lib/isodoc/jis/html/style-human.scss +783 -0
  19. data/lib/isodoc/jis/html/style-iso.css +1133 -0
  20. data/lib/isodoc/jis/html/style-iso.scss +800 -0
  21. data/lib/isodoc/jis/html/word_jis_intro.html +14 -0
  22. data/lib/isodoc/jis/html/word_jis_titlepage.html +128 -0
  23. data/lib/isodoc/jis/html/wordstyle.css +3477 -0
  24. data/lib/isodoc/jis/html/wordstyle.scss +3378 -0
  25. data/lib/isodoc/jis/html_convert.rb +37 -0
  26. data/lib/isodoc/jis/i18n-ja.yaml +214 -0
  27. data/lib/isodoc/jis/i18n.rb +15 -0
  28. data/lib/isodoc/jis/init.rb +34 -0
  29. data/lib/isodoc/jis/metadata.rb +52 -0
  30. data/lib/isodoc/jis/pdf_convert.rb +17 -0
  31. data/lib/isodoc/jis/presentation_xml_convert.rb +11 -0
  32. data/lib/isodoc/jis/word_convert.rb +153 -0
  33. data/lib/isodoc/jis/xref.rb +6 -0
  34. data/lib/metanorma/jis/basicdoc.rng +1125 -0
  35. data/lib/metanorma/jis/biblio-standoc.rng +164 -0
  36. data/lib/metanorma/jis/biblio.rng +1461 -0
  37. data/lib/metanorma/jis/converter.rb +71 -0
  38. data/lib/metanorma/jis/front.rb +51 -0
  39. data/lib/metanorma/jis/isodoc.rng +2450 -0
  40. data/lib/metanorma/jis/isostandard.rng +316 -0
  41. data/lib/metanorma/jis/jis.rng +63 -0
  42. data/lib/metanorma/jis/processor.rb +53 -0
  43. data/lib/metanorma/jis/relaton-jis.rng +231 -0
  44. data/lib/metanorma/jis/reqt.rng +226 -0
  45. data/lib/metanorma/jis/version.rb +6 -0
  46. data/lib/metanorma/jis.rb +6 -0
  47. data/lib/metanorma-jis.rb +16 -0
  48. data/metanorma-jis.gemspec +49 -0
  49. metadata +303 -0
@@ -0,0 +1,783 @@
1
+ /*
2
+ 0 CSS RESET
3
+ */
4
+
5
+ /* http://meyerweb.com/eric/tools/css/reset/
6
+ v2.0 | 20110126
7
+ License: none (public domain)
8
+ */
9
+
10
+
11
+ @import 'base_style/all';
12
+
13
+ body {
14
+ @include bodyStyle1(null, 1.3, -internal-root-color, #ffffff, 300);
15
+
16
+ main {
17
+ margin: 0;
18
+ }
19
+ }
20
+
21
+ /* HTML5 display-role reset for older browsers */
22
+ article,
23
+ aside,
24
+ details,
25
+ figcaption,
26
+ figure,
27
+ footer,
28
+ header,
29
+ hgroup,
30
+ menu,
31
+ nav,
32
+ section {
33
+ display: block;
34
+ }
35
+
36
+ blockquote,
37
+ q {
38
+ quotes: none;
39
+ }
40
+
41
+ blockquote:before,
42
+ blockquote:after,
43
+ q:before,
44
+ q:after {
45
+ content: '';
46
+ content: none;
47
+ }
48
+
49
+ /* New CSS */
50
+
51
+ body {
52
+ margin-left: 298px;
53
+ margin-right: 2em;
54
+ }
55
+
56
+ main {
57
+ padding-left: 4em;
58
+ padding-right: 2em;
59
+ }
60
+
61
+ .title-section,
62
+ .prefatory-section {
63
+ padding-left: 4em;
64
+ padding-top: 2em;
65
+ }
66
+
67
+ .prefatory-section {
68
+ margin-bottom: 5em;
69
+ }
70
+
71
+ .doctitle-en,
72
+ .doctitle-fr {
73
+ margin-top: 2em;
74
+ text-align: left;
75
+ }
76
+
77
+ .doctitle-en {
78
+ background-color: black;
79
+ padding-left: 3em;
80
+ margin-left: -3em;
81
+ padding-top: 2em;
82
+ padding-bottom: 2em;
83
+
84
+ }
85
+
86
+ .doctitle-en span {
87
+ font-size: 1.5em;
88
+ line-height: 1.5em;
89
+ font-weight: 900;
90
+ display: block;
91
+ color: white;
92
+ }
93
+
94
+ .doctitle-fr span {
95
+ font-size: 1.2em;
96
+ line-height: 1.2em;
97
+ font-style: italic;
98
+ display: block;
99
+ }
100
+
101
+ .doctitle-part {
102
+ margin-top: 1em;
103
+ }
104
+
105
+ span.title {
106
+ text-transform: uppercase;
107
+ font-size: 1em;
108
+ font-weight: 800;
109
+ }
110
+
111
+ .coverpage_docstage {
112
+ margin-top: 2em;
113
+ margin-bottom: 2em;
114
+ }
115
+
116
+ .coverpage_warning {
117
+ font-size: 0.9em;
118
+ font-style: italic;
119
+ padding-bottom: 1em;
120
+ }
121
+
122
+ .coverpage_docnumber,
123
+ .coverpage_techcommittee {
124
+ text-align: right;
125
+ font-size: 0.9em;
126
+ line-height: 0.5em;
127
+ }
128
+
129
+ .boilerplate-copyright #boilerplate-name {
130
+ font-weight: 900;
131
+ padding-top: 1em;
132
+ }
133
+
134
+ .boilerplate-copyright p {
135
+ margin-top: 1em;
136
+ line-height: 1.1em;
137
+ display: block;
138
+ font-size: 0.9em;
139
+ }
140
+
141
+ /* TYPOGRAPHY */
142
+
143
+ h1, .h1 {
144
+ font-weight: 900;
145
+ }
146
+
147
+ h2,
148
+ h3,
149
+ h4,
150
+ h5,
151
+ h6,
152
+ .h2, .h3, .h4, .h5, .h6{
153
+ font-weight: 700;
154
+ }
155
+
156
+ h1, .h1 {
157
+ font-size: 1.5em;
158
+ line-height: 2em;
159
+ margin-top: 2em;
160
+ margin-bottom: 1em;
161
+ }
162
+
163
+ h2, .h2 {
164
+ font-size: 1.2em;
165
+ line-height: 1.5em;
166
+ margin-top: 2em;
167
+ margin-bottom: 1em;
168
+ }
169
+
170
+ h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
171
+ margin-bottom: 1em;
172
+ }
173
+
174
+ h1,
175
+ h2,
176
+ h3,
177
+ h4,
178
+ h5,
179
+ h6,
180
+ .h1, .h2, .h3, .h4, .h5, .h6 {
181
+ line-height: 1.2;
182
+ }
183
+
184
+ /* override for amendments */
185
+
186
+ {% if doctype == "Amendment" or doctype == "Technical Corrigendum" %}
187
+
188
+ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
189
+ font-weight: normal;
190
+ font-size: initial;
191
+ font-style: italic;
192
+ line-height: 2em;
193
+ margin-top: 2em;
194
+ margin-bottom: 1em;
195
+ }
196
+
197
+ {% endif %}
198
+
199
+ h2 p, .h2 p {
200
+ display: inline;
201
+ }
202
+
203
+ p {
204
+ margin-top: 1em;
205
+ margin-bottom: 1em;
206
+ line-height: 1.2em;
207
+ }
208
+
209
+ p.zzSTDTitle1 {
210
+ font-weight: 700;
211
+ font-size: 1.5em;
212
+ }
213
+
214
+ p.zzSTDTitle2 {
215
+ font-size: 1.5em;
216
+ }
217
+
218
+ span.obligation {
219
+ font-weight: 400;
220
+ }
221
+
222
+ a {
223
+ color: black;
224
+ text-decoration-color: black;
225
+ }
226
+
227
+ h2 p, .h2 p {
228
+ display: inline;
229
+ }
230
+
231
+ ul>li {
232
+ list-style: none;
233
+ }
234
+
235
+ ul>li>p:first-child:before {
236
+ content: "\2014";
237
+ display: inline-block;
238
+ width: 1em;
239
+ margin-left: -1.5em;
240
+ margin-right: 0.5em;
241
+ }
242
+
243
+ li p {
244
+ /* display: inline-block; */
245
+ margin-bottom: 0.6em;
246
+ line-height: 1.2;
247
+ }
248
+
249
+ #toc li:before {
250
+ content: " ";
251
+ display: none;
252
+ }
253
+
254
+ p.AltTerms {
255
+ margin-bottom: 0;
256
+ }
257
+
258
+ p.Terms {
259
+ margin-top: 0em;
260
+ }
261
+
262
+ /* Navigation*/
263
+
264
+ #toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
265
+ @include toc(null, #1d1d1d, white);
266
+ @include sidebarToc();
267
+
268
+ // .toc-active,
269
+ // li:hover {
270
+ // background: #1d1d1d;
271
+ // box-shadow: inset -5px 0px 10px -5px #1d1d1d !important;
272
+ // }
273
+
274
+ li:before {
275
+ content: " ";
276
+ display: none;
277
+ }
278
+ }
279
+
280
+ #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
281
+ margin-top: 0;
282
+ margin-bottom: 0;
283
+ font-size: 100%;
284
+ }
285
+
286
+ nav {
287
+ @include sidebarNav(#f7f7f7, 278px, 20px);
288
+ line-height: 1.2em;
289
+ }
290
+
291
+ #toggle {
292
+ @include sidebarNavToggle(white, black);
293
+ margin-left: -4em;
294
+ margin-top: -2em;
295
+ }
296
+
297
+ @media screen and (min-width: 768px) {
298
+ .container {
299
+ padding-left: 360px;
300
+ }
301
+
302
+ .rule.toc {
303
+ display: none;
304
+ }
305
+
306
+ h1.toc-contents {
307
+ margin-top: 1em;
308
+ }
309
+
310
+ ul#toc-list, ul#toc-list > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
311
+ padding: 0;
312
+ margin: 0;
313
+ }
314
+ }
315
+
316
+ @media screen and (max-width: 768px) {
317
+ body {
318
+ margin-left: 2em;
319
+ }
320
+
321
+ main {
322
+ padding: 0;
323
+ }
324
+
325
+ .title-section,
326
+ .prefatory-section {
327
+ padding-left: 0;
328
+ padding-top: 0;
329
+ width: 100%;
330
+ }
331
+ }
332
+
333
+ .figure,
334
+ pre,
335
+ .pseudocode {
336
+ @include pseudocodeBlock(#f7f7f7);
337
+ font-size: $normalfontsize;
338
+ }
339
+
340
+ div.figure {
341
+ @include figureBlock();
342
+ }
343
+
344
+ table div.figure {
345
+ padding: 0;
346
+ margin: 0;
347
+ }
348
+
349
+
350
+ /*
351
+ Document types + stages
352
+ */
353
+
354
+ .document-type-band {
355
+ @include docBand($order: 2, $offset: 180px);
356
+
357
+ .document-type {
358
+ top: 20px;
359
+ }
360
+ }
361
+
362
+ .document-stage-band {
363
+ @include docBand(1, 100%);
364
+ }
365
+
366
+ p.document-stage {
367
+ @include docBandTitle(210px);
368
+ writing-mode: vertical-rl;
369
+ }
370
+
371
+ #governance-band p.document-type {
372
+ font-weight: 400;
373
+ height: 230px !important;
374
+ }
375
+
376
+ p.document-stage {
377
+ font-weight: 300;
378
+ height: 160px;
379
+ }
380
+
381
+ #standard-band {
382
+ background-color: #0ac442;
383
+ }
384
+
385
+ #standard {
386
+ border-bottom: solid 3px #0ac442;
387
+ }
388
+
389
+ #governance {
390
+ border-bottom: solid 3px #750697;
391
+ }
392
+
393
+ #governance-band {
394
+ background-color: #750697;
395
+ }
396
+
397
+ #guide {
398
+ border-bottom: solid 3px #48a0e7;
399
+ }
400
+
401
+ #guide-band {
402
+ background-color: #48a0e7;
403
+ }
404
+
405
+ .coverpage-maturity {
406
+ font-family: 'Overpass', sans-serif;
407
+ font-weight: 400;
408
+ font-size: 1em;
409
+ margin: 0 0 2em 0;
410
+ text-transform: uppercase;
411
+ }
412
+
413
+ #working-draft {
414
+ border-bottom: solid 3px #fda706;
415
+ }
416
+
417
+ #working-draft-band {
418
+ background-color: #fda706;
419
+ }
420
+
421
+ #committee-draft {
422
+ border-bottom: solid 3px #fd06fd;
423
+ }
424
+
425
+ #committee-draft-band {
426
+ background-color: #fd06fd;
427
+ }
428
+
429
+ #draft-standard {
430
+ border-bottom: solid 3px #fdf906;
431
+ }
432
+
433
+ #draft-standard {
434
+ border-bottom: solid 3px #fdf906;
435
+ }
436
+
437
+ #standard {
438
+ border-bottom: solid 3px #0ac442;
439
+ }
440
+
441
+ #standard-band {
442
+ background-color: #0ac442;
443
+ }
444
+
445
+ #obsolete {
446
+ border-bottom: solid 3px #7e0d13;
447
+ }
448
+
449
+ #obsolete-band {
450
+ background-color: #7e0d13;
451
+ }
452
+
453
+
454
+ /* 3 Other styles */
455
+
456
+ /*
457
+ 3.2 Links
458
+ */
459
+ a {
460
+ color: black;
461
+ text-decoration-color: black;
462
+ }
463
+
464
+ /*
465
+ 3.3 Lists
466
+ */
467
+
468
+ ul,
469
+ ol {
470
+ margin-left: 2em;
471
+ }
472
+
473
+ #toc-list ul {
474
+ margin-bottom: 0.25em;
475
+ }
476
+
477
+ #toc-list ol li {
478
+ list-style-type: none;
479
+ }
480
+
481
+ /*
482
+ 3.4 Rules
483
+ */
484
+
485
+ .rule {
486
+ @include rule(1px, #0e1a85)
487
+ }
488
+
489
+ /*
490
+ 3.5 Bibliograhy
491
+ */
492
+
493
+ p.Biblio,
494
+ p.NormRef {
495
+ margin-top: 1em;
496
+ margin-left: 2em;
497
+ }
498
+
499
+ /*
500
+ 3.6 Source Code + figures
501
+ */
502
+
503
+ .figure,
504
+ pre,
505
+ .pseudocode {
506
+ @include pseudocodeBlock(#f7f7f7);
507
+ font-size: $normalfontsize;
508
+ }
509
+
510
+ pre {
511
+ @include monospaceBlockStyle()
512
+ }
513
+
514
+ @include admonitionBlock();
515
+ @include recommendationBlock();
516
+ @include listBlock();
517
+
518
+ .figure-title,
519
+ .FigureTitle,
520
+ .SourceTitle,
521
+ .AdmonitionTitle,
522
+ .RecommendationTitle {
523
+ @include blockTitle()
524
+ }
525
+
526
+ .figure dl {
527
+ }
528
+
529
+ /*
530
+ 3.7 Notes
531
+ */
532
+
533
+ .Note,
534
+ .note {
535
+ background-color: #fff495;
536
+ color: #47430c;
537
+ padding: 0.5em;
538
+ margin: 1.5em 0 1.5em 0;
539
+ text-align: left;
540
+ }
541
+
542
+ .Note p,
543
+ .note p {
544
+ margin: 0;
545
+ }
546
+
547
+ .Admonition {
548
+ background-color: #ffcccc;
549
+ color: #47430c;
550
+ padding: 0.5em;
551
+ margin: 1.5em 0 1.5em 0;
552
+ text-align: left;
553
+ }
554
+
555
+ .Admonition p {
556
+ margin: 0;
557
+ }
558
+
559
+
560
+ /*
561
+ 3.8 Examples
562
+ */
563
+
564
+ .example {
565
+ @include exampleBlock(#e1eef1, black, 0.5em);
566
+ color: black;
567
+
568
+ padding-left: 2em;
569
+
570
+ .example-title {
571
+ margin-left: -1.5em;
572
+ }
573
+
574
+ pre,
575
+ .pseudocode {
576
+ background: none;
577
+ }
578
+ }
579
+
580
+ /*
581
+ 3.9 Tables
582
+ */
583
+
584
+ table {
585
+ @include table(1px solid black);
586
+ }
587
+
588
+ td > p:first-child, th > p:first-child {
589
+ margin-top: 0em;
590
+ }
591
+ td > p:last-child, th > p:last-child {
592
+ margin-bottom: 0em;
593
+ }
594
+
595
+ td,
596
+ th {
597
+ padding: 1em !important;
598
+ }
599
+
600
+ table.rouge-line-table td, table.rouge-line-table th {
601
+ padding: 0em !important;
602
+ }
603
+
604
+ p.TableTitle {
605
+ text-align: center;
606
+ margin-top: 2.5em;
607
+ font-weight: 800;
608
+ font-size: 1.1em;
609
+ }
610
+
611
+ .TableFootnote {
612
+ text-align: left !important;
613
+ }
614
+
615
+ /*
616
+ table.modspec {
617
+ @include table($border: none !important);
618
+ text-align: left;
619
+
620
+ color: #010d16;
621
+
622
+ tr:nth-child(even) {
623
+ background: #ffffff
624
+ }
625
+ tr:nth-child(odd) {
626
+ background: #ffffff
627
+ }
628
+
629
+ thead tr th {
630
+ background-color: #5d99d6;
631
+ }
632
+
633
+ td, th {
634
+ padding: 1em;
635
+ }
636
+
637
+ td.header {
638
+ font-weight: 400;
639
+ }
640
+ }
641
+ */
642
+
643
+ /*
644
+ 3.10 Footnotes
645
+ */
646
+
647
+ a.footnote-number,
648
+ a.TableFootnoteRef,
649
+ span.TableFootnoteRef {
650
+ vertical-align: super;
651
+ font-size: 0.8em;
652
+ }
653
+
654
+ .footnote {
655
+ font-size: $footnotefontsize;
656
+ }
657
+
658
+ sup a {
659
+ vertical-align: super;
660
+ font-size: 0.8em;
661
+ }
662
+
663
+ #footnote_box {
664
+ font-size: $footnotefontsize;
665
+ background: white;
666
+ padding: 0 10px;
667
+ margin: 10px;
668
+ border: 1px solid #888;
669
+ -moz-box-shadow: 0px 0px 5px #888;
670
+ -webkit-box-shadow: 0px 0px 5px #888;
671
+ box-shadow: 0px 0px 5px #888;
672
+ }
673
+
674
+ ol.footnotes-list,
675
+ aside.footnote {
676
+ margin-left: 1em;
677
+
678
+ }
679
+
680
+ ol.footnotes-list li,
681
+ aside.footnote {
682
+ font-size: $footnotefontsize;
683
+ vertical-align: top;
684
+ list-style: decimal;
685
+ margin-bottom: 1em;
686
+ }
687
+
688
+ ol.footnotes-list:first-child {
689
+ margin-top: 2em;
690
+ }
691
+
692
+ ol.footnotes-list p,
693
+ aside.footnote {
694
+ display: inline;
695
+ }
696
+
697
+ ol>li>p:before {
698
+ content: "";
699
+ display: none;
700
+ }
701
+
702
+
703
+ /*
704
+ 3.11 Blockquotes
705
+ */
706
+
707
+ .Quote {
708
+ @include blockquoteBlock(#f7f7f7);
709
+ }
710
+
711
+ /*
712
+ 3.12 Formulas
713
+ */
714
+
715
+ .formula {
716
+ @include formulaBlock(#f7f7f7);
717
+ margin-left: 20%;
718
+ margin-right: 20%;
719
+ font-size: $smallerfontsize;
720
+ }
721
+
722
+ dl.formula_dl {
723
+ background-color: #f7f7f7;
724
+ margin-left: 20%;
725
+ margin-right: 20%;
726
+ font-size: $smallerfontsize;
727
+ }
728
+
729
+ /*
730
+ Keywords
731
+ */
732
+
733
+ span.keyword {
734
+ font-weight: 600;
735
+ }
736
+
737
+ .Admonition,
738
+ .admonition {
739
+ background-color: #ffb3b3;
740
+ /* color: #47430c;*/
741
+ padding: 0.5em;
742
+ margin: 1.5em 0 1.5em 0;
743
+ text-align: left;
744
+ }
745
+
746
+ .Admonition p,
747
+ .admonition p,
748
+ .zzHelp p {
749
+ margin: 0;
750
+ }
751
+
752
+ div.zzHelp {
753
+ color: green;
754
+ padding: 0.5em;
755
+ margin: 1.5em 0 1.5em 0;
756
+ text-align: left;
757
+ }
758
+
759
+ /* Collapse TOC */
760
+
761
+ .collapse-group {
762
+ display: flex;
763
+ align-items: center;
764
+ position: relative;
765
+ }
766
+
767
+ .collapse-button {
768
+ position: absolute;
769
+ right: 0;
770
+ display: inline-block;
771
+ height: 20px;
772
+ width: 20px;
773
+ cursor: pointer;
774
+ background-image: url('data:image/svg+xml,<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="rgba(0,0,0,.54)" d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"></path></svg>');
775
+ }
776
+
777
+ .collapse {
778
+ display: none;
779
+ }
780
+
781
+ .expand {
782
+ transform: rotateZ(-180deg);
783
+ }