Help:Special character insertion: Difference between revisions
(Completed) |
|||
(16 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
In the FrathWiki page editing view there is a section beneath the main edit box called '''Special character insertion''' which looks like this: | In the FrathWiki page editing view there is a section beneath the main edit box called '''Special character insertion''' which looks something like this: | ||
[[Image:Charinsert screenshot.png|frame|center]] | |||
__TOC__ | |||
== Special character insertion area contents == | == Special character insertion area contents == | ||
Line 11: | Line 10: | ||
: This scroll box contains several sections each consisting of [[Wikipedia:Unicode|Unicode]] characters from a certain script or category of characters: | : This scroll box contains several sections each consisting of [[Wikipedia:Unicode|Unicode]] characters from a certain script or category of characters: | ||
:; IPA | :; IPA | ||
:: Recognised IPA characters as listed on [http://www.phon.ucl.ac.uk/home/wells/ipa-unicode.htm John Wells' site]. | :: Recognised IPA characters as listed on [http://www.phon.ucl.ac.uk/home/wells/ipa-unicode.htm John Wells' site]. The combining characters are shown with a ◌ which has to be deleted. | ||
:; Latin | :; Latin | ||
:: These are the characters of the Latin script as understood by Unicode. It probably differs from your idea of 'the Latin Alphabet' in terms of the size and nature of what it includes. ''Inter alia'' all IPA letters are contained in the Unicode Latin script. | :: These are the characters of the Latin script as understood by Unicode. It probably differs from your idea of 'the Latin Alphabet' in terms of the size and nature of what it includes. ''Inter alia'' all IPA letters are contained in the Unicode Latin script. | ||
Line 19: | Line 18: | ||
:: Cyrillic script for Slavic languages and several other languages of the former Soviet Union. | :: Cyrillic script for Slavic languages and several other languages of the former Soviet Union. | ||
:; Diacritics | :; Diacritics | ||
:: Common diacritics, shown in a larger font size so as to be easier to identify. | :: Common diacritics, shown in a larger font size so as to be easier to identify. The combining characters are shown with a ◌ which has to be deleted. Those most crucial to phonetic transcription are repeated in the IPA section. | ||
:; Punctuation | :; Punctuation | ||
:: Several punctuation characters not found on an ordinary keyboard. | :: Several punctuation characters not found on an ordinary keyboard. | ||
:; Invisible characters | :; Invisible characters | ||
:: Some characters that are helpful for improving display but are not themselves shown as mark on the screen or paper. They are inserted as [[Wikipedia:List of XML and HTML character entity references#Character entities in HTML|HTML entities]] so that one can locate them in the edit box. | :: Some characters that are helpful for improving display but are not themselves shown as mark on the screen or paper. They are inserted as [[Wikipedia:List of XML and HTML character entity references#Character entities in HTML|HTML entities]] so that one can locate them in the edit box. | ||
:To insert one of the listed characters in the main edit box all you need to do is to place the insertion point (the blinking <code style="text-decoration: blink;"> | </code>) where you want to insert the character, then click on that character in the scroll box, and the character will appear at the insertion point. | :To insert one of the listed characters in the main edit box all you need to do is to place the insertion point (the blinking wertical bar <code style="text-decoration: blink;"> | </code>) where you want to insert the character, then click on that character in the scroll box, and the character will appear at the insertion point. | ||
;The script links | |||
: Links you can use to quickly get to the various sections in the scroll box. Unfortunately the browser will jump to the insert box, so you'll have to scroll the browser window to see the edit box again. However if you click on an insert character it will be inserted in the edit box and the browser will jump back up to that point in the edit box. | |||
== User specific insert characters == | == User specific insert characters == | ||
You can make your own user-specific set(s) of insert characters by creating a page <code><nowiki>http://wiki.frath.net/User:<your_username>/charinsert</nowiki></code> (you can create it easily by clicking [[ | You can make your own user-specific set(s) of insert characters by creating a page <code><nowiki>http://wiki.frath.net/User:<your_username>/charinsert</nowiki></code> (you can create it easily by clicking [[Special:Mypage/charinsert|this link]]) and populate the page with one or more HTML paragraphs on this pattern: | ||
<pre><nowiki | <pre><nowiki>'''Language name''':<charinsert>Th e s p e c i a l ch a r s & | ||
d i g r a ph s o f y o u r c o n l a ng #1 </charinsert> | |||
'''Most used IPA:''' <charinsert> æ ɑ ɒ ɔ ɕ ɖ ɘ ɛ ɞ ɡ ɣ ɦ ɧ ɭ ŋ ø ɵ ɷ ɻ ɽ ʁ ʂ ʈ ʋ ʐ ʑ </charinsert> | |||
'''Conlang #2'''<charinsert> Ā ā Ă ă Ē ē Ī ī Ĭ ĭ Ō ō Ŏ ŏ Ū ū Ŭ ŭ Ǖ ǖ Ǟ ǟ </charinsert> | |||
'''Conlang #3'''<charinsert> Ƃ ƃ Ƈ ƈ Ƌ ƌ Ƒ ƒ Ƙ ƙ Ơ ơ Ƥ ƥ Ƨ ƨ Ƭ ƭ Ư ư </charinsert> | |||
'''Conlang #4'''<charinsert> ء آ أ ؤ إ ئ ا ب پ ة ت ث ج ح خ د ذ ر ز ژ س ش ص ض ط ظ ع | |||
غ ف ڤ ق ك ڭ گ ڴ ل م ن ه و ى ي ـ </charinsert></nowiki></pre> | |||
See [[User:Melroch/charinsert]] for an actual example! | |||
You can now click on the "User specific insert characters" link in the '''Scripts''' section below the special character insertion box to reach your own insert character groups. | You can now click on the "User specific insert characters" link in the '''Scripts''' section below the special character insertion box to reach your own insert character groups. | ||
'''Tip:''' You can even provide easy access to your favorite templates this way, as long as you | '''Tip:''' You can even provide easy access to your favorite templates this way, as long as you remember to replace any spaces in the template name with underscores <code>_</code>. You can put a <code>+</code> where you want your parameter text to go. | ||
<pre><nowiki>'''IPA template:''' <charinsert> {{IPA|+}} {{IPA|[+]}} {{IPA|/+/}} </charinsert> | |||
'''Small-caps:''' <charinsert> {{SC|+}} </charinsert> | |||
'''Notes:''' <charinsert> {{ref|+}} {{note|+}} </charinsert> | |||
The cursor goes where the + is!</nowiki></pre> | |||
=== A word of warning === | |||
{{Infomessage|text-align=left|content= | |||
'''Update to the above 9 mar 2009:''' Actually it would seem from [[wp:Combining grapheme joiner|the Wikipedia page on U+034F COMBINING GRAPHEME JOINER]] that it is at least theoretically perfectly legitimate to use this character to prevent canonical recomposition, which makes much of the discussion below obsolete. | |||
You are therefore henceforth advised to insert <tt>&#034F;</tt> in your <charinsert> templates and pages wherever you want to force precomposed characters of '''i''' and a diacritic above not to be decomposed when combined with a diacritic below, e.g.<tt>í&#034F;̨</tt> to get '''í͏̨''' rather than '''į́'''. | |||
However it also turns out that using the entity <tt>&#034F;</tt> rather than the actual character doesn't render correctly either, which makes insertion with < charinsert> a bit tricky, since this is an invisible zero-width character! | |||
I created [[:Template:CGJ]] to help with this. | |||
[[User:Melroch|BPJ]] | |||
}} | |||
The [[Wikipedia:MediaWiki|MediaWiki]] engine will 'normalize' a [[wikipedia:Precomposed character|precomposed]] '''i''' with a superscript diacritic and a [[wikipedia:Combining character|combining]] subscript diacritic into a dotted '''i''' precomposed with a subscript diacritic and a combining | |||
superscript diacritic, which of course means that with most | |||
fonts you get the dot of the '''i''' disturbing the superscript diacritic! | |||
The behaviour is not an error of MediaWiki, but the usual Unicode normalisation, considered correct. If you get bad results, then either your browser or your font is broken, not MediaWiki. | |||
So some would recommend ''not'' to hack-fix a broken behaviour of a browser or font, but instead to use a working browser or font, or if that is out of the question (for whatever reason), live with a distorted display, and/or inform the maintainers of the browser or font of not being Unicode compliant. | |||
Others think that computers should adapt to humans and not the other way around, want as correct display as possible ''now'', and won't sit around until someone fixes the problem if they can fake it now. "Sometimes you can't make it, The best you can do is to fake it"! {{ref|U2}} | |||
Here is the hack-fix if you dare to use it: put a [[wikipedia:zero-width joiner|zero-width joiner]] character <code>&zwj;</code> between the precomposed i with a superscript diacritic and the combining subscript diacritic, writing e.g. <code>ī&zwj;̨</code> — i.e. <code>&#x012B;&zwj;&#x0328;</code> — to get the right thing. Unfortunately you can't directly insert <code>&zwj;</code> with Charinsert, so rather than writing <code><nowiki><charinsert>ī&zwj;̨</charinsert></nowiki></code> you must write <code><nowiki><charinsert>ī&amp;zwj;̨</charinsert></nowiki></code> or there will be no ZWJ at all, neither as an invisible character or as HTML. Life '''is''' hard sometimes! {{frown}} This is certainly an abuse of the ZWJ, but it works to get what we want, so let's have no qualms about it! {{smiley}} | |||
;Note : I guess it would be at least quasi-compliant to use the '''[[wikipedia:Combining grapheme joiner|Combining grapheme joiner]]''' character <code>&#x034F;</code>, which at least currently produces the right result, instead of <code>&zwj;</code>. It can only be entered as a numeric entity, however (or as an actual invisible character!), and I guess I'm not the only one who has trouble remembering numeric entities... Anyway, I've changed my user charinserts. --[[User:Melroch|BPJ]] 02:36, 5 October 2007 (PDT) | |||
{{note|U2}} '''U2''' (2004) "[[wikipedia:Sometimes You Can't Make It on Your Own|Sometimes You Can't Make It on Your Own]]" from the album, ''[[wikipedia:How to Dismantle an Atomic Bomb|How to Dismantle an Atomic Bomb]]''. |
Latest revision as of 09:51, 18 July 2011
In the FrathWiki page editing view there is a section beneath the main edit box called Special character insertion which looks something like this:
Special character insertion area contents
From top to bottom:
- The character insertion scroll box
- This scroll box contains several sections each consisting of Unicode characters from a certain script or category of characters:
- IPA
- Recognised IPA characters as listed on John Wells' site. The combining characters are shown with a ◌ which has to be deleted.
- Latin
- These are the characters of the Latin script as understood by Unicode. It probably differs from your idea of 'the Latin Alphabet' in terms of the size and nature of what it includes. Inter alia all IPA letters are contained in the Unicode Latin script.
- Greek
- The Greek alphabet plus punctuation and symbols peculiar to Greek. Also some symbols used in pre-classical Greek and in non-Greek languages which used to be written in the Greek alphabet.
- Cyrillic
- Cyrillic script for Slavic languages and several other languages of the former Soviet Union.
- Diacritics
- Common diacritics, shown in a larger font size so as to be easier to identify. The combining characters are shown with a ◌ which has to be deleted. Those most crucial to phonetic transcription are repeated in the IPA section.
- Punctuation
- Several punctuation characters not found on an ordinary keyboard.
- Invisible characters
- Some characters that are helpful for improving display but are not themselves shown as mark on the screen or paper. They are inserted as HTML entities so that one can locate them in the edit box.
- To insert one of the listed characters in the main edit box all you need to do is to place the insertion point (the blinking wertical bar
|
) where you want to insert the character, then click on that character in the scroll box, and the character will appear at the insertion point. - The script links
- Links you can use to quickly get to the various sections in the scroll box. Unfortunately the browser will jump to the insert box, so you'll have to scroll the browser window to see the edit box again. However if you click on an insert character it will be inserted in the edit box and the browser will jump back up to that point in the edit box.
User specific insert characters
You can make your own user-specific set(s) of insert characters by creating a page http://wiki.frath.net/User:<your_username>/charinsert
(you can create it easily by clicking this link) and populate the page with one or more HTML paragraphs on this pattern:
'''Language name''':<charinsert>Th e s p e c i a l ch a r s & d i g r a ph s o f y o u r c o n l a ng #1 </charinsert> '''Most used IPA:''' <charinsert> æ ɑ ɒ ɔ ɕ ɖ ɘ ɛ ɞ ɡ ɣ ɦ ɧ ɭ ŋ ø ɵ ɷ ɻ ɽ ʁ ʂ ʈ ʋ ʐ ʑ </charinsert> '''Conlang #2'''<charinsert> Ā ā Ă ă Ē ē Ī ī Ĭ ĭ Ō ō Ŏ ŏ Ū ū Ŭ ŭ Ǖ ǖ Ǟ ǟ </charinsert> '''Conlang #3'''<charinsert> Ƃ ƃ Ƈ ƈ Ƌ ƌ Ƒ ƒ Ƙ ƙ Ơ ơ Ƥ ƥ Ƨ ƨ Ƭ ƭ Ư ư </charinsert> '''Conlang #4'''<charinsert> ء آ أ ؤ إ ئ ا ب پ ة ت ث ج ح خ د ذ ر ز ژ س ش ص ض ط ظ ع غ ف ڤ ق ك ڭ گ ڴ ل م ن ه و ى ي ـ </charinsert>
See User:Melroch/charinsert for an actual example!
You can now click on the "User specific insert characters" link in the Scripts section below the special character insertion box to reach your own insert character groups.
Tip: You can even provide easy access to your favorite templates this way, as long as you remember to replace any spaces in the template name with underscores _
. You can put a +
where you want your parameter text to go.
'''IPA template:''' <charinsert> {{IPA|+}} {{IPA|[+]}} {{IPA|/+/}} </charinsert> '''Small-caps:''' <charinsert> {{SC|+}} </charinsert> '''Notes:''' <charinsert> {{ref|+}} {{note|+}} </charinsert> The cursor goes where the + is!
A word of warning
You are therefore henceforth advised to insert "F; in your <charinsert> templates and pages wherever you want to force precomposed characters of i and a diacritic above not to be decomposed when combined with a diacritic below, e.g.í"F;̨ to get í͏̨ rather than į́.
However it also turns out that using the entity "F; rather than the actual character doesn't render correctly either, which makes insertion with < charinsert> a bit tricky, since this is an invisible zero-width character! I created Template:CGJ to help with this.
BPJ
The MediaWiki engine will 'normalize' a precomposed i with a superscript diacritic and a combining subscript diacritic into a dotted i precomposed with a subscript diacritic and a combining
superscript diacritic, which of course means that with most
fonts you get the dot of the i disturbing the superscript diacritic!
The behaviour is not an error of MediaWiki, but the usual Unicode normalisation, considered correct. If you get bad results, then either your browser or your font is broken, not MediaWiki.
So some would recommend not to hack-fix a broken behaviour of a browser or font, but instead to use a working browser or font, or if that is out of the question (for whatever reason), live with a distorted display, and/or inform the maintainers of the browser or font of not being Unicode compliant.
Others think that computers should adapt to humans and not the other way around, want as correct display as possible now, and won't sit around until someone fixes the problem if they can fake it now. "Sometimes you can't make it, The best you can do is to fake it"! [1]
Here is the hack-fix if you dare to use it: put a zero-width joiner character ‍
between the precomposed i with a superscript diacritic and the combining subscript diacritic, writing e.g. ī‍̨
— i.e. ī‍̨
— to get the right thing. Unfortunately you can't directly insert ‍
with Charinsert, so rather than writing <charinsert>ī‍̨</charinsert>
you must write <charinsert>ī&zwj;̨</charinsert>
or there will be no ZWJ at all, neither as an invisible character or as HTML. Life is hard sometimes! ☹ This is certainly an abuse of the ZWJ, but it works to get what we want, so let's have no qualms about it! ☺
- Note
- I guess it would be at least quasi-compliant to use the Combining grapheme joiner character
͏
, which at least currently produces the right result, instead of‍
. It can only be entered as a numeric entity, however (or as an actual invisible character!), and I guess I'm not the only one who has trouble remembering numeric entities... Anyway, I've changed my user charinserts. --BPJ 02:36, 5 October 2007 (PDT)
^ U2 (2004) "Sometimes You Can't Make It on Your Own" from the album, How to Dismantle an Atomic Bomb.