metanorma-standoc 1.1.5 → 1.1.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fa63066d27fa7a5628e8f79ea3bfeae64b380c18b3d9612a1cba84c6effb0a89
4
- data.tar.gz: 60881ce80c1914265eaab8b478a22512c058415ee7f491c14df3aae6bb5b047c
3
+ metadata.gz: 6807d9e3f4a2d83494b51c3e0ba76d84e994a85034eec07d4e4d2fea5d21d3c0
4
+ data.tar.gz: b668b765fe2a7e2fabac30ec68ed8aef3da144f2e0748ddc8cc94f58307510fc
5
5
  SHA512:
6
- metadata.gz: '0888338634c163d1736d76b1c3710554fcef64f653755110b632c4d6c074850f787cf788c106540f827774385a8848dff110bcde888f47440980259585f83fcc'
7
- data.tar.gz: bb9c4a5fb8534f4ecee4331c2657330cb4ac0670cb1b592b3c731b7eb5fcee44ed02d5339e82ae16a937ae03e2573f4242ab51a18b0918363e9cea3fe2057b58
6
+ metadata.gz: df993bce7e1e3030c0c8d0ba83197c777c6cb94d1ce66c17c2dc064eae49b8d1616d6e357da733f6276bbfb6702229ac92eee79315f9cd8c0c59d7695260b62c
7
+ data.tar.gz: e75ee46b9bccc422672cd681ef7512317453ee6d36cfcf76aa7e73091cc8731b103de29b87024c28e67b00d4c9bd1e9ab03e28bbc558bf5b53359f198f524aca
data/.tex ADDED
@@ -0,0 +1 @@
1
+ M = \begin{bmatrix} -\sin \lambda_0 & \cos \lambda_0 & 0 \\ -\sin \varphi_0 \cos \lambda_0 & -\sin \varphi_0 \sin \lambda_0 & \cos \varphi_0 \\ \cos \varphi_0 \cos \lambda_0 & \cos \varphi_0 \sin \lambda_0 & \sin \varphi_0 \end{bmatrix}
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- metanorma-standoc (1.1.5)
4
+ metanorma-standoc (1.1.6)
5
5
  asciidoctor (~> 1.5.7)
6
6
  concurrent-ruby
7
7
  html2doc (~> 0.8.0)
@@ -36,7 +36,7 @@ GEM
36
36
  ffi (1.9.25)
37
37
  formatador (0.2.5)
38
38
  gb-agencies (0.0.5)
39
- gbbib (0.4.3)
39
+ gbbib (0.4.4)
40
40
  cnccs (~> 0.1.1)
41
41
  gb-agencies (~> 0.0.1)
42
42
  iso-bib-item (~> 0.4.2)
@@ -71,18 +71,18 @@ GEM
71
71
  iso-bib-item (~> 0.4.2)
72
72
  ietfbib (0.4.5)
73
73
  iso-bib-item (~> 0.4.2)
74
- iev (0.2.1)
74
+ iev (0.2.2)
75
75
  nokogiri
76
76
  image_size (2.0.0)
77
77
  iso-bib-item (0.4.4)
78
78
  isoics (~> 0.1.6)
79
79
  nokogiri (~> 1.8.4)
80
80
  ruby_deep_clone (~> 0.8.0)
81
- isobib (0.4.3)
81
+ isobib (0.4.4)
82
82
  algoliasearch
83
83
  iecbib (~> 0.2.1)
84
84
  iso-bib-item (~> 0.4.2)
85
- isodoc (0.9.19)
85
+ isodoc (0.9.20)
86
86
  asciimath
87
87
  html2doc (~> 0.8.6)
88
88
  htmlentities (~> 4.3.4)
@@ -91,7 +91,6 @@ GEM
91
91
  nokogiri (>= 1)
92
92
  rake (~> 12.0)
93
93
  roman-numerals
94
- ruby-xslt
95
94
  sassc (~> 1.12.1)
96
95
  thread_safe
97
96
  uuidtools
@@ -103,13 +102,13 @@ GEM
103
102
  rb-inotify (~> 0.9, >= 0.9.7)
104
103
  ruby_dep (~> 1.2)
105
104
  lumberjack (1.0.13)
106
- metanorma (0.3.9)
105
+ metanorma (0.3.10)
107
106
  asciidoctor
108
107
  htmlentities
109
108
  method_source (0.9.2)
110
109
  mime-types (3.2.2)
111
110
  mime-types-data (~> 3.2015)
112
- mime-types-data (3.2018.0812)
111
+ mime-types-data (3.2019.0331)
113
112
  mini_portile2 (2.3.0)
114
113
  nenv (0.3.0)
115
114
  nokogiri (1.8.5)
@@ -118,7 +117,7 @@ GEM
118
117
  nenv (~> 0.1)
119
118
  shellany (~> 0.0)
120
119
  optout (0.0.2)
121
- parallel (1.14.0)
120
+ parallel (1.17.0)
122
121
  parser (2.6.2.0)
123
122
  ast (~> 2.4.0)
124
123
  powerpack (0.1.2)
