当前位置: 首页>>代码示例>>Python>>正文


Python OOXMLtoLatexParser.parse方法代码示例

本文整理汇总了Python中src.ooxml_to_latex.OOXMLtoLatexParser.parse方法的典型用法代码示例。如果您正苦于以下问题:Python OOXMLtoLatexParser.parse方法的具体用法?Python OOXMLtoLatexParser.parse怎么用?Python OOXMLtoLatexParser.parse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在src.ooxml_to_latex.OOXMLtoLatexParser的用法示例。


在下文中一共展示了OOXMLtoLatexParser.parse方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_fractions_without_bar_must_be_a_binom

# 需要导入模块: from src.ooxml_to_latex import OOXMLtoLatexParser [as 别名]
# 或者: from src.ooxml_to_latex.OOXMLtoLatexParser import parse [as 别名]
    def test_fractions_without_bar_must_be_a_binom(self):
        xml_string = read_xml(
            "fractions_without_bar_must_be_a_binom.xml", bug_fixes_path)
        ooxml_to_latex = OOXMLtoLatexParser.parse(
            xml_string, math_symbols=unicode_to_latex)

        self.assertMultiLineEqual(r"\binom{{\ n}}{{\ 0}}", ooxml_to_latex.result)
开发者ID:LuoZijun,项目名称:ooxml_to_latex_parser,代码行数:9,代码来源:tests.py

示例2: test_sum

# 需要导入模块: from src.ooxml_to_latex import OOXMLtoLatexParser [as 别名]
# 或者: from src.ooxml_to_latex.OOXMLtoLatexParser import parse [as 别名]
    def test_sum(self):
        xml_string = read_xml("sum.xml", bug_fixes_path)
        ooxml_to_latex = OOXMLtoLatexParser.parse(
            xml_string, math_symbols=unicode_to_latex)

        self.assertEquals(r"\bigcap  _{}^{}{\ l=}\bigcap  _{{\ i\in I}}^{}{\ S}_{{\ i}}{\ =}"
                          r"\left \{{\ x/ x\in }{\ S}_{{\ i}}{\ para\ cada\ i\in I}\right \}", ooxml_to_latex.result)
开发者ID:LuoZijun,项目名称:ooxml_to_latex_parser,代码行数:9,代码来源:tests.py

示例3: test_expansao_de_taylor

# 需要导入模块: from src.ooxml_to_latex import OOXMLtoLatexParser [as 别名]
# 或者: from src.ooxml_to_latex.OOXMLtoLatexParser import parse [as 别名]
 def test_expansao_de_taylor(self):
     xml_string = read_xml("expansao_de_taylor.xml", bug_fixes_path)
     ooxml_to_latex = OOXMLtoLatexParser.parse(xml_string, math_symbols=unicode_to_latex)
     self.assertMultiLineEqual(r'{\ e}^{{\ x}}{\ =1+}\frac{{\ x}}{{\ 1\text{!} }}{\ +}\frac{{\ x}^{{\ 2}}}{{\ '
                               r'2\text{!} }}{\ +}'
                               r'\frac{{\ x}^{{\ 3}}}{{\ 3\text{!} }}{\ +\ldots  ,}{\ -\infty <x<\infty }',
                               ooxml_to_latex.result)
开发者ID:qmagico,项目名称:ooxml_to_latex_parser,代码行数:9,代码来源:tests.py

示例4: test_insert_parenthesis_in_superscript

# 需要导入模块: from src.ooxml_to_latex import OOXMLtoLatexParser [as 别名]
# 或者: from src.ooxml_to_latex.OOXMLtoLatexParser import parse [as 别名]
    def test_insert_parenthesis_in_superscript(self):
        xml_string = read_xml(
            "insert_parenthesis_in_superscript.xml", bug_fixes_path)
        xml_to_latex = OOXMLtoLatexParser.parse(
            xml_string, math_symbols=unicode_to_latex)

        self.assertEquals(r"\left ({\ a+b}\right )^{{\ n}}", xml_to_latex.result)
开发者ID:LuoZijun,项目名称:ooxml_to_latex_parser,代码行数:9,代码来源:tests.py

示例5: test_radius_of_the_circle

