liblouis / liblouisutdml

An open-source library providing complete braille transcription services for xml, html and text documents
http://liblouis.io
GNU General Public License v3.0
24 stars 16 forks source link

Nested fractions are not converted correctly to Nemeth #62

Open NSoiffer opened 5 years ago

NSoiffer commented 5 years ago

Three nested fraction tests (mathml_nemeth/mfrac_04.test, mathml_nemeth/mfrac_06.test, mathml_nemeth/mfrac_07.test) fail:

Image image image image
Output ?A/B^,??3/4#/?5/6#,#"# ?.P+?X/Y#/<M+N>13]# ,??.P+?X/Y#/13#/Z#
Expected ?A/B^,??3/4#,/?5/6#,#"# ,?.P+?X/Y#,/<M+N>13],# ,,?,?.P+?X/Y#,/13,#,,/Z,,#

There are some commonalities:

  1. The complex fraction slash indicator ,/ is not used (all three tests)
  2. The complex opening/closing indicator ,?/,# are missing in the second and third tests
  3. The even more nested open/closing indicators ,,?/,,# are missing in the third test

In all these cases, just the simple open/slash/close indicator is used.

It appears that the code is not looking at nesting levels.