metanorma-nist 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6ae543de690dd020ac74e2280856256cd9829c4feaba03f5117ff06b94503e7
4
- data.tar.gz: 8fff504c3e2f1e67cd8e53ab575232e7a6ee163a69dabeb029adf75e1f94f444
3
+ metadata.gz: a4818565d5633ec9cea585e074bc8f7c9449672331ed2833ed63a70b49f7dfac
4
+ data.tar.gz: 6c2c0527b902d4864dd7363aa2fcb3bc0b539d360a91623428fd75ac7ac4c535
5
5
  SHA512:
6
- metadata.gz: db138f59cc24bf891c216268e4c2e606087cf6a1f8e121c5ebbfcf259ac21b131ad17120d11e1130517df9ca399fc6abd08c9debe6b985311d900827e532cd14
7
- data.tar.gz: 996c32e285216e20b908b0a5cb3075598e5e5857f102a84d84267202beec064ba745226c9133c41047977f7bae2c6b14c29717f5779134d5a32b73208d07d28d
6
+ metadata.gz: 2028d967bc1bb08d9aa1c4458136b5b29946b80f9b27e8a35b14caefd5e6c147cba1fc3e3c1484c15bd81d61b538fe95879d8259a46f7eacc60e6db5c43fbe43
7
+ data.tar.gz: a7d0fb358ba5113880f438d00d786f0c89a4995b56bd1e7242a31ecf3b6a7592d90c9c6453204ff76012fafe4f04a7c0f85cead8071f59c8650e0c3499e5c461
data/README.adoc CHANGED
@@ -1,11 +1,11 @@
1
1
  = metanorma-nist: Metanorma processor for the NIST SP 800 document classes
2
2
 
3
3
  image:https://img.shields.io/gem/v/metanorma-nist.svg["Gem Version", link="https://rubygems.org/gems/metanorma-nist"]
4
- image:https://img.shields.io/travis/metanorma/metanorma-nist/master.svg["Build Status", link="https://travis-ci.com/metanorma/metanorma-nist"]
5
- image:https://ci.appveyor.com/api/projects/status/c5e8e3qtn689a5h0?svg=true["Appveyor Build Status", link="https://ci.appveyor.com/project/ribose/metanorma-nist"]
4
+ image:https://travis-ci.com/metanorma/metanorma-nist.svg["Build Status", link="https://travis-ci.com/metanorma/metanorma-nist"]
5
+ image:https://ci.appveyor.com/api/projects/status/vflfr333319tofbi?svg=true["Appveyor Build Status", link="https://ci.appveyor.com/project/metanorma/metanorma-nist"]
6
6
  image:https://codeclimate.com/github/metanorma/metanorma-nist/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-nist"]
7
-
8
- WARNING: This gem is still under development.
7
+ image:https://img.shields.io/github/issues-pr-raw/metanorma/metanorma-nist.svg["Pull Requests", link="https://github.com/metanorma/metanorma-nist/pulls"]
8
+ image:https://img.shields.io/github/commits-since/metanorma/metanorma-nist/latest.svg["Commits since latest",link="https://github.com/metanorma/metanorma-nist/releases"]
9
9
 
10
10
  == Functionality
11
11
 
@@ -551,11 +551,12 @@ title "Glossary" or "Terminology" is treated as a Terms & Definitions section.
551
551
 
552
552
  === Pseudocode
553
553
 
554
- Pseudocode shall be marked up as an example, with role attribute `[.pseudocode]`:
554
+ Pseudocode shall be marked up as an example, with style attribute `[pseudocode]`
555
+ (implemented as a macro):
555
556
 
556
557
  [source,asciidoctor]
557
558
  ----
558
- [.pseudocode]
559
+ [pseudocode]
559
560
  ====
560
561
  _Input: S=(s1,...,sL)_
561
562
 
@@ -567,7 +568,20 @@ _Output:_ Shuffled _S=(s1,...,sL)_
567
568
  ====
568
569
  ----
569
570
 
570
- They will be rendered as figures, and included in the count of figures of the document.
571
+ Pseudocode will respect initial indentation in paragraph lines, with line breaks:
572
+
573
+ [source,asciidoctor]
574
+ ----
575
+ [pseudocode]
576
+ ====
577
+ *def* __increment__(x) +
578
+ x = x + 1 +
579
+ *enddef*
580
+ ====
581
+ ----
582
+
583
+ They will be rendered as figures, but are not included in the count of figures of the document.
584
+ (If they must be included, embed them within another figure.)
571
585
 