@@ -131,7 +130,7 @@ GEM
131
130
  rb-fsevent (0.10.3)
132
131
  rb-inotify (0.10.0)
133
132
  ffi (~> 1.0)
134
- relaton (0.3.2)
133
+ relaton (0.3.3)
135
134
  algoliasearch
136
135
  gbbib (~> 0.4.0)
137
136
  iecbib (~> 0.2.0)
@@ -166,7 +165,7 @@ GEM
166
165
  ruby_deep_clone (0.8.0)
167
166
  ruby_dep (1.5.0)
168
167
  safe_yaml (1.0.5)
169
- sass (3.7.3)
168
+ sass (3.7.4)
170
169
  sass-listen (~> 4.0.0)
171
170
  sass-listen (4.0.0)
172
171
  rb-fsevent (~> 0.9, >= 0.9.4)
@@ -3,6 +3,7 @@
3
3
  image:https://img.shields.io/gem/v/metanorma-standoc.svg["Gem Version", link="https://rubygems.org/gems/metanorma-standoc"]
4
4
  image:https://img.shields.io/travis/metanorma/metanorma-standoc/master.svg["Build Status", link="https://travis-ci.org/metanorma/metanorma-standoc"]
5
5
  image:https://codeclimate.com/github/metanorma/metanorma-standoc/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-standoc"]
6
+ image:https://ci.appveyor.com/api/projects/status/qdadxv7rqfy33p66?svg=true["Appveyor Build Status", link="https://ci.appveyor.com/project/ribose/metanorma-standoc"]
6
7
 
7
8
  WARNING: This gem is still under development.
8
9
 
@@ -57,4 +58,3 @@ The metanorma-cli gem is the command-line interface for the Metanorma tool suite
57
58
 
58
59
  See http://metanorma.com[]
59
60
 
60
- bump
@@ -0,0 +1,34 @@
1
+ version: '{build}'
2
+
3
+ environment:
4
+ matrix:
5
+ - RUBY_VERSION: 25
6
+ - RUBY_VERSION: 24
7
+ - RUBY_VERSION: 23
8
+ - RUBY_VERSION: _trunk
9
+
10
+ matrix:
11
+ allow_failures:
12
+ - RUBY_VERSION: _trunk
13
+
14
+ install:
15
+ - ps: . { iwr -useb https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/appveyor.ps1 } | iex
16
+ - choco install latexml
17
+ - refreshenv
18
+ - set PATH=C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;%PATH%
19
+ - where latexmlmath
20
+ - chcp 65001
21
+
22
+ build_script:
23
+ - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
24
+ - bundle update
25
+ - bundle install
26
+
27
+ before_test:
28
+ - ruby -v
29
+ - gem -v
30
+ - bundle -v
31
+
32
+ test_script:
33
+ - bundle exec rake
34
+
@@ -47,6 +47,8 @@ module Asciidoctor
47
47
  scripts: node.attr("scripts"),
48
48
  scripts_pdf: node.attr("scripts-pdf"),
49
49
  datauriimage: node.attr("data-uri-image"),
50
+ htmltoclevels: node.attr("htmltoclevels") || node.attr("toclevels"),
51
+ doctoclevels: node.attr("doctoclevels") || node.attr("toclevels"),
50
52
  }
51
53
  end
52
54
 
@@ -69,6 +71,8 @@ module Asciidoctor
69
71
  wordintropage: node.attr("wordintropage"),
70
72
  ulstyle: node.attr("ulstyle"),
71
73
  olstyle: node.attr("olstyle"),
74
+ htmltoclevels: node.attr("htmltoclevels") || node.attr("toclevels"),
75
+ doctoclevels: node.attr("doctoclevels") || node.attr("toclevels"),
72
76
  }
73
77
  end
74
78
 
@@ -837,26 +837,29 @@
837
837
  <ref name="ContributorInfo"/>
838
838
  </element>
839
839
  </define>
840
+ <define name="DocRelationType">
841
+ <choice>
842
+ <value>obsoletes</value>
843
+ <value>updates</value>
844
+ <value>updatedBy</value>
845
+ <value>complements</value>
846
+ <value>derivedFrom</value>
847
+ <value>translatedFrom</value>
848
+ <value>adoptedFrom</value>
849
+ <value>equivalent</value>
850
+ <value>identical</value>
851
+ <value>nonequivalent</value>
852
+ <value>includedIn</value>
853
+ <value>includes</value>
854
+ <value>instance</value>
855
+ <value>partOf</value>
856
+ <value>hasDraft</value>
857
+ </choice>
858
+ </define>
840
859
  <define name="docrelation">
841
860
  <element name="relation">
842
861
  <attribute name="type">
843
- <choice>
844
- <value>obsoletes</value>
845
- <value>updates</value>
846
- <value>updatedBy</value>
847
- <value>complements</value>
848
- <value>derivedFrom</value>
849
- <value>translatedFrom</value>
850
- <value>adoptedFrom</value>
851
- <value>equivalent</value>
852
- <value>identical</value>
853
- <value>nonequivalent</value>
854
- <value>includedIn</value>
855
- <value>includes</value>
856
- <value>instance</value>
857
- <value>partOf</value>
858
- <value>hasDraft</value>
859
- </choice>
862
+ <ref name="DocRelationType"/>
860
863
  </attribute>
