metanorma-iso 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
2
2
 
3
3
  [TIP]
4
4
  ====
5
- * Clone the metanorma-sample gem: https://github.com/riboseinc/metanorma-sample.
5
+ * Clone the metanorma-sample gem: https://github.com/metanorma/metanorma-sample.
6
6
  * Edit the `html_sample_titlepage.html` and `html_sample_intro.html` pages to match your organisation's branding.
7
7
  ** Leave the Liquid Template instructions alone (`{{`, `{%`) unless you know what you're doing with them: they are how the pages are populated with metadata.
8
8
  * Edit the `default_fonts()` method in your `IsoDoc::...::HtmlConvert` class, to match your desired fonts.
@@ -4,7 +4,7 @@
4
4
  ====
5
5
  * There is no quick way of doing this.
6
6
  * Everything you can do in Word, you can do in Word HTML. Save Word documents as Word HTML to see how.
7
- * Clone the metanorma-sample gem: https://github.com/riboseinc/metanorma-sample.
7
+ * Clone the metanorma-sample gem: https://github.com/metanorma/metanorma-sample.
8
8
  * Edit the `word_sample_titlepage.html` and `word_sample_intro.html` pages to match your organisation's branding. With lots of iterations of saving Word documents as HTML, for trial and error.
9
9
  ** Leave the Liquid Template instructions alone (`{{`, `{%`) unless you know what you're doing with them: they are how the pages are populated with metadata.
10
10
  * Edit the `default_fonts()` method in your `IsoDoc::...::WordConvert` class, to match your desired fonts.
@@ -12,9 +12,9 @@
12
12
  * Edit the `wordstyle.scss` and `sample.scss` stylesheets to match your organisation's branding. With lots of iterations of saving Word documents as HTML, for trial and error.
13
13
  ====
14
14
 
15
- Word output in the document toolset is generated through Word HTML, the variant of HTML that you get when you save a Word document as HTML. (That is why documents are saved in `.doc`, not `.docx`.) This has the advantage over https://en.wikipedia.org/wiki/Office_Open_XML[OOXML], the native markup of DOCX, of using a well-known markup language, with a low barrier to entry: if you want to work out how to do something in Word HTML, do it in Word, save the document as HTML, and open up the HTML in a text editor. (For more on the choice of using Word HTML, see https://github.com/riboseinc/html2doc/wiki/Why-not-docx%3F.)
15
+ Word output in the document toolset is generated through Word HTML, the variant of HTML that you get when you save a Word document as HTML. (That is why documents are saved in `.doc`, not `.docx`.) This has the advantage over https://en.wikipedia.org/wiki/Office_Open_XML[OOXML], the native markup of DOCX, of using a well-known markup language, with a low barrier to entry: if you want to work out how to do something in Word HTML, do it in Word, save the document as HTML, and open up the HTML in a text editor. (For more on the choice of using Word HTML, see https://github.com/metanorma/html2doc/wiki/Why-not-docx%3F.)
16
16
 
17
- However Word HTML is not quite the HTML you are used to: it is a restricted, syntactically idiosyncratic variant of HTML 4, with a non-standard and weakened form of CSS. Doing any styling in Word HTML involves lots of trial and error, and paying close attention to how Word HTML does things in its CSS. We have documented a few of the clearer gotchas in https://github.com/riboseinc/html2doc/blob/master/README.adoc.
17
+ However Word HTML is not quite the HTML you are used to: it is a restricted, syntactically idiosyncratic variant of HTML 4, with a non-standard and weakened form of CSS. Doing any styling in Word HTML involves lots of trial and error, and paying close attention to how Word HTML does things in its CSS. We have documented a few of the clearer gotchas in https://github.com/metanorma/html2doc/blob/master/README.adoc.
18
18
 
19
19
  It's still better than learning OOXML.
20
20
 
@@ -156,9 +156,9 @@
156
156
  <zeroOrMore>
157
157
  <ref name="contact"/>
158
158
  </zeroOrMore>
159
- <optional>
159
+ <zeroOrMore>
160
160
  <ref name="uri"/>
161
- </optional>
161
+ </zeroOrMore>
162
162
  </element>
163
163
  </define>
164
164
  <define name="fullname">
@@ -246,9 +246,9 @@
246
246
  <optional>
247
247
  <ref name="abbreviation"/>
248
248
  </optional>
249
- <optional>
249
+ <zeroOrMore>
250
250
  <ref name="uri"/>
251
- </optional>
251
+ </zeroOrMore>
252
252
  <zeroOrMore>
253
253
  <ref name="org-identifier"/>
254
254
  </zeroOrMore>
@@ -469,12 +469,13 @@
469
469
  <value>film</value>
470
470
  <value>video</value>
471
471
  <value>broadcast</value>
