astropy/astropy — pull request #1320 by mdboom (2013-08-02 23:15:18+00:00)
Title: More options for ``Angle.to_string``

This is a feature request - it would be nice to add the following functionality to ``Angle.to_string``:

* The ability to format as e.g. dd or dd:mm, rather than always dd:mm:ss

* The ability to request the string in LaTeX format (off by default of course, but would be handy). For example, ``$13^h12^m33^s$`` for hours or ``$22^\circ12^\prime33^{\prime\prime}$`` for degrees. Alternatively, this could be a separate ``to_latex`` method.