# 需要导入模块: from src.ooxml_to_latex import OOXMLtoLatexParser [as 别名]
# 或者: from src.ooxml_to_latex.OOXMLtoLatexParser import parse [as 别名]
    def test_radius_of_the_circle(self):
        xml_string = read_xml('radius_of_the_circle.xml', fixtures_path)
        ooxml_to_latex = OOXMLtoLatexParser.parse(
            xml_string, math_symbols=unicode_to_latex)

        self.assertEquals(r'{\ C}{\ =}{\ \pi  }{\ \cdot  }{\ d}{\ =}{\ 2}{\ \cdot  '
                          r'}{\ \pi  }{\ \cdot  }{\ r}', ooxml_to_latex.result)
开发者ID:LuoZijun,项目名称:ooxml_to_latex_parser,代码行数:9,代码来源:tests.py

示例6: test_identidade_trigonometrica1

# 需要导入模块: from src.ooxml_to_latex import OOXMLtoLatexParser [as 别名]
# 或者: from src.ooxml_to_latex.OOXMLtoLatexParser import parse [as 别名]
 def test_identidade_trigonometrica1(self):
     xml_string = read_xml("identidade_trigonometrica1.xml", bug_fixes_path)
     ooxml_to_latex = OOXMLtoLatexParser.parse(xml_string, math_symbols=unicode_to_latex)
     self.assertMultiLineEqual(r'{\ sin}{\ \alpha  }{\ \pm  }{\ sin}{\ \beta  }{\ =2}{\ sin}\frac{{\ 1}}{{\ 2}}'
                               r'\left ({\ \alpha  \pm  \beta  }\right ){\ cos}\frac{{\ 1}}{{\ 2}}\left ({\ \alpha  '
                               r'\mp  \beta  }\right )',
                               ooxml_to_latex.result)
开发者ID:qmagico,项目名称:ooxml_to_latex_parser,代码行数:9,代码来源:tests.py

示例7: test_expansao_de_uma_soma

# 需要导入模块: from src.ooxml_to_latex import OOXMLtoLatexParser [as 别名]
# 或者: from src.ooxml_to_latex.OOXMLtoLatexParser import parse [as 别名]
 def test_expansao_de_uma_soma(self):
     xml_string = read_xml("expansao_de_uma_soma.xml", bug_fixes_path)
     ooxml_to_latex = OOXMLtoLatexParser.parse(xml_string, math_symbols=unicode_to_latex)
     self.assertMultiLineEqual(r'\left ({\ 1+x}\right )^{{\ n}}{\ =1+}\frac{{\ nx}}{{\ 1\text{!} }}{\ +}'
                               r'\frac{{\ n}\left '
                               r'({\ n-1}\right ){\ x}^{{\ 2}}}{{\ 2\text{!} }}{\ +\ldots  }',
                               ooxml_to_latex.result)
开发者ID:qmagico,项目名称:ooxml_to_latex_parser,代码行数:9,代码来源:tests.py

示例8: test_serie_de_fourier

# 需要导入模块: from src.ooxml_to_latex import OOXMLtoLatexParser [as 别名]
# 或者: from src.ooxml_to_latex.OOXMLtoLatexParser import parse [as 别名]
 def test_serie_de_fourier(self):
     xml_string = read_xml("serie_de_Fourier.xml", bug_fixes_path)
     ooxml_to_latex = OOXMLtoLatexParser.parse(xml_string, math_symbols=unicode_to_latex)
     self.assertMultiLineEqual(r'{\ f}\left ({\ x}\right ){\ =}{\ a}_{{\ 0}}{\ +}\sum  _{{\ n=1}}^{{\ \infty }}'
                               r'\left ({\ a}_{{\ n}}{\ cos}\frac{{\ n\pi  x}}{{\ L}}{\ +}{\ b}_{{\ n}}{\ sin}'
                               r'\frac{{\ n\pi  x}}{{\ L}}\right )',
                               ooxml_to_latex.result)
开发者ID:qmagico,项目名称:ooxml_to_latex_parser,代码行数:9,代码来源:tests.py

示例9: test_integral_de_bloqueio_de_modo