472
- <value>graphic work</value>
472
+ <value>graphic_work</value>
473
473
  <value>music</value>
474
474
  <value>patent</value>
475
475
  <value>inbook</value>
476
476
  <value>incollection</value>
477
477
  <value>inproceedings</value>
478
+ <value>journal</value>
478
479
  </choice>
479
480
  </define>
480
481
  <define name="BibliographicItem">
@@ -739,39 +740,44 @@
739
740
  <element name="series">
740
741
  <optional>
741
742
  <attribute name="type">
742
- <choice>
743
- <value>main</value>
744
- <value>alt</value>
745
- </choice>
743
+ <ref name="SeriesType"/>
746
744
  </attribute>
747
745
  </optional>
748
746
  <choice>
749
- <ref name="btitle"/>
750
747
  <ref name="formattedref"/>
748
+ <group>
749
+ <ref name="btitle"/>
750
+ <optional>
751
+ <ref name="bplace"/>
752
+ </optional>
753
+ <optional>
754
+ <ref name="seriesorganization"/>
755
+ </optional>
756
+ <optional>
757
+ <ref name="abbreviation"/>
758
+ </optional>
759
+ <optional>
760
+ <ref name="seriesfrom"/>
761
+ </optional>
762
+ <optional>
763
+ <ref name="seriesto"/>
764
+ </optional>
765
+ <optional>
766
+ <ref name="seriesnumber"/>
767
+ </optional>
768
+ <optional>
769
+ <ref name="seriespartnumber"/>
770
+ </optional>
771
+ </group>
751
772
  </choice>
752
- <optional>
753
- <ref name="bplace"/>
754
- </optional>
755
- <optional>
756
- <ref name="seriesorganization"/>
757
- </optional>
758
- <optional>
759
- <ref name="abbreviation"/>
760
- </optional>
761
- <optional>
762
- <ref name="seriesfrom"/>
763
- </optional>
764
- <optional>
765
- <ref name="seriesto"/>
766
- </optional>
767
- <optional>
768
- <ref name="seriesnumber"/>
769
- </optional>
770
- <optional>
771
- <ref name="seriespartnumber"/>
772
- </optional>
773
773
  </element>
774
774
  </define>
775
+ <define name="SeriesType">
776
+ <choice>
777
+ <value>main</value>
778
+ <value>alt</value>
779
+ </choice>
780
+ </define>
775
781
  <define name="seriesorganization">
776
782
  <element name="organization">
777
783
  <text/>
@@ -849,6 +855,7 @@
849
855
  <value>includes</value>
850
856
  <value>instance</value>
851
857
  <value>partOf</value>
858
+ <value>hasDraft</value>
852
859
  </choice>
853
860
  </attribute>
854
861
  <element name="bibitem">
@@ -861,9 +868,6 @@
861
868
  </define>
862
869
  <define name="version">
863
870
  <element name="version">
864
- <optional>
865
- <ref name="vedition"/>
866
- </optional>
867
871
  <optional>
868
872
  <ref name="revision-date"/>
869
873
  </optional>
@@ -18,6 +18,7 @@
18
18
  of this.
19
19
  -->
20
20
  <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
21
+ <include href="reqt.rng"/>
21
22
  <include href="biblio.rng">
22
23
  <define name="status">
23
24
  <element name="status">
