plurimath 0.8.8 → 0.8.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.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plurimath
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.8
4
+ version: 0.8.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-17 00:00:00.000000000 Z
11
+ date: 2024-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: twitter_cldr
@@ -59,6 +59,7 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
+ - ".github/workflows/gen_docs.yml"
62
63
  - ".github/workflows/rake.yml"
63
64
  - ".github/workflows/release.yml"
64
65
  - ".gitignore"
@@ -1726,7 +1727,6 @@ files:
1726
1727
  - plurimath.gemspec
1727
1728
  - supported_parens_list.adoc
1728
1729
  - supported_symbols_list.adoc
1729
- - tasks/symbols_documentation_list.rake
1730
1730
  homepage: https://github.com/plurimath/plurimath
1731
1731
  licenses:
1732
1732
  - BSD-2-Clause
@@ -1,54 +0,0 @@
1
- task :parens_documentation_list do
2
- write_doc_file("./supported_parens_list.adoc", type: :paren)
3
- end
4
-
5
- task :symbols_documentation_list do
6
- write_doc_file("./supported_symbols_list.adoc", type: :symbols)
7
- end
8
-
9
- def write_doc_file(doc_file, type:)
10
- File.delete(doc_file) if File.exist?(doc_file)
11
-
12
- File.open(doc_file, "a") do |file|
13
- file.write(file_header)
14
- Plurimath::Utility.send(:"#{type}_files").each do |symbol|
15
- file_name = File.basename(symbol, ".rb")
16
- klass = Plurimath::Utility.get_symbol_class(file_name)
17
- next if klass::INPUT.empty?
18
-
19
- file.write(documentation_content(file_name, klass))
20
- end
21
- file.write("|===")
22
- end
23
- end
24
-
25
- def documentation_content(file_name, klass)
26
- <<~DOCUMENTATION
27
- | #{Plurimath::Utility.capitalize(file_name)}
28
- l|
29
- #{input(:asciimath, klass)}
30
- l|
31
- #{input(:latex, klass)}
32
- l|
33
- #{input(:mathml, klass)}
34
- l|
35
- #{input(:omml, klass)}
36
- l|
37
- #{input(:unicodemath, klass)}
38
- | `#{Plurimath::Utility.hexcode_in_input(klass) || klass.input(:asciimath).first}`\n
39
- DOCUMENTATION
40
- end
41
-
42
- def file_header
43
- <<~HEADER
44
- |===
45
- | | AsciiMath | LaTeX | MathML | OMML | UnicodeMath | Presentation \n
46
- HEADER
47
- end
48
-
49
- def input(lang, klass)
50
- regex_exp = %r{^[A-Za-z]+\_*[a-zA-Z]+}
51
- arr = klass.input(lang).flatten
52
- arr.each { |str| str.insert(0, "\\\\") if str.match?(regex_exp) } if [:latex, :unicodemath].any?(lang)
53
- arr.join("\n").gsub(/\|/, "\\|")
54
- end