converted base for local_smart to generator

fixed :math: escaping of {} in LaTeX to not replace