pandoc_refeq_mathml 0.1 → 0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c025068f2083e35c2d82be9dadf5260b70f2823ce4ab9607238395388d4b84dc
4
- data.tar.gz: bb47e488a24a8a23b1f93be4c001225492c26465ec77fc425aab9d34876f1113
3
+ metadata.gz: 3fccfc0c2de3bd94a386b58eecb7b7935958f3823909ab6f4cd2fa9d53d627c1
4
+ data.tar.gz: 5ff2f67a9d5b076a82a716b8a2e8fb9fab9ced72744ad1400125d7c67774e8d4
5
5
  SHA512:
6
- metadata.gz: 53f285f6113a7173c112f06bb06bbe27d7aa8ab6a2288ca98059fd33550c5dc7ff932a62de8ad7dbe7f11cddad818fbec795959a9c569717ae6df515e41e8ea2
7
- data.tar.gz: eec508b49714a0a76fde53883459d41940a3814c763902aee73887603a4883a6d1d378461504af9fb01ccd31ab62bbe270770e3663abee4d8ae34cfcdddbb2f5
6
+ metadata.gz: 0be3c4c19a93cf55eac01488bc35845638209d5a34a99e408610bbb139e2206f3e410424b08560539ed62ce866bb1cb14520521bdb6e4fbf0ed6dedc4fc16db9
7
+ data.tar.gz: b3a64421f62bd0b1b8d5afe7dc154abac8a4a633d252805f4673450f2a1db1b61f77a1558b1fcccfb3551cf3df22dba410c36b2d9e1c84bddca12452f18f74b1
data/.gitignore CHANGED
@@ -36,6 +36,7 @@
36
36
  *.elc
37
37
  *.pyc
38
38
  \#*\#
39
+ .\#*
39
40
 
40
41
  # Elastic Beanstalk Files
41
42
  .elasticbeanstalk/*
data/ChangeLog CHANGED
@@ -1,3 +1,10 @@
1
+ -----
2
+ (Version: v0.2)
3
+ 2022-08-27 Masa Sakano
4
+ * Now handles comment lines in equations and multi-layer mtables.
5
+
6
+ * Added a compilable LaTeX file () in test/data/ with
7
+
1
8
  -----
2
9
  (Version: 1.0)
3
10
  2022-08-26 Masa Sakano
data/README.en.rdoc CHANGED
@@ -18,8 +18,7 @@ Another caveat is the alignments of equations in the <tt>eqnarray</tt> environme
18
18
 
19
19
  This tool is a bit of ad hoc (dirty) hack to correct these points
20
20
  *in some basic situations*. "Basic" here means just the standard
21
- LaTeX commands, not some package-specific commands. Also, this may not
22
- correctly handle complicated formats of equations, using arrays etc.
21
+ LaTeX commands, not some external package-specific commands.
23
22
 
24
23
  The full package of this module is found in
25
24
  {PandocRefeqMathml Ruby Gems page}[http://rubygems.org/gems/pandoc_refeq_mathml]
@@ -29,16 +28,33 @@ in {Github}[https://github.com/masasakano/pandoc_refeq_mathml]
29
28
  == Background and constraints
30
29
 
31
30
  Pandoc-converted MathML.html from LaTeX lacks equation numbers that
32
- are present in the original LaTeX. This tool offers a very crude fix,
33
- adding equation numbers based on the annotation fields in +<math>+
34
- and LaTeX aux file (which is automatically generated as a byproduct
35
- when you compile a LaTeX document). Not all the numbers are recovered
36
- but only those that are referenced somewhere in the MathML/LaTeX
37
- file.
31
+ are present in the original LaTeX. The {pandoc-crossref}[https://github.com/lierdakil/pandoc-crossref]
32
+ offers a way to tackle the problem; however its fix is far from
33
+ perfect with three or four major caveats.
34
+
35
+ 1. A single number is assigned to the whole set of equations in an
36
+ +eqnarray+ environment, which is inconsistent with LaTeX.
37
+ 2. The LaTeX +\\nonumber+ is not taken into account.
38
+ 3. Referencing text to an equation displays the original LaTeX label, as opposed to
39
+ the equation number, which makes no sense to readers.
40
+ 4. Because of points (1) and (2), the given equation numbers usually do not
41
+ agree at all with the original document compiled by LaTeX.
42
+
43
+ In LaTeX, you may reference equation 1 and 3 in a single +eqnarray+
44
+ environment separately. However, because of point (1), it would not be possible
45
+ in pandoc-generated MathML. Besides, since they are not referenced
46
+ with equation numbers in the MathML (point 3) in the first place.
47
+
48
+ This tool (command-line command) offers a way to fix these problems, albeit in a crude way.
49
+ The command adds equation numbers that are guessed from the text in
50
+ the annotation fields in +<math>+ and LaTeX aux file (the latter of
51
+ which is automatically generated as a byproduct when you compile a
52
+ LaTeX document). Not all the numbers are recovered but only those
53
+ that are referenced somewhere in the MathML file.
38
54
 
39
55
  (Note that in principle, it should not be too difficult to modify the program so
40
56
  that all the labelled equations in LaTeX are labelled again in
41
- MathML. However, it would be tricky to label equations that are not
57
+ MathML. Nevertheless, it would be tricky to label equations that are not
42
58
  explicitly labelled in LaTeX because implicit numbering information is not
43
59
  available in the LaTeX aux file.)
44
60
 
@@ -123,7 +139,7 @@ equations that contains the relevant equation (for LaTeX
123
139
  numbers inside a pair of parentheses are always located at the right
124
140
  edge of a page in default.
125
141
 
126
- == How to use this command
142
+ == How to use the command
127
143
 
128
144
  Once you have installed it according to the standard RubyGems procedure
129
145
  (see section Install), the main Ruby executable (command) <tt>pandoc_refeq_mathml</tt>
@@ -169,6 +185,11 @@ The help doc for the command-line interface is displayed with +-h+ (or +--help+)
169
185
  % pandoc_refeq_mathml --aux=mydoc.aux --log=error.log mydoc.html > revised1.html
170
186
  % head -n 90 mydoc.html | pandoc_refeq_mathml --aux=mydoc.aux --no-fixalign > revised2.html
171
187
 
188
+ Also, in the +test/data/+ directory, there is a sample LaTeX file. You
189
+ can run +make+ in the directory to generate and correct a HTML/MathML
190
+ file. Read the comment in the +Makefile+ to see options, such as the
191
+ LaTeX executable in your environment.
192
+
172
193
  == Install
173
194
 
174
195
  Standard Ruby-gem install procedure is suffice