572
586
  === Recommendations, requirements, and permissions
573
587
 
@@ -341,11 +341,6 @@
341
341
  </oneOrMore>
342
342
  </element>
343
343
  </define>
344
- <define name="tclass">
345
- <element name="name">
346
- <text/>
347
- </element>
348
- </define>
349
344
  <define name="thead">
350
345
  <element name="thead">
351
346
  <ref name="tr"/>
@@ -515,19 +510,22 @@
515
510
  <attribute name="subsequence"/>
516
511
  </optional>
517
512
  <optional>
518
- <ref name="source"/>
513
+ <attribute name="class"/>
519
514
  </optional>
520
515
  <optional>
521
- <ref name="tname"/>
516
+ <ref name="source"/>
522
517
  </optional>
523
518
  <optional>
524
- <ref name="tclass"/>
519
+ <ref name="tname"/>
525
520
  </optional>
526
521
  <choice>
527
522
  <ref name="image"/>
528
523
  <ref name="video"/>
529
524
  <ref name="audio"/>
530
525
  <ref name="pre"/>
526
+ <oneOrMore>
527
+ <ref name="paragraph-with-footnote"/>
528
+ </oneOrMore>
531
529
  <zeroOrMore>
532
530
  <ref name="figure"/>
533
531
  </zeroOrMore>
@@ -15,22 +15,6 @@ module Asciidoctor
15
15
 
16
16
  register_for "nist"
17
17
 
18
- def example(node)
19
- role = node.role || node.attr("style")
20
- return pseudocode_example(node) if role == "pseudocode"
21
- super
22
- end
23
-
24
- def pseudocode_example(node)
25
- noko do |xml|
26
- xml.figure **{id: Asciidoctor::Standoc::Utils::anchor_or_uuid(node),
27
- type: "pseudocode"} do |ex|
28
- figure_title(node, ex)
29
- wrap_in_para(node, ex)
30
- end
31
- end.join("\n")
32
- end
33
-
34
18
  def table(node)
35
19
  role = node.role || node.attr("style")
36
20
  return errata(node) if role == "errata"
@@ -70,11 +70,6 @@ module IsoDoc
70
70
  docxml
71
71
  end
72
72
 
73
- def figure_parse(node, out)
74
- return pseudocode_parse(node, out) if node["type"] == "pseudocode"
75
- super
76
- end
77
-
78
73
  def dl_parse(node, out)
79
74
  return glossary_parse(node, out) if node["type"] == "glossary"
80
75
  super
@@ -290,18 +285,6 @@ module IsoDoc
290
285
  r.parent.add_child ::Iso690Render.render(bibitem, true)
291
286
  end
292
287
 
293
- def pseudocode_parse(node, out)
294
- @in_figure = true
295
- name = node.at(ns("./name"))
296
- out.div **attr_code(id: node["id"], class: "pseudocode") do |div|
297
- node.children.each do |n|
298
- parse(n, div) unless n.name == "name"
299
- end
300
- figure_name_parse(node, div, name)
301
- end
302
- @in_figure = false
303
- end
304
-
305
288
  def foreword(isoxml, out)
306
289
  f = isoxml.at(ns("//foreword")) || return
307
290
  out.div **attr_code(id: f["id"]) do |s|
