Add serialization to TeX syntax

Add methods for serializing the nodes back to TeX syntax.