def to_string(input_):
usetex = rcParams['<STR_LIT>']<EOL>if isinstance(input_, units.UnitBase):<EOL><INDENT>return input_.to_string('<STR_LIT>')<EOL><DEDENT>if isinstance(input_, (float, int)) and usetex:<EOL><INDENT>return tex.float_to_latex(input_)<EOL><DEDENT>if usetex:<EOL><INDENT>return tex.label_to_latex(input_)<EOL><DEDENT>return str(input_)<EOL>
Format an input for representation as text

    This method is just a convenience that handles default LaTeX formatting