@@ -0,0 +1,157 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
+ <!--
4
+ Presupposes isodoc.rnc, is included in it
5
+ include "isodoc.rnc" { }
6
+ -->
7
+ <define name="requirement">
8
+ <element name="requirement">
9
+ <ref name="RequirementType"/>
10
+ </element>
11
+ </define>
12
+ <define name="recommendation">
13
+ <element name="recommendation">
14
+ <ref name="RequirementType"/>
15
+ </element>
16
+ </define>
17
+ <define name="permission">
18
+ <element name="permission">
19
+ <ref name="RequirementType"/>
20
+ </element>
21
+ </define>
22
+ <define name="RequirementType">
23
+ <optional>
24
+ <attribute name="obligation">
25
+ <ref name="ObligationType"/>
26
+ </attribute>
27
+ </optional>
28
+ <attribute name="id">
29
+ <data type="ID"/>
30
+ </attribute>
31
+ <optional>
32
+ <attribute name="filename"/>
33
+ </optional>
34
+ <optional>
35
+ <ref name="reqtitle"/>
36
+ </optional>
37
+ <optional>
38
+ <ref name="label"/>
39
+ </optional>
40
+ <optional>
41
+ <ref name="subject"/>
42
+ </optional>
43
+ <optional>
44
+ <ref name="reqinherit"/>
45
+ </optional>
46
+ <zeroOrMore>
47
+ <ref name="classification"/>
48
+ </zeroOrMore>
49
+ <zeroOrMore>
50
+ <choice>
51
+ <ref name="measurementtarget"/>
52
+ <ref name="specification"/>
53
+ <ref name="verification"/>
54
+ <ref name="import"/>
55
+ <ref name="description"/>
56
+ </choice>
57
+ </zeroOrMore>
58
+ <optional>
59
+ <ref name="reqt_references"/>
60
+ </optional>
61
+ <zeroOrMore>
62
+ <choice>
63
+ <ref name="requirement"/>
64
+ <ref name="recommendation"/>
65
+ <ref name="permission"/>
66
+ </choice>
67
+ </zeroOrMore>
68
+ </define>
69
+ <define name="reqtitle">
70
+ <element name="title">
71
+ <ref name="FormattedString"/>
72
+ </element>
73
+ </define>
74
+ <define name="label">
75
+ <element name="label">
76
+ <text/>
77
+ </element>
78
+ </define>
79
+ <define name="subject">
80
+ <element name="subject">
81
+ <text/>
82
+ </element>
83
+ </define>
84
+ <define name="reqinherit">
85
+ <element name="subject">
86
+ <text/>
87
+ </element>
88
+ </define>
89
+ <define name="measurementtarget">
90
+ <element name="measurement-target">
91
+ <ref name="RequirementSubpart"/>
92
+ </element>
93
+ </define>
94
+ <define name="specification">
95
+ <element name="specification">
96
+ <ref name="RequirementSubpart"/>
97
+ </element>
98
+ </define>
99
+ <define name="verification">
100
+ <element name="verification">
101
+ <ref name="RequirementSubpart"/>
102
+ </element>
103
+ </define>
104
+ <define name="import">
105
+ <element name="import">
106
+ <ref name="RequirementSubpart"/>
107
+ </element>
108
+ </define>
109
+ <define name="description">
110
+ <element name="description">
111
+ <ref name="RequirementSubpart"/>
112
+ </element>
113
+ </define>
114
+ <define name="reqt_references">
115
+ <element name="references">
116
+ <oneOrMore>
117
+ <ref name="bibitem"/>
118
+ </oneOrMore>
119
+ </element>
120
+ </define>
121
+ <define name="RequirementSubpart">
122
+ <optional>
123
+ <attribute name="type"/>
124
+ </optional>
125
+ <optional>
126
+ <attribute name="exclude">
127
+ <data type="boolean"/>
128
+ </attribute>
129
+ </optional>
130
+ <oneOrMore>
131
+ <ref name="BasicBlock"/>
132
+ </oneOrMore>
133
+ </define>
134
+ <define name="ObligationType">
135
+ <choice>
136
+ <value>requirement</value>
137
+ <value>recommendation</value>
138
+ <value>permission</value>
139
+ </choice>
140
+ </define>
141
+ <define name="classification">
142
+ <element name="classification">
143
+ <ref name="classification_tag"/>
144
+ <ref name="classification_value"/>
145
+ </element>
146
+ </define>
147
+ <define name="classification_tag">
148
+ <element name="tag">
149
+ <text/>
150
+ </element>
151
+ </define>
152
+ <define name="classification_value">
153
+ <element name="value">
154
+ <text/>
155
+ </element>
156
+ </define>
157
+ </grammar>
@@ -23,7 +23,7 @@ module Asciidoctor
23
23
  Regexp.new(REQUIREMENT_RE_STR.gsub(/\s/, "").gsub(/_/, "\\s"),
24
24
  Regexp::IGNORECASE)
25
25
 
26
- def requirement(text)
26
+ def requirement_check(text)
27
27
  text.split(/\.\s+/).each do |t|
28
28
  return t if REQUIREMENT_RE.match t
29
29
  end
@@ -41,7 +41,7 @@ module Asciidoctor
41
41
  Regexp.new(RECOMMENDATION_RE_STR.gsub(/\s/, "").gsub(/_/, "\\s"),
42
42
  Regexp::IGNORECASE)
43
43
 
44
- def recommendation(text)
44
+ def recommendation_check(text)
45
45
  text.split(/\.\s+/).each do |t|
46
46
  return t if RECOMMENDATION_RE.match t
47
47
  end
@@ -60,7 +60,7 @@ module Asciidoctor
60
60
  Regexp.new(PERMISSION_RE_STR.gsub(/\s/, "").gsub(/_/, "\\s"),
61
61
  Regexp::IGNORECASE)
62
62
 
63
- def permission(text)
63
+ def permission_check(text)
64
64
  text.split(/\.\s+/).each do |t|
65
65
  return t if PERMISSION_RE.match t
66
66
  end
@@ -93,11 +93,11 @@ module Asciidoctor
93
93
  end
94
94
 
95
95
  def style_no_guidance(node, text, docpart)