# 需要导入模块: from src.ooxml_to_latex import OOXMLtoLatexParser [as 别名]
# 或者: from src.ooxml_to_latex.OOXMLtoLatexParser import parse [as 别名]
 def test_integral_de_bloqueio_de_modo(self):
     xml_string = read_xml("integral_de_bloqueio_de_modo.xml", bug_fixes_path)
     ooxml_to_latex = OOXMLtoLatexParser.parse(xml_string, math_symbols=unicode_to_latex)
     self.assertMultiLineEqual(r'\frac{{\ 1}}{{\ 2}{\ \pi  }}\int_{{\ 0}}^{{\ 2}{\ \pi  }}\frac{{\ \mathscr{d} }'
                               r'{\ \theta  }}{{\ a}{\ +}{\ b}{\ sin}{\ \theta  }}{\ =}\frac{{\ 1}}{\sqrt{{\ a}^'
                               r'{{\ 2}}{\ -}{\ b}^{{\ 2}}}}',
                               ooxml_to_latex.result)
开发者ID:qmagico,项目名称:ooxml_to_latex_parser,代码行数:9,代码来源:tests.py

示例10: test_integral_gaussiano

# 需要导入模块: from src.ooxml_to_latex import OOXMLtoLatexParser [as 别名]
# 或者: from src.ooxml_to_latex.OOXMLtoLatexParser import parse [as 别名]
 def test_integral_gaussiano(self):
     xml_string = read_xml("integral_gaussiano.xml", bug_fixes_path)
     ooxml_to_latex = OOXMLtoLatexParser.parse(xml_string, math_symbols=unicode_to_latex)
     self.assertMultiLineEqual(r'\int_{{\ -\infty }}^{{\ \infty }}{\ e}^{{\ -}{\ x}^{{\ 2}}}{\ dx}{\ =}\left '
                               r'[\int_{{\ -\infty }}^{{\ \infty }}{\ e}^{{\ -}{\ x}^{{\ 2}}}{\ dx}\int_{{\ '
                               r'-\infty }}^{{\ \infty }}{\ e}^{{\ -}{\ y}^{{\ 2}}}{\ dy}\right ]^{{\ 1}{\ / }{\ 2}}',
                               ooxml_to_latex.result)
开发者ID:qmagico,项目名称:ooxml_to_latex_parser,代码行数:9,代码来源:tests.py

示例11: test_bigcup_bug_fix

# 需要导入模块: from src.ooxml_to_latex import OOXMLtoLatexParser [as 别名]
# 或者: from src.ooxml_to_latex.OOXMLtoLatexParser import parse [as 别名]
    def test_bigcup_bug_fix(self):
        xml_string = read_xml("bigcup.xml", bug_fixes_path)
        ooxml_to_latex = OOXMLtoLatexParser.parse(
            xml_string, math_symbols=unicode_to_latex)

        self.assertEquals(r'\left (\bigcup  _{{\ i\in I}}^{}{\ S}_{{\ i}}\right )^{{\ c}}{\ =}\bigcap'
                          r'  _{{\ i\in I}}^{}\left ({\ S}_{{\ i}}^{{\ c}}\right )', ooxml_to_latex.result)
开发者ID:LuoZijun,项目名称:ooxml_to_latex_parser,代码行数:9,代码来源:tests.py

示例12: test_underset_is_not_a_limit

# 需要导入模块: from src.ooxml_to_latex import OOXMLtoLatexParser [as 别名]
# 或者: from src.ooxml_to_latex.OOXMLtoLatexParser import parse [as 别名]
    def test_underset_is_not_a_limit(self):
        xml_string = read_xml("underset_is_not_limit.xml", bug_fixes_path)
        ooxml_to_latex = OOXMLtoLatexParser.parse(xml_string, math_symbols=unicode_to_latex)

        self.assertMultiLineEqual(r'\underbrace{{\ 7}^{{\ k}}}_{{\ n\ digitos}}<{\ 7}^{{\ k+1}}{\ =7}\left ({\ 7}^'
                                  r'{{\ k}}\right )<\underbrace{{\ 10}\left ({\ 7}^{{\ k}}\right )}_{{\ n+1'
                                  r'\ digitos}}', ooxml_to_latex.result)
开发者ID:qmagico,项目名称:ooxml_to_latex_parser,代码行数:9,代码来源:tests.py

示例13: test_function

