Template talk:Declination

(Redirected from Template talk:DEC)
Latest comment: 5 years ago by 46.242.12.78 in topic sorting

spaces

edit

I'm going to put more spaces in the artical so that look even on an artical — HurricaneDevon @ 00:18, 22 July 2006 (UTC)Reply

Actually, it looks badly misaligned with the extra space in. There's no real reason to have it. 86.141.60.87 00:44, 22 July 2006 (UTC)Reply
Oops forgot to log in. Preceding comment was mine. Chaos syndrome 00:47, 22 July 2006 (UTC)Reply

Compare the rendering:

with extra space +28°  19′ 51″
without extra space +28° 19′ 51″

To me at least, in the first rendering the minutes and seconds values seem a long way spaced apart from the degrees value. This may be an issue related to the system configuration being used. I would avoid forcing extra spacing in this way. Chaos syndrome 01:04, 22 July 2006 (UTC)Reply

Minutes

edit

I am making minutes optional 70.51.8.196 (talk) 06:58, 2 June 2008 (UTC)Reply

Violation of WP:MOSMATH

edit

This template produces hideous-looking results that violate WP:MOSMATH. Look:

Dec −18° 52′ 10″

Instead of a proper minus sign it has a stubby little hyphen. It should look like this:

Dec −18° 52′ 10″

Can this be fixed? Michael Hardy (talk) 20:47, 2 March 2011 (UTC)Reply

PS: In the Antennae Galaxies article I replaced the two occurrences of this template. Michael Hardy (talk) 20:47, 2 March 2011 (UTC)Reply
That is NOT a problem with this template. And you should not have removed the template. You should have just replaced the term in the template parameter. The problem is entirely in the parameter used as an input. 70.49.127.65 (talk) 04:39, 28 June 2012 (UTC)Reply
The fix is easy, edit the input parameter, and replace the hyphen with a minus. 70.49.127.65 (talk) 04:48, 28 June 2012 (UTC)Reply

At WT:AST it has been mentioned that loading this template with intricate features may make several pages run into the transclusion limit, and that instead minus signs should be solved by manual editing. -- 70.49.127.65 (talk) 04:05, 30 June 2012 (UTC)Reply

Template output is non-standard

edit

1° 2′ 3.4″ is supposed to be rendered 1° 02' 03".4 in standard astronomical practice, although with the " above the decimal point. Obviously, common fonts won't do that, so this approximation is usually used. Tfr000 (talk) 14:15, 27 June 2012 (UTC)Reply

Leading zeroes can be implemented through the use of parser functions. 70.49.127.65 (talk) 04:43, 28 June 2012 (UTC)Reply
Though, I've seen it printed in exactly that manner, without leading zeroes, in reputable publications. Though admittedly, they were older sources. 70.49.127.65 (talk) 04:35, 28 June 2012 (UTC)Reply
Too bad MW:Extension:Variables and MW:StringFunctions aren't installed. -- 70.49.127.65 (talk) 05:36, 7 July 2012 (UTC)Reply
There is also a convention of 1° 02'.3, i.e. decimal minutes, although I have seen that more in surveying than in astronomy. Tfr000 (talk) 20:25, 28 June 2012 (UTC)Reply

This is getting quite complex... I think it'll have a detrimental effect on performance

{{DEC/workpage|A=}}
{{DEC/workpage|A=-13.26}}
{{DEC/workpage|A=+3.26}}
{{DEC/workpage|A=0.26}}

{{{1}}}° {{{1}}}° {{{1}}}° {{{1}}}°

70.49.127.65 (talk) 08:17, 29 June 2012 (UTC)Reply

Some further discussion is also occurring at Template talk:RA and WT:WikiProject_Astronomy -- 70.49.127.65 (talk) 01:33, 30 June 2012 (UTC)Reply
At WT:AST it has been mentioned that loading this template with intricate features may make several pages run into the transclusion limit, and that instead leading zeros and minus signs should be solved by manual editing. -- 70.49.127.65 (talk) 04:05, 30 June 2012 (UTC)Reply
Addressing those concerns brought up at WT:AST, a sample version is now in the sandbox. Template talk:DEC/sandbox ; manually enter leading zeroes, manually enter the minus sign, manually enter the decimal point, decimal portion (with decimal point) now entered as the fourth parameter -- 70.49.127.65 (talk) 04:09, 1 July 2012 (UTC)Reply
For those want to take a look at examples, the test cases page has been available for a while. Template talk:DEC/testcases ; it also appears at WT:AST ; {{DEC/sandbox|-15|22|07|.31}} -15° 22′ 07″..31 -- 70.49.127.65 (talk) 03:38, 2 July 2012 (UTC)Reply
Sandbox updated to autogenerate the decimal point -- {{DEC/sandbox|-15|22|07|31}} -15° 22′ 07″.31 -- 70.49.127.65 (talk) 02:52, 5 July 2012 (UTC)Reply
I tried a scaling test with a copy of an existing page – Template talk:RA/testpage. There doesn't seem to be a problem with using multiple copies of this template. Regards, RJH (talk) 15:19, 5 July 2012 (UTC)Reply

Does Tfr000 have any comments at this point? Shall we go with this revision? Regards, RJH (talk) 19:37, 6 July 2012 (UTC)Reply

-0° 1′ 2″.3 / +0° 1′ 2″.3 / 0° 1′ 2″.3 / -0° 1′ 2″ / +0° 1′ 2″ / 0° 1′ 2″ / -0° 1′ / +0° 1′ / 0° 1′ / -0° / +0° / 0° / -00° 01′ 02″.03 / +00° 01′ 02″.03 / 00° 01′ 02″.03 / -00° 01′ 02″ / +00° 01′ 02″ / 00° 01′ 02″ / -00° 01′ / +00° 01′ / 00° 01′ / -00° / +00° / 00° / -000° 001′ 002″.003 / -00° 01′ 02.03″ Well, one can get some "interesting" outputs, since it can't check everything. But it seems to work as noted above. Tfr000 (talk) 13:18, 20 July 2012 (UTC)Reply

Could we automatically replace minus-hyphen with a proper minus sign?

edit

While we could in theory fix every use, fixing the template seems easier. (Convert already does this, for example.) You just need to replace the literal {{{1}}} with {{Str rep|{{{1}}}|-|−}}, which operates as follows (if 1=-123): −123. Thank you! 71.41.210.146 (talk) 05:19, 11 August 2013 (UTC)Reply

  DoneMr. Stradivarius ♪ talk ♪ 13:52, 11 August 2013 (UTC)Reply

sorting

edit

I notice that when you try to sort dec values in a table, it goes from +0 to +90 then -0 to -90. Can this be fixed? --Lasunncty (talk) 03:52, 14 June 2017 (UTC)Reply

Yes, it can be fixed. For example, {{val}} template generates special hidden elements to ensure proper sorting of values expressed in different units. A similar system can be implemented for {{RA}} / {{DEC}} templates. --46.242.12.78 (talk) 23:00, 12 September 2019 (UTC)Reply