metanorma-mpfd 0.3.22 → 0.3.23

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.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +17 -0
  3. data/Gemfile +1 -8
  4. data/README.adoc +1 -96
  5. data/lib/asciidoctor/mpfd/biblio.rng +166 -567
  6. data/lib/asciidoctor/mpfd/converter.rb +84 -7
  7. data/lib/asciidoctor/mpfd/isodoc.rng +753 -1216
  8. data/lib/asciidoctor/mpfd/isostandard.rng +1054 -0
  9. data/lib/asciidoctor/mpfd/mpfd.rng +145 -11
  10. data/lib/asciidoctor/mpfd/pdf.js +31 -0
  11. data/lib/asciidoctor/mpfd/section.rb +51 -23
  12. data/lib/asciidoctor/mpfd.rb +1 -0
  13. data/lib/isodoc/mpfd/html/header.html +6 -64
  14. data/lib/isodoc/mpfd/html/html_rsd_titlepage.html +4 -4
  15. data/lib/isodoc/mpfd/html/htmlstyle.scss +505 -200
  16. data/lib/isodoc/mpfd/html/rsd.scss +30 -149
  17. data/lib/isodoc/mpfd/html/scripts.html +27 -25
  18. data/lib/isodoc/mpfd/html/scripts.pdf.html +70 -0
  19. data/lib/isodoc/mpfd/html/word_rsd_titlepage.html +2 -2
  20. data/lib/isodoc/mpfd/html/wordstyle.scss +9 -61
  21. data/lib/isodoc/mpfd/html_convert.rb +258 -4
  22. data/lib/isodoc/mpfd/i18n-en.yaml +0 -1
  23. data/lib/isodoc/mpfd/metadata.rb +32 -8
  24. data/lib/isodoc/mpfd/{base_convert.rb → pdf_convert.rb} +137 -40
  25. data/lib/isodoc/mpfd/word_convert.rb +292 -4
  26. data/lib/metanorma/mpfd/processor.rb +4 -8
  27. data/lib/metanorma/mpfd/version.rb +1 -1
  28. data/lib/metanorma-mpfd.rb +1 -0
  29. data/metanorma-mpfd.gemspec +8 -7
  30. metadata +66 -33
  31. data/.github/workflows/macos.yml +0 -39
  32. data/.github/workflows/ubuntu.yml +0 -53
  33. data/.github/workflows/windows.yml +0 -41
  34. data/.hound.yml +0 -3
  35. data/.rubocop.yml +0 -10
  36. data/lib/asciidoctor/mpfd/basicdoc.rng +0 -1059
  37. data/lib/asciidoctor/mpfd/reqt.rng +0 -194
  38. data/lib/asciidoctor/mpfd/validate.rb +0 -30
  39. data/lib/isodoc/mpfd/i18n-zh-Hans.yaml +0 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f297471469a4138c252ff3b680a38ec263133264e8761f69bee6d25d2a117b76
4
- data.tar.gz: 015c85af05ca03b116018a3fa1ba6c2b2e61de8aebf114351ab6175d4416b30c
3
+ metadata.gz: 63b09a77501f97701633020487f0fd0e82f679c925fd76a7fd9ef755e8245ada
4
+ data.tar.gz: 65ba1b3a7dfe7d0523f124cbc8701949e9d8c03881d35a32c1c41d6e0a4ca0d8
5
5
  SHA512:
6
- metadata.gz: fbaf9fd44750fe4643f518dc0768df755d8dcbd75d735d9d5b6554a8555e8affa8fb0915f8f317802999a63f02969c0f4fa952ec7b7b4fa9726310ee7ae7e59e
7
- data.tar.gz: 3155221cd35d38db7cd4815b87417c31ab18017840faaca6cc546b6cbfcd91da4172002d6ac83ca2f15b1c17b0b45800250b8a3e2d7c243e46b305ec6b3a454a
6
+ metadata.gz: 9f38e699c7df51231f7ae4581b012929102e77081612fb0a9b1c3bcdb7f9509d82af247e94f4a80fbe8d115ca9a1e85b6038a64a5b42198911d895592ed50c86
7
+ data.tar.gz: 25a40079145c3fccb8cfd2d3d5f6238f45db4487c85731d377357564d59dea107393bad81f6e40fc7de37485c56aea368a2281e7f84d8eaa5a2cf720edd87f13
data/.travis.yml ADDED
@@ -0,0 +1,17 @@
1
+ dist: trusty
2
+ sudo: false
3
+ language: ruby
4
+ rvm:
5
+ - 2.5
6
+ - 2.4
7
+ - 2.3
8
+ - ruby-head
9
+ before_install:
10
+ - gem install bundler -v 1.16.1
11
+ - npm install -g puppeteer
12
+ - npm install
13
+ - unset _JAVA_OPTIONS
14
+ matrix:
15
+ allow_failures:
16
+ - rvm: ruby-head
17
+
data/Gemfile CHANGED
@@ -1,11 +1,4 @@
1
- Encoding.default_external = Encoding::UTF_8
2
- Encoding.default_internal = Encoding::UTF_8
3
-
4
1
  source "https://rubygems.org"
5
- git_source(:github) { |repo| "https://github.com/#{repo}" }
2
+ git_source(:github) {|repo| "https://github.com/#{repo}" }
6
3
 
7
4
  gemspec
