7

In a table, I am listing several coordinates. I want to use a number format such as this

W 95°13'14''

W 95°03'00''

...

I am using the \ang{} environment of the siunitx package.

However, there seems to be no control over the number format when e.g. W 94°02'09'', then W\ang{94;02;09} produces W94°2'9'' i.e. eliminates automatically the zeros in the decade positions.

Is there a way to define a number format?

8

You have to use the right option, either locally:

W\ang[minimum-integer-digits=2]{94;2;9}

or globally:

\sisetup{minimum-integer-digits=2}
 W\ang{94;2;9}

enter image description here

  • 3
    Or doing \newcommand{\latitude}[2]{#1\ang[minimum-integer-digits=2]{#2}}, then typing \latitude{W}{94;2;9} – egreg Feb 5 '13 at 14:47
  • (just btw: West and East prefixes refer to the longitude and N and S to latitude) – Paglia Orba Feb 5 '13 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.