96
- r = requirement(text)
96
+ r = requirement_check(text)
97
97
  style_warning(node, "#{docpart} may contain requirement", r) if r
98
- r = permission(text)
98
+ r = permission_check(text)
99
99
  style_warning(node, "#{docpart} may contain permission", r) if r
100
- r = recommendation(text)
100
+ r = recommendation_check(text)
101
101
  style_warning(node, "#{docpart} may contain recommendation", r) if r
102
102
  end
103
103
  end
@@ -26,13 +26,13 @@ module Asciidoctor
26
26
 
27
27
  def introduction_style(node)
28
28
  return if @novalid
29
- r = requirement(extract_text(node))
29
+ r = requirement_check(extract_text(node))
30
30
  style_warning(node, "Introduction may contain requirement", r) if r
31
31
  end
32
32
 
33
33
  def definition_style(node)
34
34
  return if @novalid
35
- r = requirement(extract_text(node))
35
+ r = requirement_check(extract_text(node))
36
36
  style_warning(node, "Definition may contain requirement", r) if r
37
37
  end
38
38
 
@@ -18,9 +18,21 @@
18
18
  <p class="coverpage_techcommittee"><a
19
19
  name="CVP_Secretariat_Loca">Secretariat</a>: {{ secretariat }}</p>
20
20
 
21
- <div class="doctitle-en"><span class="title">{{ doctitleintro }}</span> <span class="subtitle">{{ doctitlemain }}</span> <span class="part">{{ doctitlepart }}</span></div>
21
+ <div class="doctitle-en"><div><span class="title">{{ doctitleintro }}{% if doctitleintro and doctitlemain %} &mdash; {% endif %}</span><span class="subtitle">{{ doctitlemain }}{% if doctitlemain and doctitlepart %} &mdash;{% endif %}</span>
22
+ {% if doctitlepart %}
23
+ </div><div>
24
+ {% if doctitlepartlabel %}<span class="partlabel">{{ doctitlepartlabel }}: </span>{% endif %}
25
+ <span class="part">{{ doctitlepart }}</span>
26
+ {% endif %}
27
+ </div></div>
22
28
 
23
- <div class="doctitle-fr"><span class="title">{{ docsubtitleintro }}</span> <span class="subtitle">{{ docsubtitlemain }}</span> <span class="part">{{ docsubtitlepart }}</span></div>
29
+ <div class="doctitle-fr"><div><span class="title">{{ docsubtitleintro }}{% if docsubtitleintro and docsubtitlemain %} &mdash; {% endif %}</span><span class="subtitle">{{ docsubtitlemain }}{% if docsubtitlemain and docsubtitlepart %} &mdash;{% endif %}</span>
30
+ {% if docsubtitlepart %}
31
+ </div><div>
32
+ {% if docsubtitlepartlabel %}<span class="partlabel">{{ docsubtitlepartlabel }}: </span>{% endif %}
33
+ <span class="part">{{ docsubtitlepart }}</span>
34
+ {% endif %}
35
+ </div></div>
24
36
 
25
37
  <div class="coverpage_docstage">
26
38
  {% if unpublished %}
@@ -526,7 +526,7 @@ table.MsoISOTable
526
526
  mso-para-margin-bottom:.0001pt;
527
527
  mso-pagination:widow-orphan;
528
528
  border-collapse:collapse;
529
- mso-table-layout-alt:fixed;
529
+ /*mso-table-layout-alt:fixed;*/
530
530
  border:solid windowtext 2pt;
531
531
  mso-border-alt:solid windowtext 2pt;
532
532
  mso-yfti-tbllook:480;
@@ -157,7 +157,7 @@ main {
157
157
  .doctitle-en {
158
158
  padding-left: 3em;
159
159
  margin-left: -3em;
160
- padding-top: 2em;
160
+ /*padding-top: 2em;*/
161
161
  padding-bottom: 2em;
162
162
 
163
163
  }
@@ -165,7 +165,6 @@ main {
165
165
  .doctitle-en span {
166
166
  font-size: 2em;
167
167
  line-height: 1.5em;
168
- display: block;
169
168
  }
170
169
 
171
170
 
@@ -173,14 +172,23 @@ main {
173
172
  font-size: 1.5em;
174
173
  line-height: 1.2em;
175
174
  font-style: italic;
176
- display: block;
177
175
  }
178
176
 
177
+ /*
179
178
  span.title {
180
179
  text-transform: uppercase;
181
180
  font-size: 1em;
182
181
  font-weight: 800;
183
182
  }
183
+ */
184
+
185
+ span.title, span.subtitle, span.part {
186
+ font-weight: 800;
187
+ }
188
+
189
+ span.partlabel {
190
+ display: block;
191
+ }
184
192
 
185
193
  .coverpage_docstage {
186
194
  margin-top: 2em;