metanorma-un 0.3.4 → 0.3.9

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.
@@ -1,24 +1,8 @@
1
1
  <script>
2
- //TOC generation
3
- $('#toc').toc({
4
- 'selectors': toclevel(), //elements to use as headings
5
- 'container': 'main', //element to find all selectors in
6
- 'smoothScrolling': true, //enable or disable smooth scrolling on click
7
- 'prefix': 'toc', //prefix for anchor tags and class names
8
- 'onHighlight': function(el) {}, //called when a new section is highlighted
9
- 'highlightOnScroll': true, //add class to heading that is currently in focus
10
- 'highlightOffset': 100, //offset to trigger the next headline
11
- 'anchorName': function(i, heading, prefix) { //custom function for anchor name
12
- return prefix+i;
13
- },
14
- 'headerText': function(i, heading, $heading) { //custom function building the header-item text
15
- return $heading.text();
16
- },
17
- 'itemClass': function(i, heading, $heading, prefix) { // custom function for item class
18
- return $heading[0].tagName.toLowerCase();
19
- }
20
- });
21
-
2
+ $("#toc").on('click', 'li', function(e) {
3
+ $(this).parent().find('li.toc-active').removeClass('toc-active');
4
+ $(this).addClass('toc-active');
5
+ });
22
6
  </script>
23
7
 
24
8
  <script>