@@ -241,6 +241,10 @@ p.Biblio, p.NormRef {
241
241
  @include sourceBlock(#f6f6f6);
242
242
  }
243
243
 
244
+ .pseudocode {
245
+ @include pseudocodeBlock(#f6f6f6);
246
+ }
247
+
244
248
  .Note {
245
249
  background-color: #ffca3a;
246
250
  color: #141115;
@@ -286,7 +290,7 @@ p.blockQuote {
286
290
  margin: 2em 0 1em 0;
287
291
  padding-left: 2em;
288
292
 
289
- .Sourcecode {
293
+ .Sourcecode, .pseudocode {
290
294
  background: none;
291
295
  }
292
296
 
@@ -313,7 +317,9 @@ p.blockQuote {
313
317
  }
314
318
  }
315
319
 
316
-
320
+ .example .Sourcecode, .example .pseudocode {
321
+ background: none;
322
+ }
317
323
 
318
324
  /* Tables */
319
325
 
@@ -385,7 +391,7 @@ span.keyword {
385
391
  margin-top: 1.2em;
386
392
  }
387
393
 
388
- .note, .figure, .Sourcecode, table {
394
+ .note, .figure, .Sourcecode, .pseudocode, table {
389
395
  page-break-inside: avoid;
390
396
  }
391
397
 
@@ -162,6 +162,22 @@ p.Sourcecode, li.Sourcecode, div.Sourcecode, pre.Sourcecode, pre
162
162
  mso-fareast-font-family:Calibri;
163
163
  mso-bidi-font-family:"Courier New";
164
164
  mso-ansi-language:EN-GB;}
165
+ p.pseudocode, li.pseudocode, div.pseudocode
166
+ {mso-style-unhide:no;
167
+ mso-style-qformat:yes;
168
+ mso-style-parent:"";
169
+ margin-top:6.0pt;
170
+ margin-right:0cm;
171
+ margin-bottom:6.0pt;
172
+ margin-left:0cm;
173
+ text-align:left;
174
+ mso-pagination:widow-orphan;
175
+ tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
176
+ font-size:10.0pt;
177
+ font-family:$bodyfont;
178
+ mso-fareast-font-family:Calibri;
179
+ mso-bidi-font-family:"Courier New";
180
+ mso-ansi-language:EN-GB;}
165
181
  p.Biblio, li.Biblio, div.Biblio, p.NormRef, li.NormRef, div.NormRef
166
182
  {mso-style-unhide:no;
167
183
  mso-style-qformat:yes;
@@ -887,6 +903,10 @@ div.example p.MsoListParagraph {
887
903
  font-size: 10.0pt;
888
904
  }
889
905
 
906
+ div.Note p.MsoListParagraph {
907
+ font-size: 10.0pt;
908
+ }
909
+
890
910
  span.note_label, span.example_label, td.example_label, td.note_label
891
911
  {
892
912
  font-size: 10.0pt;
@@ -128,6 +128,22 @@ p.CoverSubtitle, li.CoverSubtitle, div.CoverSubtitle
128
128
  mso-bidi-font-weight:normal;}
129
129
 
130
130
  p.Sourcecode, li.Sourcecode, div.Sourcecode, pre.Sourcecode, pre
131
+ {mso-style-unhide:no;
132
+ mso-style-qformat:yes;
133
+ mso-style-parent:"";
134
+ margin-top:0cm;
135
+ margin-right:0cm;
136
+ margin-bottom:12.0pt;
137
+ margin-left:0cm;
138
+ text-align:left;
139
+ mso-pagination:widow-orphan;
140
+ tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
141
+ font-size:10.0pt;
142
+ font-family:$monospacefont;
143
+ mso-fareast-font-family:Calibri;
144
+ mso-bidi-font-family:"Courier New";
145
+ mso-ansi-language:EN-GB;}
146
+ p.pseudocode, li.pseudocode, div.pseudocode
131
147
  {mso-style-unhide:no;
132
148
  mso-style-qformat:yes;
133
149
  mso-style-parent:"";
@@ -139,7 +155,7 @@ p.Sourcecode, li.Sourcecode, div.Sourcecode, pre.Sourcecode, pre
139
155
  mso-pagination:widow-orphan;
140
156
  tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
141
157
  font-size:10.0pt;
142
- font-family:$monospacefont;
158
+ font-family:$bodyfont;
143
159
  mso-fareast-font-family:Calibri;
144
160
  mso-bidi-font-family:"Courier New";
145
161
  mso-ansi-language:EN-GB;}
@@ -854,6 +870,10 @@ div.example p.MsoListParagraph {
854
870
  font-size: 10.0pt;
855
871
  }
856
872
 
873
+ div.Note p.MsoListParagraph {
874
+ font-size: 10.0pt;
875
+ }
876
+
857
877
  span.note_label, span.example_label, td.example_label, td.note_label
858
878
  {
859
879
  font-size: 10.0pt;
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module NIST
3
- VERSION = "0.2.6"
3
+ VERSION = "0.2.7"
4
4
  end
5
5
  end
@@ -24,7 +24,6 @@ Gem::Specification.new do |spec|
24
24
  spec.require_paths = ["lib"]
25
25
  spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
26
26
 
27
- spec.add_dependency "asciidoctor", "~> 1.5.7"
28
27
  spec.add_dependency "htmlentities", "~> 4.3.4"
29
28
  spec.add_dependency "ruby-jing"
30
29
  spec.add_dependency "twitter_cldr"
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-nist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-10-27 00:00:00.000000000 Z
11
+ date: 2019-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: asciidoctor
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: 1.5.7
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: 1.5.7
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: htmlentities
29
15
  requirement: !ruby/object:Gem::Requirement