861
864
  <element name="bibitem">
862
865
  <ref name="BibliographicItem"/>
@@ -27,6 +27,7 @@ module Asciidoctor
27
27
  end
28
28
 
29
29
  def cleanup(xmldoc)
30
+ element_name_cleanup(xmldoc)
30
31
  termdef_cleanup(xmldoc)
31
32
  sections_cleanup(xmldoc)
32
33
  obligations_cleanup(xmldoc)
@@ -41,11 +42,11 @@ module Asciidoctor
41
42
  xref_cleanup(xmldoc)
42
43
  origin_cleanup(xmldoc)
43
44
  iev_cleanup(xmldoc)
45
+ element_name_cleanup(xmldoc) # cleanup IEV
44
46
  bpart_cleanup(xmldoc)
45
47
  quotesource_cleanup(xmldoc)
46
48
  para_cleanup(xmldoc)
47
49
  callout_cleanup(xmldoc)
48
- element_name_cleanup(xmldoc)
49
50
  footnote_cleanup(xmldoc)
50
51
  empty_element_cleanup(xmldoc)
51
52
  mathml_cleanup(xmldoc)
@@ -106,9 +106,12 @@ module Asciidoctor
106
106
  math = xml_encode(text)
107
107
  xml.stem math, **{ type: "MathML" }
108
108
  elsif style == :latexmath
109
- out = Unicode2LaTeX::unicode2latex(text).gsub(/'/, '\\').gsub(/\n/, " ")
110
- File.open(".tex", "w") { |file| file.write(out) }
111
- latex = `cat .tex | latexmlmath --preload=amsmath -- -`
109
+ latexmlmath_input = Unicode2LaTeX::unicode2latex(text).gsub(/'/, '\\').gsub(/\n/, " ")
110
+ latex = IO.popen('latexmlmath --preload=amsmath -- -', 'r+') do |io|
111
+ io.write(latexmlmath_input)
112
+ io.close_write
113
+ io.read
114
+ end
112
115
  xml.stem **{ type: "MathML" } do |s|
113
116
  s << latex.sub(/<\?[^>]+>/, "")
114
117
  end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Standoc
3
- VERSION = "1.1.5".freeze
3
+ VERSION = "1.1.6".freeze
4
4
  end
5
5
  end
@@ -387,6 +387,13 @@ RSpec.describe Asciidoctor::Standoc do
387
387
  :htmlcoverpage: spec/assets/htmlcover.html
388
388
  :htmlintropage: spec/assets/htmlintro.html
389
389
  :scripts: spec/assets/scripts.html
390
+ :htmltoclevels: 3
391
+
392
+ == Level 1
393
+
394
+ === Level 2
395
+
396
+ ==== Level 3
390
397
  INPUT
391
398
  html = File.read("test.html", encoding: "utf-8")
392
399
  expect(html).to match(%r[pre[^{]+\{[^{]+font-family: Andale Mono;]m)
@@ -412,6 +419,13 @@ RSpec.describe Asciidoctor::Standoc do
412
419
  :wordcoverpage: spec/assets/wordcover.html
413
420
  :wordintropage: spec/assets/wordintro.html
414
421
  :header: spec/assets/header.html
422
+ :doctoclevels: 3
423
+
424
+ == Level 1
425
+
426
+ === Level 2
427
+
428
+ ==== Level 3
415
429
  INPUT
416
430
  html = File.read("test.doc", encoding: "utf-8")
417
431
  expect(html).to match(%r[pre[^{]+\{[^{]+font-family: Andale Mono;]m)
@@ -419,6 +433,7 @@ RSpec.describe Asciidoctor::Standoc do
419
433
  expect(html).to match(%r[h1[^{]+\{[^{]+font-family: Comic Sans;]m)
420
434
  expect(html).to match(%r[an empty word cover page])
421
435
  expect(html).to match(%r[an empty word intro page])
436
+ expect(html).to include('\o "1-3"')
422
437
  expect(html).to include(%[Content-Location: file:///C:/Doc/test_files/header.html
423
438
  Content-Transfer-Encoding: base64
424
439
  Content-Type: text/html charset="utf-8"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-standoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-23 00:00:00.000000000 Z
11
+ date: 2019-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -335,6 +335,7 @@ files:
335
335
  - ".rubocop.ribose.yml"
336
336
  - ".rubocop.tb.yml"
337
337
  - ".rubocop.yml"
338
+ - ".tex"
338
339
  - ".travis.yml"
339
340
  - CODE_OF_CONDUCT.md
340
341
  - Gemfile
@@ -343,6 +344,7 @@ files:
343
344
  - Makefile
344
345
  - README.adoc
345
346
  - Rakefile
347
+ - appveyor.yml
346
348
  - bin/rspec
347
349
  - docs/customisation.adoc
348
350
  - docs/guidance.adoc