@@ -58,13 +42,16 @@ $('#toggle').on('click', function(){
58
42
  </script>
59
43
 
60
44
  <script>
61
- /**
62
- * AnchorJS - v4.1.0 - 2017-09-20
63
- * https://github.com/bryanbraun/anchorjs
64
- * Copyright (c) 2017 Bryan Braun; Licensed MIT
65
- */
66
- !function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(this,function(){"use strict";return function(A){function e(A){A.icon=A.hasOwnProperty("icon")?A.icon:"",A.visible=A.hasOwnProperty("visible")?A.visible:"hover",A.placement=A.hasOwnProperty("placement")?A.placement:"right",A.ariaLabel=A.hasOwnProperty("ariaLabel")?A.ariaLabel:"Anchor",A.class=A.hasOwnProperty("class")?A.class:"",A.truncate=A.hasOwnProperty("truncate")?Math.floor(A.truncate):64}function t(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new Error("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}function i(){if(null===document.head.querySelector("style.anchorjs")){var A,e=document.createElement("style");e.className="anchorjs",e.appendChild(document.createTextNode("")),void 0===(A=document.head.querySelector('[rel="stylesheet"], style'))?document.head.appendChild(e):document.head.insertBefore(e,A),e.sheet.insertRule(" .anchorjs-link { opacity: 0; text-decoration: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }",e.sheet.cssRules.length),e.sheet.insertRule(" *:hover > .anchorjs-link, .anchorjs-link:focus { opacity: 1; }",e.sheet.cssRules.length),e.sheet.insertRule(" [data-anchorjs-icon]::after { content: attr(data-anchorjs-icon); }",e.sheet.cssRules.length),e.sheet.insertRule(' @font-face { font-family: "anchorjs-icons"; src: url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype"); }',e.sheet.cssRules.length)}}this.options=A||{},this.elements=[],e(this.options),this.isTouchDevice=function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)},this.add=function(A){var n,o,s,a,r,c,h,l,u,d,f,p=[];if(e(this.options),"touch"===(f=this.options.visible)&&(f=this.isTouchDevice()?"always":"hover"),A||(A="h2, h3, h4, h5, h6"),0===(n=t(A)).length)return this;for(i(),o=document.querySelectorAll("[id]"),s=[].map.call(o,function(A){return A.id}),r=0;r<n.length;r++)if(this.hasAnchorJSLink(n[r]))p.push(r);else{if(n[r].hasAttribute("id"))a=n[r].getAttribute("id");else if(n[r].hasAttribute("data-anchor-id"))a=n[r].getAttribute("data-anchor-id");else{u=l=this.urlify(n[r].textContent),h=0;do{void 0!==c&&(u=l+"-"+h),c=s.indexOf(u),h+=1}while(-1!==c);c=void 0,s.push(u),n[r].setAttribute("id",u),a=u}a.replace(/-/g," "),(d=document.createElement("a")).className="anchorjs-link "+this.options.class,d.href="#"+a,d.setAttribute("aria-label",this.options.ariaLabel),d.setAttribute("data-anchorjs-icon",this.options.icon),"always"===f&&(d.style.opacity="1"),""===this.options.icon&&(d.style.font="1em/1 anchorjs-icons","left"===this.options.placement&&(d.style.lineHeight="inherit")),"left"===this.options.placement?(d.style.position="absolute",d.style.marginLeft="-1em",d.style.paddingRight="0.5em",n[r].insertBefore(d,n[r].firstChild)):(d.style.paddingLeft="0.375em",n[r].appendChild(d))}for(r=0;r<p.length;r++)n.splice(p[r]-r,1);return this.elements=this.elements.concat(n),this},this.remove=function(A){for(var e,i,n=t(A),o=0;o<n.length;o++)(i=n[o].querySelector(".anchorjs-link"))&&(-1!==(e=this.elements.indexOf(n[o]))&&this.elements.splice(e,1),n[o].removeChild(i));return this},this.removeAll=function(){this.remove(this.elements)},this.urlify=function(A){var t=/[& +$,:;=?@"#{}|^~[`%!'<>\]\.\/\(\)\*\\]/g;return this.options.truncate||e(this.options),A.trim().replace(/\'/gi,"").replace(t,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&(" "+A.firstChild.className+" ").indexOf(" anchorjs-link ")>-1,t=A.lastChild&&(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ")>-1;return e||t||!1}}}); </script>
67
-
45
+ // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
46
+ //
47
+ // AnchorJS - v4.2.2 - 2020-04-20
48
+ // https://www.bryanbraun.com/anchorjs/
49
+ // Copyright (c) 2020 Bryan Braun; Licensed MIT
50
+ //
51
+ // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
52
+ !function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(this,function(){"use strict";return function(A){function f(A){A.icon=A.hasOwnProperty("icon")?A.icon:"",A.visible=A.hasOwnProperty("visible")?A.visible:"hover",A.placement=A.hasOwnProperty("placement")?A.placement:"right",A.ariaLabel=A.hasOwnProperty("ariaLabel")?A.ariaLabel:"Anchor",A.class=A.hasOwnProperty("class")?A.class:"",A.base=A.hasOwnProperty("base")?A.base:"",A.truncate=A.hasOwnProperty("truncate")?Math.floor(A.truncate):64,A.titleText=A.hasOwnProperty("titleText")?A.titleText:""}function p(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new Error("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],f(this.options),this.isTouchDevice=function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)},this.add=function(A){var e,t,i,n,o,s,a,r,c,h,l,u,d=[];if(f(this.options),"touch"===(l=this.options.visible)&&(l=this.isTouchDevice()?"always":"hover"),0===(e=p(A=A||"h2, h3, h4, h5, h6")).length)return this;for(!function(){if(null!==document.head.querySelector("style.anchorjs"))return;var A,e=document.createElement("style");e.className="anchorjs",e.appendChild(document.createTextNode("")),void 0===(A=document.head.querySelector('[rel="stylesheet"],style'))?document.head.appendChild(e):document.head.insertBefore(e,A);e.sheet.insertRule(".anchorjs-link{opacity:0;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}",e.sheet.cssRules.length),e.sheet.insertRule(":hover>.anchorjs-link,.anchorjs-link:focus{opacity:1}",e.sheet.cssRules.length),e.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",e.sheet.cssRules.length),e.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',e.sheet.cssRules.length)}(),t=document.querySelectorAll("[id]"),i=[].map.call(t,function(A){return A.id}),o=0;o<e.length;o++)if(this.hasAnchorJSLink(e[o]))d.push(o);else{if(e[o].hasAttribute("id"))n=e[o].getAttribute("id");else if(e[o].hasAttribute("data-anchor-id"))n=e[o].getAttribute("data-anchor-id");else{for(c=r=this.urlify(e[o].textContent),a=0;void 0!==s&&(c=r+"-"+a),a+=1,-1!==(s=i.indexOf(c)););s=void 0,i.push(c),e[o].setAttribute("id",c),n=c}(h=document.createElement("a")).className="anchorjs-link "+this.options.class,h.setAttribute("aria-label",this.options.ariaLabel),h.setAttribute("data-anchorjs-icon",this.options.icon),this.options.titleText&&(h.title=this.options.titleText),u=document.querySelector("base")?window.location.pathname+window.location.search:"",u=this.options.base||u,h.href=u+"#"+n,"always"===l&&(h.style.opacity="1"),""===this.options.icon&&(h.style.font="1em/1 anchorjs-icons","left"===this.options.placement&&(h.style.lineHeight="inherit")),"left"===this.options.placement?(h.style.position="absolute",h.style.marginLeft="-1em",h.style.paddingRight="0.5em",e[o].insertBefore(h,e[o].firstChild)):(h.style.paddingLeft="0.375em",e[o].appendChild(h))}for(o=0;o<d.length;o++)e.splice(d[o]-o,1);return this.elements=this.elements.concat(e),this},this.remove=function(A){for(var e,t,i=p(A),n=0;n<i.length;n++)(t=i[n].querySelector(".anchorjs-link"))&&(-1!==(e=this.elements.indexOf(i[n]))&&this.elements.splice(e,1),i[n].removeChild(t));return this},this.removeAll=function(){this.remove(this.elements)},this.urlify=function(A){return this.options.truncate||f(this.options),A.trim().replace(/\'/gi,"").replace(/[& +$,:;=?@"#{}|^~[`%!'<>\]\.\/\(\)\*\\\n\t\b\v]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),t=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||t||!1}}});
53
+ // @license-end
54
+ </script>
68
55
  <script>
69
56
  /*
70
57
  $('document').ready(function() {
@@ -1,125 +1,127 @@
1
1
  <div style='mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;
2
2
  mso-border-bottom-alt:solid windowtext .5pt;padding:0cm 0cm 1.0pt 0cm'>
3
3
 
4
- <p class=MsoNormal style='tab-stops:70.9pt right 14.0cm;border:none;mso-border-bottom-alt:
4
+ <!-- This is a plenary page -->
5
+
6
+ <p class="MsoNormal" style='tab-stops:70.9pt right 14.0cm;border:none;mso-border-bottom-alt:
5
7
  solid windowtext .5pt;padding:0cm;mso-padding-alt:0cm 0cm 1.0pt 0cm'><span
6
- lang=EN-AU style='font-family:"Times New Roman",serif'><span style='mso-tab-count:
8
+ lang="EN-AU" style='font-family:"Times New Roman",serif'><span style='mso-tab-count:
7
9
  1'> </span>United Nations<span style='mso-tab-count:
8
10
  1'></span>{{ docnumber }}<o:p></o:p></span></p>
9
11
 
10
12
  </div>
11
13
 
12
- <p class=MsoNormal style='tab-stops:70.9pt 12.0cm'><span lang=EN-AU
14
+ <p class="MsoNormal" style='tab-stops:70.9pt 12.0cm'><span lang="EN-AU"
13
15
  style='font-family:"Times New Roman",serif'><span style='mso-tab-count:1'>                        </span></span><b
14
- style='mso-bidi-font-weight:normal'><span lang=EN-AU style='font-size:18.0pt;
16
+ style='mso-bidi-font-weight:normal'><span lang="EN-AU" style='font-size:18.0pt;
15
17
  mso-bidi-font-size:12.0pt;font-family:"Times New Roman",serif'>Economic and
16
- Social Council</span></b><span lang=EN-AU style='font-family:"Times New Roman",serif'><span
17
- style='mso-tab-count:1'>               </span></span><span lang=EN-AU
18
+ Social Council</span></b><span lang="EN-AU" style='font-family:"Times New Roman",serif'><span
19
+ style='mso-tab-count:1'>               </span></span><span lang="EN-AU"
18
20
  style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman",serif'>Distr.:
19
- <span class=SpellE>{{ distribution }}</span><o:p></o:p></span></p>
21
+ <span class="SpellE">{{ distribution }}</span><o:p></o:p></span></p>
20
22
 
21
- <p class=MsoNormal style='tab-stops:70.9pt 12.0cm'><span lang=EN-AU
23
+ <p class="MsoNormal" style='tab-stops:70.9pt 12.0cm'><span lang="EN-AU"
22
24
  style='font-family:"Times New Roman",serif'><span style='mso-tab-count:1'>                        </span><span
23
25
  style='mso-tab-count:1'>                                                                                          </span></span><span
24
- lang=EN-AU style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman",serif'>{{ revdate }}<o:p></o:p></span></p>
26
+ lang="EN-AU" style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman",serif'>{{ revdate }}<o:p></o:p></span></p>
25
27
 
26
28
  {% if submissionlanguage %}
27
- <p class=MsoNormal style='tab-stops:70.9pt 12.0cm'><span lang=EN-AU
29
+ <p class="MsoNormal" style='tab-stops:70.9pt 12.0cm'><span lang="EN-AU"
28
30
  style='font-family:"Times New Roman",serif'><span style='mso-tab-count:2'>                                                                                                                 </span></span><span
29
- lang=EN-AU style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman",serif'>Original:
31
+ lang="EN-AU" style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman",serif'>Original:
30
32
  {{ submissionlanguage | join: "/" }}<o:p></o:p></span></p>
31
33
  {% endif %}
32
34
 
33
35
  {% if doclanguage %}
34
- <p class=MsoNormal style='tab-stops:70.9pt 12.0cm'><span lang=EN-AU
36
+ <p class="MsoNormal" style='tab-stops:70.9pt 12.0cm'><span lang="EN-AU"
35
37
  style='font-family:"Times New Roman",serif'><span style='mso-tab-count:2'>                                                                                                                 </span></span><span
36
- lang=EN-AU style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman",serif'>{{ doclanguage | join: ", " }} only<o:p></o:p></span></p>
38
+ lang="EN-AU" style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman",serif'>{{ doclanguage | join: ", " }} only<o:p></o:p></span></p>
37
39
  {% endif %}
38
40
 
39
- <p class=MsoNormal style='tab-stops:70.9pt 12.0cm'><span lang=EN-AU
41
+ <p class="MsoNormal" style='tab-stops:70.9pt 12.0cm'><span lang="EN-AU"
40
42
  style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman",serif'><o:p>&nbsp;</o:p></span></p>
41
43
 
42
44
 
43
45
  <div style='mso-element:para-border-div;border:none;border-top:solid windowtext 2.25pt;
44
46
  padding:1.0pt 0cm 0cm 0cm'>
45
47
 
46
- <p class=MsoNormal style='border:none;mso-border-top-alt:solid windowtext 2.25pt;
48
+ <p class="MsoNormal" style='border:none;mso-border-top-alt:solid windowtext 2.25pt;
47
49
  padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm'><b style='mso-bidi-font-weight:
48
- normal'><span lang=EN-AU style='font-family:"Times New Roman",serif'>Economic <span
49
- class=SpellE>Commision</span> for Europe<o:p></o:p></span></b></p>
50
+ normal'><span lang="EN-AU" style='font-family:"Times New Roman",serif'>Economic <span
51
+ class="SpellE">Commision</span> for Europe<o:p></o:p></span></b></p>
50
52
 
51
- <p class=MsoNormal style='border:none;mso-border-top-alt:solid windowtext 2.25pt;
53
+ <p class="MsoNormal" style='border:none;mso-border-top-alt:solid windowtext 2.25pt;
52
54
  padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm'><b style='mso-bidi-font-weight:
53
- normal'><span lang=EN-AU style='font-family:"Times New Roman",serif'>UNECE
55
+ normal'><span lang="EN-AU" style='font-family:"Times New Roman",serif'>UNECE
54
56
  Executive Committee<o:p></o:p></span></b></p>
55
57
 
56
- <p class=MsoNormal style='border:none;mso-border-top-alt:solid windowtext 2.25pt;
58
+ <p class="MsoNormal" style='border:none;mso-border-top-alt:solid windowtext 2.25pt;
57
59
  padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm'><b style='mso-bidi-font-weight:
58
- normal'><span lang=EN-AU style='font-family:"Times New Roman",serif'>{{ tc | join: "/" }}<o:p></o:p></span></b></p>
60
+ normal'><span lang="EN-AU" style='font-family:"Times New Roman",serif'>{{ tc | join: "/" }}<o:p></o:p></span></b></p>
59
61
 
60
- <p class=MsoNormal style='border:none;mso-border-top-alt:solid windowtext 2.25pt;
61
- padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm'><span lang=EN-AU
62
+ <p class="MsoNormal" style='border:none;mso-border-top-alt:solid windowtext 2.25pt;
63
+ padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm'><span lang="EN-AU"
62
64
  style='font-family:"Times New Roman",serif'><o:p>&nbsp;</o:p></span></p>
63
65
 
64
- <p class=MsoNormal style='border:none;mso-border-top-alt:solid windowtext 2.25pt;
66
+ <p class="MsoNormal" style='border:none;mso-border-top-alt:solid windowtext 2.25pt;
65
67
  padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm'><b style='mso-bidi-font-weight:
66
- normal'><span lang=EN-AU style='font-size:10.5pt;mso-bidi-font-size:12.0pt;
68
+ normal'><span lang="EN-AU" style='font-size:10.5pt;mso-bidi-font-size:12.0pt;
67
69
  font-family:"Times New Roman",serif'>{{ session_number }} session<o:p></o:p></span></b></p>
68
70
 
69
- <p class=MsoNormal style='border:none;mso-border-top-alt:solid windowtext 2.25pt;
70
- padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm'><span lang=EN-AU
71
+ <p class="MsoNormal" style='border:none;mso-border-top-alt:solid windowtext 2.25pt;
72
+ padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm'><span lang="EN-AU"
71
73
  style='font-size:10.5pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman",serif'>{{ session_date }}<o:p></o:p></span></p>
72
74
 
73
75
  {% if session_itemnumber.size == 1 %}
74
- <p class=MsoNormal style='border:none;mso-border-top-alt:solid windowtext 2.25pt;
75
- padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm'><span lang=EN-AU
76
+ <p class="MsoNormal" style='border:none;mso-border-top-alt:solid windowtext 2.25pt;
77
+ padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm'><span lang="EN-AU"
76
78
  style='font-size:10.5pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman",serif'>Agenda item {{ session_itemnumber[0] }}<o:p></o:p></span></p>
77
79
  {% endif %}
78
80
 
79
81
  {% if session_itemnumber.size > 1 %}
80
- <p class=MsoNormal style='border:none;mso-border-top-alt:solid windowtext 2.25pt;
81
- padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm'><span lang=EN-AU
82
+ <p class="MsoNormal" style='border:none;mso-border-top-alt:solid windowtext 2.25pt;
83
+ padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm'><span lang="EN-AU"
82
84
  style='font-size:10.5pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman",serif'>Agenda items {{ session_itemnumber | join: ", " }}<o:p></o:p></span></p>
83
85
  {% endif %}
84
86
 
85
- <p class=MsoNormal style='border:none;mso-border-top-alt:solid windowtext 2.25pt;
86
- padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm'><span lang=EN-AU
87
+ <p class="MsoNormal" style='border:none;mso-border-top-alt:solid windowtext 2.25pt;
88
+ padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm'><span lang="EN-AU"
87
89
  style='font-size:10.5pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman",serif'>{{ docnumber }}{% if item_footnote %}<a
88
90
  style='mso-footnote-id:ftnitem' href="#ftnitem" name="_ftnrefitem" class="footnote" title=""><span
89
- class=MsoFootnoteReference><span style='mso-special-character:footnote'></span></span></a>{% endif %}<o:p></o:p></span></p>
91
+ class="MsoFootnoteReference"><span style='mso-special-character:footnote'></span></span></a>{% endif %}<o:p></o:p></span></p>
90
92
 
91
93
  {% if session_itemname.size > 0 %}
92
- <p class=MsoNormal style='border:none;mso-border-top-alt:solid windowtext 2.25pt;
94
+ <p class="MsoNormal" style='border:none;mso-border-top-alt:solid windowtext 2.25pt;
93
95
  padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm'><b style='mso-bidi-font-weight:
94
- normal'><span lang=EN-AU style='font-size:10.5pt;mso-bidi-font-size:12.0pt;
96
+ normal'><span lang="EN-AU" style='font-size:10.5pt;mso-bidi-font-size:12.0pt;
95
97
  font-family:"Times New Roman",serif'>{{ session_itemname | join: "<br/>" }}<o:p></o:p></span></b></p>
96
98
  {% endif %}
97
99
 
98
100
  {% if session_subitemname.size > 0 %}
99
- <p class=MsoNormal style='border:none;mso-border-top-alt:solid windowtext 2.25pt;
101
+ <p class="MsoNormal" style='border:none;mso-border-top-alt:solid windowtext 2.25pt;
100
102
  padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm'><b style='mso-bidi-font-weight:
101
- normal'><span lang=EN-AU style='font-size:10.5pt;mso-bidi-font-size:12.0pt;
103
+ normal'><span lang="EN-AU" style='font-size:10.5pt;mso-bidi-font-size:12.0pt;
102
104
  font-family:"Times New Roman",serif'>{{ session_subitemname | join: "<br/>" }}<o:p></o:p></span></b></p>
103
105
  {% endif %}
104
106
 
105
- <p class=MsoNormal style='border:none;mso-border-top-alt:solid windowtext 2.25pt;
106
- padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm'><span lang=EN-AU
107
+ <p class="MsoNormal" style='border:none;mso-border-top-alt:solid windowtext 2.25pt;
108
+ padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm'><span lang="EN-AU"
107
109
  style='font-family:"Times New Roman",serif'><o:p>&nbsp;</o:p></span></p>
108
110
 
109
111
  </div>
110
112
 
111
- <p class=MsoNormal style='margin-left:70.9pt'><b style='mso-bidi-font-weight:
112
- normal'><span lang=EN-AU style='font-size:16.0pt;mso-bidi-font-size:12.0pt;
113
+ <p class="MsoNormal" style='margin-left:70.9pt'><b style='mso-bidi-font-weight:
114
+ normal'><span lang="EN-AU" style='font-size:16.0pt;mso-bidi-font-size:12.0pt;
113
115
  font-family:"Times New Roman",serif'>{{ doctitle }}<o:p></o:p></span></b></p>
114
116
 
115
- <p class=MsoNormal style='margin-left:70.9pt'><b style='mso-bidi-font-weight:
116
- normal'><span lang=EN-AU style='font-family:"Times New Roman",serif'>{{ docsubtitle }}<o:p></o:p></span></b></p>
117
+ <p class="MsoNormal" style='margin-left:70.9pt'><b style='mso-bidi-font-weight:
118
+ normal'><span lang="EN-AU" style='font-family:"Times New Roman",serif'>{{ docsubtitle }}<o:p></o:p></span></b></p>
117
119
 
118
120
 
119
- <p class=MsoNormal style='margin-left:70.9pt'>
121
+ <p class="MsoNormal" style='margin-left:70.9pt'>
120
122
  {% if session_collaborator %}
121
123
  <b style='mso-bidi-font-weight:
122
- normal'><span lang=EN-AU style='font-family:"Times New Roman",serif'>Developed
124
+ normal'><span lang="EN-AU" style='font-family:"Times New Roman",serif'>Developed
123
125
  in Collaboration with {{ session_collaborator }}<o:p></o:p></span></b>
124
126
  {% endif %}
125
127
  </p>
@@ -127,9 +129,9 @@ in Collaboration with {{ session_collaborator }}
127
129
 
128
130
  <div style="border:solid windowtext 1.0pt;
129
131
  mso-border-alt:solid windowtext .5pt;">
130
- <p class=MsoNormal><i style='mso-bidi-font-style:normal'>Summary</span></i></p>
131
- <p class=MsoNormal></p>
132
- <div class=MsoNormal id='abstractbox' style='margin-left:70.9pt;font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman",serif;
132
+ <p class="MsoNormal"><i style='mso-bidi-font-style:normal'>Summary</span></i></p>
133
+ <p class="MsoNormal"></p>
134
+ <div class="MsoNormal" id='abstractbox' style='margin-left:70.9pt;font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman",serif;
133
135
  mso-style-textoutline-type:none;mso-style-textoutline-outlinestyle-dpiwidth:
134
136
  .75pt;mso-style-textoutline-outlinestyle-linecap:round;mso-style-textoutline-outlinestyle-join:
135
137
  bevel;mso-style-textoutline-outlinestyle-pctmiterlimit:0%;mso-style-textoutline-outlinestyle-dash:
@@ -137,24 +139,70 @@ mso-border-alt:solid windowtext .5pt;">
137
139
  simple'></div>
138
140
  </div>
139
141
 
142
+ <p class="MsoNormal"><span xml:lang="EN-AU"><!--[if gte vml 1]><v:shapetype id="_x0000_t202"
143
+ coordsize="21600,21600" o:spt="202" path="m,l,21600r21600,l21600,xe">
144
+ <v:stroke joinstyle="miter"/>
145
+ <v:path gradientshapeok="t" o:connecttype="rect"/>
146
+ </v:shapetype><v:shape id="Text_x0020_Box_x0020_2" o:spid="_x0000_s1027"
147
+ type="#_x0000_t202"
148
+ style='position:absolute;margin-left:-6.0pt;margin-top:-28.35pt;
149
+ width:190.15pt;height:31.8pt;z-index:251664896;visibility:visible;
150
+ mso-wrap-style:none;mso-width-percent:0;mso-height-percent:0;
151
+ mso-wrap-distance-left:0;mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;
152
+ mso-wrap-distance-bottom:0;mso-position-horizontal:absolute;
153
+ mso-position-horizontal-relative:margin;mso-position-vertical:absolute;
154
+ mso-position-vertical-relative:bottom-margin-area;mso-width-percent:0;
155
+ mso-height-percent:0;mso-width-relative:page;mso-height-relative:page;
156
+ v-text-anchor:top'
157
+ o:gfxdata="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
187
+ BADzAAAAsQUAAAAA
188
+ " filled="f" stroked="f" strokeweight=".5pt">
189
+ <v:fill o:detectmouseclick="t"/>
190
+ <v:textbox style='mso-fit-shape-to-text:t'>
191
+ <![if !mso]>
192
+ <table cellpadding=0 cellspacing=0 width="100%">
193
+ <tr>
194
+ <td><![endif]>
195
+ <div>
196
+ <p class="MsoNormal" style='margin-left:1.0cm;text-indent:-1.0cm'>{{ session_id }}</p>
140
197
 
141
- <p class=MsoNormal style='margin-left:1.0cm;text-indent:-1.0cm'><i
142
- style='mso-bidi-font-style:normal'><span lang=EN-AU style='font-family:"Times New Roman",serif'><o:p>&nbsp;</o:p></span></i></p>
143
-
144
- <p class=MsoNormal style='margin-left:1.0cm;text-indent:-1.0cm'><i
145
- style='mso-bidi-font-style:normal'><span lang=EN-AU style='font-family:"Times New Roman",serif'><o:p>&nbsp;</o:p></span></i></p>
146
-
147
- <p class=MsoNormal style='margin-left:1.0cm;text-indent:-1.0cm'><i
148
- style='mso-bidi-font-style:normal'><span lang=EN-AU style='font-family:"Times New Roman",serif'><o:p>&nbsp;</o:p></span></i></p>
149
-
150
- <p class=MsoNormal style='margin-left:1.0cm;text-indent:-1.0cm'><i
151
- style='mso-bidi-font-style:normal'><span lang=EN-AU style='font-family:"Times New Roman",serif'><o:p>&nbsp;</o:p></span></i></p>
152
-
153
- <p class=MsoNormal style='margin-left:1.0cm;text-indent:-1.0cm'><i
154
- style='mso-bidi-font-style:normal'><span lang=EN-AU style='font-family:"Times New Roman",serif'><o:p>&nbsp;</o:p></span></i></p>
198
+ </div>
199
+ <![if !mso]></td>
200
+ </tr>
201
+ </table>
202
+ <![endif]></v:textbox>
203
+ <w:wrap type="square"/>
204
+ </v:shape><![endif]--></p>
155
205
 
156
- <p class=MsoNormal style='margin-left:1.0cm;text-indent:-1.0cm'><span
157
- lang=EN-AU style='font-family:"Times New Roman",serif'>{{ session_id }}<o:p></o:p></span></p>
158
206
 
159
207
  </div>
160
208
 
@@ -18,14 +18,14 @@ module IsoDoc
18
18
  bodyfont: (
19
19
  options[:script] == "Hans" ?
20
20
  '"SimSun",serif' :
21
- '"Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif'
21
+ '"Times New Roman", serif'
22
22
  ),
23
23
  headerfont: (
24
24
  options[:script] == "Hans" ?
25
25
  '"SimHei",sans-serif' :
26
- '"Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif'
26
+ '"Times New Roman", serif'
27
27
  ),
28
- monospacefont: '"Space Mono",monospace'
28
+ monospacefont: '"Courier New",monospace'
29
29
  }
30
30
  end
31
31
 
@@ -8,8 +8,8 @@ module IsoDoc
8
8
  class Metadata < IsoDoc::Metadata
9
9
  def initialize(lang, script, labels)
10
10
  super
11
- here = File.dirname(__FILE__)
12
- set(:logo, File.expand_path(File.join(here, "html", "logo.jpg")))
11
+ here = File.dirname(__FILE__)
12
+ set(:logo, File.expand_path(File.join(here, "html", "logo.jpg")))
13
13
  end
14
14
 
15
15
  def title(isoxml, _out)
@@ -42,6 +42,7 @@ set(:logo, File.expand_path(File.join(here, "html", "logo.jpg")))
42
42
  set(:doclanguage, lgs) unless lgs.empty?
43
43
  set(:submissionlanguage, slgs) unless slgs.empty?
44
44
  session(isoxml, _out)
45
+ super
45
46
  end
46
47
 
47
48
  def multival(isoxml, xpath)
@@ -82,34 +83,6 @@ set(:logo, File.expand_path(File.join(here, "html", "logo.jpg")))
82
83
  def unpublished(status)
83
84
  !%w(published withdrawn).include? status.downcase
84
85
  end
85
-
86
- def version(isoxml, _out)
87
- super
88
- revdate = get[:revdate]
89
- set(:revdate_monthyear, monthyr(revdate))
90
- end
91
-
92
- MONTHS = {
93
- "01": "January",
94
- "02": "February",
95
- "03": "March",
96
- "04": "April",
97
- "05": "May",
98
- "06": "June",
99
- "07": "July",
100
- "08": "August",
101
- "09": "September",
102
- "10": "October",
103
- "11": "November",
104
- "12": "December",
105
- }.freeze
106
-
107
- def monthyr(isodate)
108
- m = /(?<yr>\d\d\d\d)-(?<mo>\d\d)/.match isodate
109
- return isodate unless m && m[:yr] && m[:mo]
110
- return "#{MONTHS[m[:mo].to_sym]} #{m[:yr]}"
111
- end
112
-
113
86
  end
114
87
  end
115
88
  end
@@ -7,128 +7,26 @@ module IsoDoc
7
7
  # A {Converter} implementation that generates HTML output, and a document
8
8
  # schema encapsulation of the document for validation
9
9
  #
10
- class PdfConvert < IsoDoc::PdfConvert
10
+ class PdfConvert < IsoDoc::XslfoPdfConvert
11
11
  def initialize(options)
12
12
  @libdir = File.dirname(__FILE__)
13
13
  super
14
14
  end
15
15
 
16
- #def convert1(docxml, filename, dir)
17
- #FileUtils.cp html_doc_path('logo.jpg'), File.join(@localdir, "logo.jpg")
18
- #@files_to_delete << File.join(@localdir, "logo.jpg")
19
- #super
20
- #end
21
-
22
- def default_fonts(options)
23
- {
24
- bodyfont: (
25
- options[:script] == "Hans" ?
26
- '"SimSun",serif' :
27
- '"Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif'
28
- ),
29
- headerfont: (
30
- options[:script] == "Hans" ?
31
- '"SimHei",sans-serif' :
32
- '"Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif'
33
- ),
34
- monospacefont: '"Space Mono",monospace'
35
- }
36
- end
37
-
38
- def default_file_locations(_options)
39
- {
40
- htmlstylesheet: html_doc_path("htmlstyle.scss"),
41
- htmlcoverpage: html_doc_path("html_unece_titlepage.html"),
42
- htmlintropage: html_doc_path("html_unece_intro.html"),
43
- scripts: html_doc_path("scripts.pdf.html"),
44
- }
45
- end
46
-
47
-
48
- def googlefonts
49
- <<~HEAD.freeze
50
- <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i|Space+Mono:400,700" rel="stylesheet">
51
- <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,500,700,900" rel="stylesheet">
52
- HEAD
53
- end
54
-
55
- def make_body(xml, docxml)
56
- plenary = is_plenary?(docxml)
57
- body_attr = { lang: "EN-US", link: "blue", vlink: "#954F72", "xml:lang": "EN-US", class: "container" }
58
- if plenary && @htmlcoverpage == html_doc_path("html_unece_titlepage.html")
59
- @htmlcoverpage = html_doc_path("html_unece_plenary_titlepage.html")
60
- end
61
- #@htmlintropage = nil if plenary
62
- xml.body **body_attr do |body|
63
- make_body1(body, docxml)
64
- make_body2(body, docxml)
65
- make_body3(body, docxml)
16
+ def convert(filename, file = nil, debug = false)
17
+ file = File.read(filename, encoding: "utf-8") if file.nil?
18
+ docxml, outname_html, dir = convert_init(file, filename, debug)
19
+ plenary = docxml.at(ns("//bibdata/ext[doctype = 'plenary']"))
20
+ /\.xml$/.match(filename) or
21
+ filename = Tempfile.open([outname_html, ".xml"], encoding: "utf-8") do |f|
22
+ f.write file
23
+ f.path
66
24
  end
25
+ FileUtils.rm_rf dir
26
+ ::Metanorma::Output::XslfoPdf.new.convert(
27
+ filename, outname_html + ".pdf",
28
+ File.join(@libdir, plenary ? "unece.plenary.xsl" : "unece.recommendation.xsl"))
67
29
  end
68
-
69
- def make_body3(body, docxml)
70
- body.div **{ class: "main-section" } do |div3|
71
- boilerplate docxml, div3
72
- abstract docxml, div3
73
- foreword docxml, div3
74
- introduction docxml, div3
75
- preface docxml, div3
76
- acknowledgements docxml, div3
77
- middle docxml, div3
78
- footnotes div3
79
- comments div3
80
- end
81
- end
82
-
83
- def html_preface(docxml)
84
- super
85
- docxml
86
- end
87
-
88
- def middle(isoxml, out)
89
- clause isoxml, out
90
- annex isoxml, out
91
- bibliography isoxml, out
92
- end
93
-
94
- def clause_parse_title(node, div, c1, out)
95
- if node["inline-header"] == "true"
96
- inline_header_title(out, node, c1)
97
- else
98
- div.send "h#{anchor(node['id'], :level, false) || '1'}" do |h|
99
- lbl = anchor(node['id'], :label, false)
100
- h << "#{lbl}. " if lbl && !@suppressheadingnumbers
101
- insert_tab(h, 1) if lbl && !@suppressheadingnumbers
102
- c1&.children&.each { |c2| parse(c2, h) }
103
- end
104
- end
105
- end
106
-
107
- def introduction(isoxml, out)
108
- f = isoxml.at(ns("//introduction")) || return
109
- page_break(out)
110
- out.div **{ class: "Section3", id: f["id"] } do |div|
111
- div.h1(**{ class: "IntroTitle" }) do |h1|
112
- h1 << @introduction_lbl
113
- end
114
- f.elements.each do |e|
115
- parse(e, div) unless e.name == "title"
116
- end
117
- end
118
- end
119
-
120
- def foreword(isoxml, out)
121
- f = isoxml.at(ns("//foreword")) || return
122
- page_break(out)
123
- out.div **attr_code(id: f["id"]) do |s|
124
- s.h1(**{ class: "ForewordTitle" }) do |h1|
125
- h1 << @foreword_lbl
126
- end
127
- f.elements.each { |e| parse(e, s) unless e.name == "title" }
128
- end
129
- end
130
-
131
- include BaseConvert
132
30
  end
133
31
  end
134
32
  end