metanorma-itu 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 +4 -4
- data/lib/asciidoctor/itu/basicdoc.rng +12 -1
- data/lib/asciidoctor/itu/biblio.rng +1 -0
- data/lib/asciidoctor/itu/converter.rb +73 -5
- data/lib/asciidoctor/itu/front.rb +4 -2
- data/lib/asciidoctor/itu/i18n-en.yaml +10 -0
- data/lib/asciidoctor/itu/isodoc.rng +5 -1
- data/lib/asciidoctor/itu/isostandard.rng +12 -0
- data/lib/asciidoctor/itu/itu.rng +25 -1
- data/lib/asciidoctor/itu/macros.rb +19 -0
- data/lib/isodoc/itu/base_convert.rb +62 -6
- data/lib/isodoc/itu/html/header.html +4 -4
- data/lib/isodoc/itu/html/itu.scss +235 -73
- data/lib/isodoc/itu/html/word_itu_intro.html +10 -0
- data/lib/isodoc/itu/html/wordstyle.scss +561 -159
- data/lib/isodoc/itu/word_convert.rb +26 -0
- data/lib/metanorma/itu/version.rb +1 -1
- metadata +3 -2
@@ -58,8 +58,14 @@ module IsoDoc
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
+
def word_term_cleanup(docxml)
|
62
|
+
docxml.xpath("//p[@class = 'TermNum']").each do |t|
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
61
66
|
def word_cleanup(docxml)
|
62
67
|
word_preface_cleanup(docxml)
|
68
|
+
word_term_cleanup(docxml)
|
63
69
|
super
|
64
70
|
docxml
|
65
71
|
end
|
@@ -77,6 +83,19 @@ module IsoDoc
|
|
77
83
|
keywords.parent = keywordsbox if keywords && keywordsbox
|
78
84
|
end
|
79
85
|
|
86
|
+
def formula_parse1(node, out)
|
87
|
+
out.div **attr_code(id: node["id"], class: "formula") do |div|
|
88
|
+
div.p **attr_code(class: "formula") do |p|
|
89
|
+
insert_tab(div, 2)
|
90
|
+
parse(node.at(ns("./stem")), div)
|
91
|
+
lbl = anchor(node['id'], :label, false)
|
92
|
+
unless lbl.nil?
|
93
|
+
insert_tab(div, 1)
|
94
|
+
div << "(#{lbl})"
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
80
99
|
|
81
100
|
def convert1(docxml, filename, dir)
|
82
101
|
FileUtils.cp html_doc_path('itu-document-comb.png'), File.join(@localdir, "itu-document-comb.png")
|
@@ -106,6 +125,13 @@ module IsoDoc
|
|
106
125
|
}
|
107
126
|
end
|
108
127
|
|
128
|
+
def word_example_cleanup(docxml)
|
129
|
+
super
|
130
|
+
docxml.xpath("//div[@class = 'pseudocode']//p[not(@class)]").each do |p|
|
131
|
+
p["class"] = "pseudocode"
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
109
135
|
include BaseConvert
|
110
136
|
end
|
111
137
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-itu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
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-
|
11
|
+
date: 2019-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|
@@ -266,6 +266,7 @@ files:
|
|
266
266
|
- lib/asciidoctor/itu/isodoc.rng
|
267
267
|
- lib/asciidoctor/itu/isostandard.rng
|
268
268
|
- lib/asciidoctor/itu/itu.rng
|
269
|
+
- lib/asciidoctor/itu/macros.rb
|
269
270
|
- lib/asciidoctor/itu/reqt.rng
|
270
271
|
- lib/asciidoctor/itu/validate.rb
|
271
272
|
- lib/isodoc/itu.rb
|