-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from belerico/mathml2tex
Translation from Mathml to LaTeX via XSLT
- Loading branch information
Showing
27 changed files
with
3,424 additions
and
382 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
include LICENSE | ||
include README.md | ||
recursive-include py_asciimath/dtd/ * | ||
recursive-include examples * | ||
recursive-include py_asciimath/dtd/ * | ||
recursive-include py_asciimath/translation/mathml2tex/ * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
langle [bigcup Theta CC NN QQ RR ZZ 1,twoheadrightarrowtail cdot 2], [rarr 2,int[3(x+1)]dx]:} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from py_asciimath import PROJECT_ROOT | ||
from py_asciimath.parser.parser import ( | ||
ASCIIMath2MathML, | ||
ASCIIMath2Tex, | ||
MathML2Tex, | ||
) | ||
|
||
|
||
if __name__ == "__main__": | ||
print("ASCIIMath to MathML") | ||
asciimath2mathml = ASCIIMath2MathML(log=False, inplace=True) | ||
parsed = asciimath2mathml.translate( | ||
PROJECT_ROOT + "/../examples/asciimath_exp.txt", | ||
dtd="mathml2", | ||
dtd_validation=True, | ||
network=True, | ||
displaystyle=True, | ||
pprint=False, | ||
xml_pprint=False, | ||
from_file=True, | ||
) | ||
print(parsed, "\n\nASCIIMath to LaTeX") | ||
asciimath2tex = ASCIIMath2Tex(log=False, inplace=True) | ||
parsed = asciimath2mathml.translate( | ||
PROJECT_ROOT + "/../examples/asciimath_exp.txt", | ||
displaystyle=True, | ||
pprint=False, | ||
from_file=True, | ||
) | ||
print(parsed, "\n\nMathML to LaTeX") | ||
mathml2tex = MathML2Tex() | ||
parsed = mathml2tex.translate( | ||
PROJECT_ROOT + "/../examples/mathml_exp.xml", | ||
network=False, | ||
from_file=True, | ||
) | ||
print(parsed) |
Oops, something went wrong.