8
-
9
- if File.exist? 'Gemfile.devel'
10
- eval File.read('Gemfile.devel'), nil, 'Gemfile.devel' # rubocop:disable Security/Eval
11
- end
data/README.adoc CHANGED
@@ -1,96 +1 @@
1
- = Metanorma-MPFD: Metanorma processor for MPFA documents
2
-
3
- image:https://img.shields.io/gem/v/metanorma-mpfd.svg["Gem Version", link="https://rubygems.org/gems/metanorma-mpfd"]
4
- image:https://github.com/metanorma/metanorma-mpfd/workflows/macos/badge.svg["Build Status (macOS)", link="https://github.com/metanorma/metanorma-mpfd/actions?workflow=macos"]
5
- image:https://github.com/metanorma/metanorma-mpfd/workflows/ubuntu/badge.svg["Build Status (ubuntu)", link="https://github.com/metanorma/metanorma-mpfd/actions?workflow=ubuntu"]
6
- image:https://github.com/metanorma/metanorma-mpfd/workflows/windows/badge.svg["Build Status (Windows)", link="https://github.com/metanorma/metanorma-mpfd/actions?workflow=windows"]
7
- image:https://codeclimate.com/github/metanorma/metanorma-mpfd/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-mpfd"]
8
- image:https://img.shields.io/github/issues-pr-raw/metanorma/metanorma-mpfd.svg["Pull Requests", link="https://github.com/metanorma/metanorma-mpfd/pulls"]
9
- image:https://img.shields.io/github/commits-since/metanorma/metanorma-mpfd/latest.svg["Commits since latest",link="https://github.com/metanorma/metanorma-mpfd/releases"]
10
-
11
- WARNING: This gem is still under development. Moreover, unlike other Metanorma gems,
12
- there is no formal MPFD specification, and this work is still currently exploratory.
13
-
14
- == Functionality
15
-
16
- This gem processes http://asciidoctor.org/[Asciidoctor] documents following
17
- a template for generating documents for the http://www.mpfa.org.hk[Mandatory Provident Fund Schemes Authority of Hong Kong]
18
- (MPFA). (MPFD stands for Mandatory Provident Fund Schemes Authority Documents.)
19
-
20
- The gem currently inherits from the https://github.com/metanorma/metanorma-standoc
21
- gem, and aligns closely to it. Refer to the ISO gem documentation
22
- for guidance, including https://github.com/metanorma/metanorma-iso/wiki/Guidance-for-authoring
23
-
24
- The following outputs are generated.
25
-
26
- * (Optional) An HTML preview generated directly from the Asciidoctor document,
27
- using native Asciidoctor formatting.
28
- ** http://asciimath.org[AsciiMathML] is to be used for mathematical formatting.
29
- The gem uses the https://github.com/asciidoctor/asciimath[Ruby AsciiMath parser],
30
- which is syntactically stricter than the common MathJax processor;
31
- if you do not get expected results, try bracketing terms your in AsciiMathML
32
- expressions.
33
- * an XML representation of the document, intended as a document model for MPFD
34
- International Standards.
35
- * The XML representation is processed in turn to generate the following outputs
36
- as end deliverable MPFD standard drafts.
37
- ** DOC
38
- ** HTML
39
-
40
- == Usage
41
-
42
- The preferred way to invoke this gem is via the `metanorma` script:
43
-
44
- [source,console]
45
- ----
46
- $ metanorma --type mpfd a.adoc # output HTML and DOC
47
- $ metanorma --type mpfd --extensions html a.adoc # output just HTML
48
- $ metanorma --type mpfd --extensions doc a.adoc # output just DOC
49
- $ metanorma --type mpfd --extensions xml a.adoc # output MPFD XML
50
- ----
51
-
52
- The gem translates the document into Metanorma XML format, and then
53
- validates its output against the Metanorma XML document model; errors are
54
- reported to console against the XML, and are intended for users to
55
- check that they have provided all necessary components of the
56
- document.
57
-
58
- The gem then converts the XML into HTML and DOC.
59
-
60
- Sample documents are available at http://github.com/metanorma/mpfd-documents/
61
-
62
- === Installation
63
-
64
- If you are using a Mac, the https://github.com/metanorma/metanorma-macos-setup
65
- repository has instructions on setting up your machine to run Metanorma
66
- scripts such as this one. You need only run the following in a Terminal console:
67
-
68
- [source,console]
69
- ----
70
- $ bash <(curl -s https://raw.githubusercontent.com/metanorma/metanorma-macos-setup/master/metanorma-setup)
71
- $ gem install metanorma-mpfd
72
- $ gem install metanorma-cli
73
- ----
74
-
75
- The metanorma-cli gem is the command-line interface for the Metanorma tool suite
76
- (incorporating the `metanorma` executable seen above).
77
-
78
- == Documentation
79
-
80
- See https://www.metanorma.com/author/mpfd/[The MPFD flavor of Metanorma]
81
-
82
-
83
-
84
- == Data Models
85
-
86
- The MPFD Document format is an instance of the
87
- https://github.com/metanorma/metanorma-model-standoc[StandardDocument model]. Details of
88
- this general model can be found on its page.
89
-
90
- == Examples
91
-
92
- * Example documents are avalable at the https://github.com/metanorma/mn-samples-mpf[mn-samples-mpf] repository.
93
-
94
- ////
95
- * Document templates are available at the https://github.com/metanorma/mn-templates-mpf[mn-templates-mpf] repository.
96
- /////
1
+ = metanorma-mpfd