# 需要导入模块: from src.ooxml_to_latex import OOXMLtoLatexParser [as 别名]
# 或者: from src.ooxml_to_latex.OOXMLtoLatexParser import parse [as 别名]
    def test_function(self):
        xml_string = read_xml('function.xml', fixtures_path)
        ooxml_to_latex = OOXMLtoLatexParser.parse(
            xml_string, math_symbols=unicode_to_latex)

        self.assertEquals(r'{\ f}\left ({\ x}\right ){\ =}\sum  _{{\ i}{\ =}{\ 0}}^{{\ '
                          r'\infty }}\frac{{\ f}^{\left ({\ i}\right )}\left ({\ 0}\right )}{{\ i}'
                          r'{\ !}}{\ x}^{{\ i}}', ooxml_to_latex.result)
开发者ID:LuoZijun,项目名称:ooxml_to_latex_parser,代码行数:10,代码来源:tests.py

示例14: test_multiple_fractions

# 需要导入模块: from src.ooxml_to_latex import OOXMLtoLatexParser [as 别名]
# 或者: from src.ooxml_to_latex.OOXMLtoLatexParser import parse [as 别名]
    def test_multiple_fractions(self):
        xml_string = read_xml("multiple_fractions.xml", bug_fixes_path)
        ooxml_to_latex = OOXMLtoLatexParser.parse(
            xml_string, math_symbols=unicode_to_latex)

        self.assertMultiLineEqual(r"{\ S}_{{\ n}}{\ :}\frac{{\ 1}}{\sqrt{{\ 1}}}{\ +}\frac{{\ 1}}"
                                  r"{\sqrt{{\ 2}}}{\ +\cdots  +}\frac{{\ 1}}{\sqrt"
                                  r"{{\ n}}}{\ \geq  }\sqrt{{\ n}}", ooxml_to_latex.result)
开发者ID:LuoZijun,项目名称:ooxml_to_latex_parser,代码行数:10,代码来源:tests.py

示例15: test_laplaciano_em_cartesiano_e_esfera

# 需要导入模块: from src.ooxml_to_latex import OOXMLtoLatexParser [as 别名]
# 或者: from src.ooxml_to_latex.OOXMLtoLatexParser import parse [as 别名]
 def test_laplaciano_em_cartesiano_e_esfera(self):
     xml_string = read_xml("laplaciano_em_cartesiano_e_esfera.xml", bug_fixes_path)
     ooxml_to_latex = OOXMLtoLatexParser.parse(xml_string, math_symbols=unicode_to_latex)
     self.assertMultiLineEqual(r'{\ \nabla  }{\ \cdot  }{\ \nabla  }{\ \psi  }{\ =}\frac{{\ \partial  }^{{\ 2}}'
                               r'{\ \psi  }}{{\ \partial  }{\ x}^{{\ 2}}}{\ +}\frac{{\ \partial  }^{{\ 2}}'
                               r'{\ \psi  }}{{\ \partial  }{\ y}^{{\ 2}}}{\ +}\frac{{\ \partial  }^{{\ 2}}'
                               r'{\ \psi  }}{{\ \partial  }{\ z}^{{\ 2}}}{\ =}\frac{{\ 1}}{{\ r}^{{\ 2}}{\ sin}'
                               r'{\ \theta  }}\left [{\ sin}{\ \theta  }\frac{{\ \partial  }}{{\ \partial  }{\ r}}'
                               r'\left ({\ r}^{{\ 2}}\frac{{\ \partial  }{\ \psi  }}{{\ \partial  }{\ r}}\right )'
                               r'{\ +}\frac{{\ \partial  }}{{\ \partial  }{\ \theta  }}\left ({\ sin}{\ \theta  }'
                               r'\frac{{\ \partial  }{\ \psi  }}{{\ \partial  }{\ \theta  }}\right ){\ +}\frac'
                               r'{{\ 1}}{{\ sin}{\ \theta  }}\frac{{\ \partial  }^{{\ 2}}{\ \psi  }}{{\ \partial  }'
                               r'{\ \varphi  }^{{\ 2}}}\right ]',
                               ooxml_to_latex.result)
开发者ID:qmagico,项目名称:ooxml_to_latex_parser,代码行数:16,代码来源:tests.py


注:本文中的src.ooxml_to_latex.OOXMLtoLatexParser.parse方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。