def fricas_md(s):
import re
t = fricas._eval_line_using_file(s, restart_if_needed=False, reformat=False)
t=re.compile(r'\r\r').sub('\r',t,count=0)
t=re.compile(r'\r').sub('\n',t,count=0)
t=re.compile(r' ').sub('',t,count=0)
t=re.compile(r' ').sub(' ',t,count=0)
t=re.compile(r'¯').sub('‾',t,count=0)
t=re.compile(r'\\leqno\(.*\)\n').sub('',t)
t=re.compile(r'\\sb ').sub('_',t,count=0)
t=re.compile(r'\\sp ').sub('^',t,count=0)
t=re.compile(r'\\erf ').sub(r'\\mathrm{erf}',t,count=0)
t=re.compile(r'\\sech ').sub(r'\\mathrm{sech}',t,count=0)
t=re.compile(r'\\tanh ').sub(r'\\mathrm{tanh}',t,count=0)
t=re.compile(r' *Type: (.*)\n').sub(r'<p style="text-align:right">Type: \1</p>\n',t,count=0)
md(t, hide=False)