def render_number(children):
 children_latex = [k.latex for k in children]
 suffix = ''
 if (children_latex[(-1)] in SUFFIXES):
  suffix = children_latex.pop()
  suffix = u'\\text{{{s}}}'.format(s=suffix)
 if ('E' in children_latex):
  pos = children_latex.index('E')
  mantissa = ''.join(children_latex[:pos])
  exponent = ''.join(children_latex[(pos + 1):])
  latex = u'{m}\\!\\times\\!10^{{{e}}}{s}'.format(m=mantissa, e=exponent, s=suffix)
  return LatexRendered(latex, tall=True)
 else:
  easy_number = ''.join(children_latex)
  return LatexRendered((easy_number + suffix))

def render_number ( children ) : children_latex = [ k . latex for k in children ] suffix = '' if ( children_latex [ ( - 1 ) ] in SUFFIXES ) : suffix = children_latex . pop ( ) suffix = u'\\text{{{s}}}' . format ( s = suffix ) if ( 'E' in children_latex ) : pos = children_latex . index ( 'E' ) mantissa = '' . join ( children_latex [ : pos ] ) exponent = '' . join ( children_latex [ ( pos + 1 ) : ] ) latex = u'{m}\\!\\times\\!10^{{{e}}}{s}' . format ( m = mantissa , e = exponent , s = suffix ) return LatexRendered ( latex , tall = True ) else : easy_number = '' . join ( children_latex ) return LatexRendered ( ( easy_number + suffix ) )
combine the elements forming the number .