Template:Unicode/doc: Difference between revisions

Content deleted Content added
Standard doc pattern
add doc for revised template
 
(115 intermediate revisions by 48 users not shown)
Line 1:
{{Documentation subpage}}
<includeonly>{{template doc page transcluded}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude>
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
 
'''Template:Unicode''' was created to improve the presentation of Unicode characters on some very old browsers (especially IE6). It took one parameter, which was a string which could contain Unicode characters beyond the ASCII subset. It simply passed through its parameter for most browsers, but for older browsers could add HTML code to improve that browser's presentation of the characters.
<includeonly>{{Interwikitmp-grp|V=3|cat=MSIE font fix templates|Unicode2}}</includeonly>
 
After IE6 was deemed too old to support, this template [[Template talk:Unicode|was deprecated]], and its implementation was made into a pure identity function, just passing through its parameter. Usages of the template were removed from all articles; the template had been used on at least 60,000 to 100,000 articles.
==Usage==
;This portion ported as usage from en.wikipedia talk page [[w:template talk:unicode]]
:Problems and talk discussions should be posted to that page which the programmers have watchlisted.
{{tiw|unicode}} containing:
<noinclude>
;Ver: Update to late P2, P3 call forms. [[User:Fabartus|<B><font color="blue">Fra</font></B>]]<font color="green">[[User talk:Fabartus|nkB]]</font> 15:38, 10 February 2007 (UTC)
{{Interwikitmp-grp|V=D|cat=MSIE font fix templates|Unicode2}}
</noinclude>
==Purpose==
 
Sometime after that, this template was changed again, to start showing a list of other templates that might be of interest (in the form of a so-called "template disambiguation"). This had the unfortunate effect of breaking the displayability of millions of old revisions of tens of thousands of articles. (The template change replaced a string or single unicode character in the displayed revision with a large mass of unrelated text, plus error messages, at each place the template was used in the old article revision.)
This template was created to allow easy switching to [[unicode]] fonts. This is useful for pages that require unicode to display correctly, such as those written in [[International Phonetic Alphabet]] (commons: [[International Phonetic Alphabet]]). On some browsers, such as [[Microsoft]] [[Internet Explorer]], unicode does not seem to be activated automatically, so this template lets you force it manually.
 
To correct that problem, the template was made into the current form, which again passes through its parameter when invoked but also when the template page itself is viewed shows the list of other templates of interest.
One might ask why bother to use a template for this. Simply:
# The template code is easier to remember than the HTML font style specification, which must be entered fairly precisely for this to work.
# The template code, although not completely transparent, is more transparent than asking new editors to use inline HTML CSS style tags. At least for many editors.
# Using the template allows us to change unicode display properties for all articles that employ the template at once. This is useful as the prefered fonts for displaying unicode are somewhat disputable and will change as new, more complete unicode fonts continue to be developed. The way font specification works, we can provide a whole list of suggested fonts and the first one that is active on the user's machine will be selected.
 
:When the page says Unicode, Internet Explorer will activate Unicode.
:However, when the page says Arial, Internet Explorer will display Arial. While Arial does include e. g. basic Greek and Cyrillic, it does not include e. g. IPA extensions. These are displayed in Arial anyway when the page says so – that is, they are displayed as the famous rectangles.
:David Marjanović | david.marjanovic_at_gmx.at | 00:44 | 2006/5/16
{{TOCright}}
 
==Fonts==
The fonts currently in use are, in order:
 
: ''{{Unicode_fonts}}''
 
Controlled by [[Template:Unicode_fonts]].
 
I realize this is not preferable for everyone (I prefer Gentium over Code2000, and Lucida Sans Unicode over Arial Unicode MS), but the reason is simply that the current order will result in the most characters being displayed, and thus is imnhso the best choice for the Wikipedia. I highly recommend using a personal stylesheet (/monobook.css &c, class ''.Unicode'') to enforce a "prettier" display where preferred. [[User talk:Anárion]] 12:46, 16 Mar 2005 (UTC)
 
==Guts of template==
<nowiki><span class="Unicode">{{{1}}}</span></nowiki>.
----
wherein class="Unicode" is defined in [[MediaWiki:Common.css]].
 
==Examples==
<nowiki>{{unicode|&amp;#x22CA;}} and {{unicode|&amp;#x22C9;}}</nowiki> give {{unicode|&#x22CA;}} and {{unicode|&#x22C9;}}.
 
== See also ==
* {{tl|latinx}} &mdash; favours fonts supporting all the characters in the Latin Exteneded B range (includes Old/Middle English).
* {{tl|IPA}} &mdash; International Phonetic Alphabet.
* {{tl|polytonic}} &mdash; Polytonic Greek.
* {{tl|CDM}} &mdash; Forces a non-buggy font when using Combining Diacritical Marks.
* {{tl|mufi}} &mdash; Forces a font which supports the [[MUFI]] characters.
 
A separate template for a particular symbol is sometimes convenient. e.g.:
*{{tiwc|0/}}
 
giving {{0/}} (the name is a representation of the symbol, with the slash after instead of through the circle).
 
<includeonly>
<!-- Categories below this line; interwikis at Wikidata -->
<!-- ADD CATEGORIES BELOW THIS LINE -->
 
[[Category:MSIE font fix templates|{{PAGENAME}}]]
 
<!-- ADD INTERWIKIS BELOW THIS LINE -->
[[de:Vorlage:Unicode]]
[[hr:Predložak:Unicode]]
[[it:Template:Unicode]]
[[mk:Шаблон:Уникод]]
[[nl:Sjabloon:Unicode]]
[[pl:Szablon:Unicode]]
[[ru:Шаблон:Unicode]]
[[vi:Tiêu bản:Unicode]]
[[zh:Template:Unicode]]
 
</includeonly>