Skip to content

Quantity latex representation of degrees has extraneous space #14385

Closed

Description

@mhvk

Description

In a ipython console (i.e., using _repr_latex_), the following looks wrong:
image

This is a direct consequence of to_string(format='latex') putting a \; between.

Expected behavior

There should be no space between the 10 and the degree symbol.

How to Reproduce

# Put your Python code snippet here.
import astropy.units as u
q = 10*u.deg
q.to_string(format='latex')
# '$10 \\; \\mathrm{{}^{\\circ}}$'

Versions

True for all versions of astropy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions