Commit f9775986 authored by Jean-Benoist Leger's avatar Jean-Benoist Leger

sqrt

parent 08d8f67d
......@@ -71,6 +71,7 @@ class converter:
# others
self.__cmds[r'\frac'] = latexfuntypes.latexfun(self.__latexfun_frac,2)
self.__cmds[r'\sqrt'] = latexfuntypes.latexfun(self.__latexfun_sqrt,1)
# newcommands
for nc in data.newcommands:
......@@ -282,6 +283,13 @@ class converter:
b = '('+b+')'
return a+'/'+b
def __latexfun_sqrt(self,inputs):
a = inputs[0]
if self.__is_complex_expr(a):
a = '(' + a + ')'
return '√'+a
......@@ -893,9 +893,6 @@ symbols = {
r'\sphericalangle': '∢',
r'\sqcap': '⊓',
r'\sqcup': '⊔',
r'\sqrt': '√',
r'\sqrt[3]': '∛',
r'\sqrt[4]': '∜',
r'\sqsubset': '⊏',
r'\sqsubseteq': '⊑',
r'\sqsupset': '⊐',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment