साँचा:Ntsh/doc

मुक्त ज्ञानकोश विकिपीडिया से
< साँचा:Ntsh
imported>Sanjeev bot द्वारा परिवर्तित ०७:२०, २१ जनवरी २०२२ का अवतरण (बॉट: साँचा बदल रहा है: Template doc page viewed directly)
(अन्तर) ← पुराना अवतरण | वर्तमान अवतरण (अन्तर) | नया अवतरण → (अन्तर)
नेविगेशन पर जाएँ खोज पर जाएँ

{{

 साँचा:namespace detect

| type = notice | image = | imageright = | class = | style = margin-bottom:1.0em; | textstyle = | text = साँचा:strong for साँचा:terminate sentence
It contains usage information, categories and other content that is not part of the original साँचा page. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }} साँचा:mbox Ntsh (Number Table Sorting, Hidden) is the hidden version of Nts, for correctly sorting tables by their numeric columns. It does the same as Nts, except that it doesn't display anything visible. It can be used to prefix non-numeric entries; for example, you can write {{ntsh|0}}None to have the entry to the end of the table when sorting numerically using Nts.

What it solves

To use Help:Sorting and have it function correctly, numbers must be entered without thousands separators. To enable the display of thousands separators, this template automatically creates the hidden <span style="display:none">&&&&&&&123456789.&&1230</span> before the actual displayed number. It forces the sorting routine to use text sort on the hidden segment, which functions correctly due to the preceding ampersands (currently till 16 digits before, and 6 digits after the decimal separator).

Parameters

Only one: a real number without thousand separators.

Input

{{Ntsh|123456789.00123}}

Output

Output sent to table

 <span style="display:none">&&&&&&&123456789.&&1230</span>

No output is displayed to the user.

...unless he is using a text browser. Whereupon disaster ensues. Please see Wikipedia:Accessibility#Users with limited CSS/JavaScript support.

See also