Template talk:IPA
From Wikipedia, the free encyclopedia
Template:IPA is for IPA characters only!
- For polytonic Greek script, please use Template:Polytonic [talk].
- For other languages or symbols, please use Template:Unicode [talk].
Template:IPA contains
<span title="Pronunciation in IPA" class="IPA">{{{1}}}</span>
I.e., it simply specifies CSS class IPA.
This allows fixing broken display of International Phonetic Alphabet (IPA) characters in MS Internet Explorer 6 for Windows, and choice of style in any browser.
The font declarations are in MediaWiki:Common.css. Registered Wikipedia users can specify their own style for IPA text by editing, for each project, their user style sheet, e.g. monobook.css. Users can also specify the style locally in their browser, which works across projects.
An example, placing a phonetic rendering of the word characters in Template:IPA:
{{IPA|[ˈkæ.ɹəkˌtə(ɹ)z]}}
The result will be a span with a style attribute, like this:
<span title="Pronunciation in IPA" class="IPA">ˈkæ.ɹəkˌtə(ɹ)z</span>
Which appears in your browser as:
- [ˈkæ.ɹəkˌtə(ɹ)z]
Without template:IPA:
- [ˈkæ.ɹəkˌtə(ɹ)z]
[The last two should only look different if you are using Internet Explorer on Windows, or if you have a custom style defined for IPA text.]
Please place all IPA text into Template:IPA, even if it doesn't have any special IPA characters, like this: [aj pi ej]. This will allow users to format all examples of IPA text consistently, with their choice of fonts, colours, etc.
[edit] Technical details
The class="IPA"
attribute exists so that Wikipedia users can apply their own style sheets to text in Template:IPA. See #Applying custom styles to IPA text, below.
The first declaration font-family: Chrysanthi Unicode, Doulos SIL, Gentium, GentiumAlt, Code2000, TITUS Cyberbit Basic, DejaVu Sans, Bitstream Cyberbit, Arial Unicode MS, Lucida Sans Unicode, Hiragino Kaku Gothic Pro, Matrix Unicode
actually lives in a sub-template at Template:IPA fonts. It lists a series of fonts that are known to contain IPA characters.
The second style declaration font-family /**/:inherit;
overrides the preceding font declaration, and tells the text in Template:IPA to use the default font inherited from its surroundings, in every browser except MSIE 6.0. The empty comment placed just in the right spot confuses MSIE 6 and prevents it from applying this declaration. This is a documented way of hiding CSS from MSIE 6. [1] (site gone)
[edit] Editing Template:IPA
Stop. Template:IPA should only contain the basic fonts that are likely to be on a user's computer. Adding fonts here significantly contributes to page bloat for all users, including those who have no need of template:IPA's functionality. If you want IPA displayed in a particular font, please add it to your user style sheet. See #Applying custom styles to IPA text, below.
Remember that Template:IPA is intended to display IPA characters. Criteria for selecting fonts:
- Full IPA character set.
- Normal and bold weights, for emphasis.
- Sans-serif, matching Wikipedia's default font.
Less important criteria:
- Having a wide range of other international characters.
- Having italics.
Do not surround font names with single quotes, because Wikipedia's software will escape them with backslashes. CSS recommends single quotes around font names with spaces, but doesn't require them.
[edit] About the fonts
- sans-serif
- regular only, but automatically generated bold & slanted works in Windows
- comes with MS Office for PC and Mac
- is not available for Linux through [2], but is available through distribution-specific methods (ie. YaST)
- places double combining modifiers too far to the left by 1 em
- serif
- shareware font from James Kass
- serif
- free font from SIL
- regular only
- serif
- free font from SIL
- regular and italic only
- sans-serif
- comes with Mac OS X
- regular and bold only
- sans-serif
- comes with Windows XP
- doesn't include some IPA characters
- double combining inverted breve
- [what others?]
[edit] Applying custom styles to IPA text
You can apply your own custom styles using the .IPA class selector in your local style sheet. If you are a registered Wikipedia member, you can put custom styles into your monobook.css style sheet. For detailed instructions, see Help:User style.
Try this: place the following text into User:XXX/monobook.css, where XXX is your username.
.IPA { color: green; }
If you want to see IPA displayed in a particular font, try something like this:
.IPA { font-family: 'Chrysanthi Unicode', serif; }
You can also override Template:Unicode fonts by using .Unicode
, and Template:Polytonic fonts by using .polytonic
. Capitalization of these class names must be the same.
[edit] See also
- Wikipedia:Manual of Style (pronunciation)
- Wikipedia:Pronunciation guide
- Template:IPA notice - notice indicating that an article contains IPA
- Template:ConvertIPA - notice for editors, that an article contains SAMPA or or pseudo-English transcription needing conversion to IPA
- Template:Polytonic - font specification for Polytonic Greek
- Template:Unicode
- Template:IPA2 - similar to this template, but adds the text "IPA:" before the transcription, and automatically puts the transcription in square brackets, thus {{IPA2|fəˈnɛɾɪk}} renders thus: IPA: [fəˈnɛɾɪk]
- Category:Pages containing IPA
[edit] External links
[edit] Discussion
Just so people understand, this template forces its argument to appear in a <span> tag forcing the use of Unicode fonts. This ensures that users can see the IPA characters in Windows Internet Explorer, which otherwise doesn't display IPA characters for anonymous users. Nohat 18:21, 31 Dec 2004 (UTC)
- Actually, I'd say that matching the rest of the page and having bold characters is more important. A well-written browser will substitute characters from a different font if the specified font doesn't have those characters. Of course if the most common browser were well-written, we wouldn't need this template at all. However, we do need it, but we shouldn't degrade the appearance of pages for users whose browsers are well-written. Therefore, a an attractive, well-matched font with roman and bold characters should be the primary criteria. Code2000 is widely regarded as a font of last resort due to its ugliness (as well as its non-freeness) and doesn't match the rest of the pages because it's a serif font: sans-serif is specified for body text in Wikipedia's CSS. Nohat 07:04, 9 Jan 2005 (UTC)
-
- Are there any instances on Wikipedia where IPA is formatted in bold-face? I can't think of a situation where it would be desirable. —Michael Z. 16:17, 2005 Jan 9 (UTC)
-
-
-
- Good example. I've updated the criteria, and took the liberty of moving discussion down here. —Michael Z. 01:17, 2005 Jan 10 (UTC)
-
-
[edit] Unicode tables
Wouldn't it be useful to make a template that is just the desired CSS font arguments and use that template in table headers so you can avoid putting the IPA template in at every item in the table? I'm not sure how this would interact with Wiki table markup, but I think it would work.
- Done, at Template:IPA fonts. It renders the following
Chrysanthi Unicode, Doulos SIL, Gentium, GentiumAlt, Code2000, TITUS Cyberbit Basic, DejaVu Sans, Bitstream Cyberbit, Arial Unicode MS, Lucida Sans Unicode, Hiragino Kaku Gothic Pro, Matrix Unicode
- It's just the font list, so it can be used in a style attribute to specify
font-family
orfont
, or even (heaven forfend) in a<font>
element. I've put it into template:IPA, so the font list for all IPA in Wikipedia can be edited in one place. —Michael Z. 01:59, 2005 Jan 10 (UTC)
Also, as you probably remember I made a separate Unicode template a while back. In that template we recently changed the order of the fonts. What is your logic for the order you're using? It would be good to put the logic here in the talk page. --Chinasaur 19:40, 8 Jan 2005 (UTC)
- The logic has been changing as users have edited this template. See the history, and the font list above, for some insight. If the activity settles down, maybe I'll write it out for this talk page. —Michael Z. 01:59, 2005 Jan 10 (UTC)
[edit] Arial Unicode MS bugs
AxSkov, which IPA characters does Arial Unicode MS have that Lucida Sans Unicode does not? The reason I want to move Arial further down the list is that it has a bug in the way it displays double combining modifiers (which are used to represent some affricates). See Talk:International Phonetic Alphabet#Other symbols for the technical details and examples. —Michael Z. 21:56, 2005 Jan 8 (UTC)
After doing some testing, it appears to me that Lucida Sans Unicode doesn't include those characters anyway, so I guess it doesn't matter which MS font comes first in that regard. I've put Lucida Grande first, so Mac OS X users will see it correctly even if they happen to have the MS fonts. Lucida Grande doesn't have italics, but I think IPA would never be italicized anyway. —Michael Z. 22:22, 2005 Jan 8 (UTC)
[edit] Replace with IE-specific style sheet class
I'd like to propose changing the way Template:IPA works, so that it only has an effect in MSIE 6 for Windows. This requires two changes:
1. Add a style sheet directive to Wikipedia's existing MSIE-only style sheet [4]:
.IPA { font-family: Lucida Grande, Arial Unicode MS, Lucida Sans Unicode, Gentium, Code2000; }
2. Edit Template:IPA so that it applies the IPA class:
<span class="IPA"> [content] </span>
To specify IPA in a different scope (e.g., a table or a div), an editor can simply add class="IPA"
as an HTML attribute. Multiple classes can be specified: class="toccolours IPA"
. Users can also use the .IPA selector to specify styles in their own user style sheets at User:XXX/monobook.css.
We'll need the co-operation of an admin or developer to change the style sheet.
Why?
- The font specification is only required for one browser: MSIE 6/Windows. It's a hack.
- Other modern browsers automatically substitute fonts containing the characters (Mozilla, Firefox, Safari)
- Some older browsers won't display IPA anyway (MSIE 5/Mac)
- The current method needlessly overrides the font display for other browsers, including user-selected fonts, and may break the display. It will override:
- Web browser's default font
- Web browser's automatic font substitution (e.g., if the default font doesn't have IPA characters
- User's selected font in browser preferences
- User's local style sheet
- Wikipedian's fonts specified in User:XXX/monobook.css.
- Users might be tempted to use this for other Unicode character ranges, where it may may degrade display in other browsers (I've already seen it happen). If its application is restricted to a single Windows browser, then changes are less likely to do any damage.
- This solution allows registered Wikipedians to specify their own font for IPA in their monobook.css style sheet.
Disadvantages:
- The font specification list would live in a style sheet, where it can only be edited by an admin or developer.
Any comments? —Michael Z. 20:22, 2005 Jan 14 (UTC)
[edit] MSIE/Win only version
After I wrote the proposal above, I got an idea. Template:IPA now looks like this:
<span class="IPA" style="font-family:Lucida Grande, Arial Unicode MS,
Lucida Sans Unicode, Gentium, Code2000; font-family:inherit;">
- The second font-family declaration overrides the first, in CSS-compliant web browsers.
- MSIE/Win doesn't understand the
inherit
value, so it still applies the fonts. - The
class="IPA"
attribute allows users to specify their own styles. Add something like this into your style sheet, at User:XXX/monobook.css (where XXX is your user name):
.IPA { color: red; }
—Michael Z. 20:40, 2005 Jan 14 (UTC)
- The problem is that on IE6/XP the second font-family spec overrides the first, and so, unless there's an "inherit" font installed, it winds up reverting to whatever font is used in the surroundings of the embedded span (it inherits, in other words!). I've tried putting the special "inherit" tag at the beginning of the fontlist, but that didn't work either. IE seems to function OK if the inherit tag is at the end of the fontlist (current revision), but I have no way of testing what it does on other platforms. A. Shetsen 22:31, 14 Jan 2005 (UTC)
- Aw crap—that browser's brokenness has cost me hundreds of hours of work. I read in my reference that it doesn't support "inherit", but never thought that the reference to a non-existent font would completely replace the previous declaration. I'm going to try something else. If I revert it temporarily it's because I'm doing some testing. —Michael Z. 23:03, 2005 Jan 14 (UTC)
-
- Oops. Same diff as with font-family. Seems a deeper solution is called for. OK. I'm installing MediaWiki on my Pentium 300 with 64 MB memory :). A. Shetsen 23:15, 14 Jan 2005 (UTC)
-
-
- Ta-dah!!! on IE6. Thank you, Michael. Alex Shetsen. A. Shetsen 23:19, 14 Jan 2005 (UTC)
-
-
-
-
- [?] I tried something else, but it didn't work so I reverted the template. Looks like it's back to plan A: #Replace with IE-specific style sheet class, which should be quite easy to do if we can find a helpful admin. —Michael Z. 23:27, 2005 Jan 14 (UTC)
-
-
Okay, I'm going to try something else. I found two CSS filters to hide CSS from MSIE. I'll see if these can work. —Michael Z. 07:10, 2005 Jan 15 (UTC)
1. The !important property doesn't work in MSIE4, 5 and 6, so the second declaration should override the first in these browsers.
<span class="IPA"style="font-family:inherit !important; font-family:Lucida Grande,
Arial Unicode MS, Lucida Sans Unicode, Gentium, Code2000;">
Inherits font-family in Firefox/Mac, but applies the second declaration in MSIE6/Win (good), Firefox/win and Safari (not what we want).
2. spaced empty comment in the property should hide the declaration from MSIE6/Win only.
<span class="IPA" style="font-family:Lucida Grande, Arial Unicode MS,
Lucida Sans Unicode, Gentium, Code2000; font-family /**/:inherit;">
Method 2 seems to work right. Inherits font-family in Safari and Firefox, but applies the IPA font spec in MSIE6/Win. YAY! Please look at some IPA and tell me if everything looks right to you. —Michael Z. 07:40, 2005 Jan 15 (UTC)
- Looks good!! I've tested it with and without my custom monobook.css file. IPA and the rest of the conten display well on my XP/IE6 combo. Thank you!! A. Shetsen 19:02, 15 Jan 2005 (UTC)
-
- Phew! I was starting to get discouraged. I'm still going to see about adding the
.IPA
font declaration to a browser-specific style sheet, but it's nice to get it working as it should. —Michael Z. 00:25, 2005 Jan 16 (UTC)
- Phew! I was starting to get discouraged. I'm still going to see about adding the
Looks very good on a common public computer with no particular extras added. This is a REAL improvement! Kudos!
--Ruhrjung 13:41, Jan 24, 2005 (UTC)
[edit] Attention, Australia!
Dear anonymous user from Australia (203.164.184.61, etc.),
Why do you keep changing this template? It's set up to work around a font-display inadequacy in MS Internet Explorer for Windows, and to not do anything in other web browsers. There's an explanation in #Technical details, above. If you're changing it for another reason, please let us know here.
You can override the font display for yourself only, by putting something like the following in your browser's user style sheet, or by registering as a Wikipedia user and putting it in your own Wikipedia style sheet. Registration has other benefits, too.
.IPA { font-family: Arial Unicode MS; }
—Michael Z. 2005-01-22 16:54 Z
[edit] Using the template
It's important, if surrounding the IPA characters with slashes or square brackets, to put these inside the IPA template, for instance {{IPA|/.../}}, rather than /{{IPA|...}}/, as otherwise a spurious space will appear after the leading slash or bracket. I realised this after seeing some of my edits corrected by User:Angr. rossb 06:57, 18 Feb 2005 (UTC)
- Yup. I don't think it used to do this; anyone know if template behaviour has changed in the last week or two? —Michael Z. 2005-02-18 16:13 Z
In my opinion the brackets should be integrated to the Template already. Stern 07:59, 16 Mar 2005 (UTC)
- Well, sometimes you want to use square brackets, sometimes you want slashes, and sometimes you don't want any brackets at all. And if you had three separate templates, the names of the templates would probably be longer than the two keystrokes it takes to type a pair of brackets. Compare {{IPA-slashes|bim}} {{IPA-brackets|bim}} {{IPA-plain|bim}} with {{IPA|/bim/}} {{IPA|[bim]}} {{IPA|bim}} Nohat 08:53, 16 Mar 2005 (UTC)
[edit] Links
Like in the german Wikipedia (see de:Enschede for example) the IPA-code should link to Wikipedia's IPA page. In the german Wikipedia the Template follows always directly after the first time the text's name is used -- without any description. Thats better than in the english Wikipedia. Stern 08:04, 16 Mar 2005 (UTC)
- The problem with linking the IPA transcriptions themselves is the underline that is standard in the link can get in the way of deciphering which symbol is present, particularly if there are diacritics that appear below the letter. But even disregarding that, the difference between the symbol for the velar nasal and the palatal nasal would probably be hard to discern if there were an underline crossing through the descenders. Nohat 08:53, 16 Mar 2005 (UTC)
-
-
- How about adding something like " [[International Phonetic Alphabet|*]]" to the template? J. 'mach' wust • tskʃpræːx 17:00, 2 May 2005 (UTC)
-
-
-
-
- I for one don't want to link to the International Phonetic Alphabet page every single time I use the IPA template. Sometimes I prefer to link to International Phonetic Alphabet for English or IPA chart for English, or nothing at all because I'm using the template for the twentieth time in the same paragraph. Also all those asterisks before linguistic forms would make people think they were either reconstructed or ungrammatical. --Angr/comhrá 17:43, 2 May 2005 (UTC)
-
-
-
-
-
-
- That's true, the asterisks would be too confusing. What do you think about adding a title-attribute:
-
-
-
-
-
-
-
- <span title="This is an IPA-transcription; see: International phonetic alphabet." class="IPA" style="white-space: nowrap; font-family:{{IPA fonts}}; font-family /**/:inherit;">{{{1}}}</span>
-
-
-
-
-
-
-
- This would look like this: /aɪ æm ən ɪgzɑːmpl/. J. 'mach' wust • tskʃpræːx 18:13, 2 May 2005 (UTC)
-
-
-
-
-
-
-
-
- That's pretty good. I would edit the title slightly: /aɪ æm ən ɪgzɑːmpl/.
-
-
-
-
-
-
-
-
-
- I would also be in favour of linking the text to International Phonetic Alphabet, and using CSS to prevent underlining. —Michael Z. 2005-05-2 23:51 Z
-
-
-
-
-
-
-
-
-
-
- If we'd include "Pronunciation of xxx" in the title, then the template must include a regular spelling of the transcribed phrase. This would be possible, but it would be a major work to do so. Aditionally, I don't think it would be necessary, since the transcription will most of the times be preceded by a regular spelling version.
-
-
-
-
-
-
-
-
-
-
-
- I've tried to make the css disappear the underline. However, this css is overwritten by the settings in the preferences (and probably by browser settings as well). If we look what the following produces:
-
-
-
-
-
-
-
-
-
-
-
- [[International Phonetic Alphabet|<span class="IPA" style="text-decoration:none; white-space:nowrap; font-family:{{IPA fonts}}; font-family /**/:inherit;">{{{1}}}</span>]]
-
-
-
-
-
-
-
-
-
-
-
- Then we see that the underline stays: /aɪ æm ən ɪgzɑːmpl/. J. 'mach' wust • tskʃpræːx 09:52, 3 May 2005 (UTC)
-
-
-
-
-
[edit] Hundreds of IPA codes ...
... can be found here and can be copied to the english Wikipedia. Stern 08:06, 16 Mar 2005 (UTC)
- Thank you. Some of these will be helpful, although I must confess some of them are quite amusing, such as the British pronunciations of American places. [ˈaːkənsɔː] and ['ʌɪdəhəʊ], indeed! Nohat 09:05, 16 Mar 2005 (UTC)
[edit] Sometimes the template makes it worse!
I've been adding the IPA template to the Brazilian Portuguese article, which had a lot of IPA without the template, but there are one or two characters that are worse with the template than without it. Notably #7869 displays correctly wihout the template — ẽ , but as the null glyph with the template — ẽ . Any suggestions? rossb 10:07, 16 Mar 2005 (UTC)
- Font problem. The current font order is Code2000, Gentium, Lucida Sans Unicode, TITUS Cyberbit Basic, Arial Unicode MS, Lucida Grande (Template:IPA_fonts). Both Code2000 and Gentium contain the character, but Lucida Sans Unicode does not. I suspect you do not have Code2000 or Gentium, but do have LSU. Since Arial Unicode MS also includes the character, I'll move that one before Lucida. Jordi·✆ 10:19, 16 Mar 2005 (UTC)
-
- This seems to have cured the problem! rossb 13:39, 16 Mar 2005 (UTC)
[edit] SAMPA
I have created Template:SAMPA and Template:IPA-SAMPA, the first simply a class wrapper for SAMPA code in the same vein as the IPA class, the second is for pages where both IPA and SAMPA are given, and allows the user to turn off one or the other based on their preference, such as:
.IPA { color: green; } .IPA-SAMPA .SAMPA { display: none; }
- Nicholas 22:17, 22 Mar 2005 (UTC)
-
- Thanks, I think. I just hope people don't take this as an incentive to add gobs of hideous SAMPA to lots of articles. Nohat 01:16, 23 Mar 2005 (UTC)
-
-
- Concurrance, although Wikipedia policy is preference for IPA, I realise that some people may not be able to display IPA or may be familiar with SAMPA and not IPA, and prefer to see that. I originally did this in Received Pronunciation (2 October or so) with classes 'ipa' and 'sampa' but it got reverted for adding HTML tags liberally throughout the article. This template method is much better. Personally I'd never heard of SAMPA till I saw it on Wikipedia, and honestly can't agree more that it's the most hideous thing I've seen in linguistics :-) Nicholas 09:38, 23 Mar 2005 (UTC)
-
- I think there are now very few articles in the English Wikipedia that still use SAMPA to show the pronunciation of a particular word. Several editors (including myself) have been systematically replacing it with IPA. it does of course still exist in specialist articles on linguistic matters, but could probably be largely removed there as well. I think it's unlikely that any significant number of people would be familiar with SAMPA and not IPA, give that SAMPA is merely a kludge for displaying IPA on computer systems that can't cope with IPA characters. And just about every modern dictionary I've looked at recently (in the UK) uses IPA. I think that American dictionaries may use other schemes, but I can't imagine SAMPA will be among them. rossb 18:49, 23 Mar 2005 (UTC)
-
- Concurrance, although Wikipedia policy is preference for IPA, I realise that some people may not be able to display IPA or may be familiar with SAMPA and not IPA, and prefer to see that. I originally did this in Received Pronunciation (2 October or so) with classes 'ipa' and 'sampa' but it got reverted for adding HTML tags liberally throughout the article. This template method is much better. Personally I'd never heard of SAMPA till I saw it on Wikipedia, and honestly can't agree more that it's the most hideous thing I've seen in linguistics :-) Nicholas 09:38, 23 Mar 2005 (UTC)
-
The real problem with this is that some articles will have just IPA, others just SAMPA. If I can't see the SAMPA, then I won't take the opportunity to quickly add the IPA (and probably nuke the SAMPA). —Michael Z. 2005-04-7 23:18 Z
-
- I don't understand this point about not seeing the SAMPA. If the SAMPA is there, anyone can see it, it doesn't need any special characters (which is the whole point of it after all). In practice there should be almost no articles left that contain SAMPA and not IPA (other than a few more complex specifically linguistic articles, which if they don't have IPA should already have had their talk pages marked with the convertIPA template). rossb
[edit] No-wrap
Is the no-wrap meant to prevent breaks between syllables? Is IPA breaking at just any old letter, or just at the periods? Nowrap is not terrible, but it's a bit awkward in long bits in a narrow browser window, like in the intro for Nikita Khrushchev. —Michael Z. 2005-04-13 00:01 Z
- Keep it. IPA examples should be short (one word or one sound only), and it is not nice if this is wrapped. Especially MSIE is horrid with this: it seems to want to create a horizontal scrollbar if an IPA snippet is wrapped even if otherwise not needed, because of serious errors in the font family handling. Jordi·✆ 00:14, 13 Apr 2005 (UTC)
[edit] Wrong characters
At least in my browser with the fonts I have installed, some IPA characters show up wrong. ɡ is supposed to be a handwritten g, i.e. identical to g in sans-serif fonts, but for me (at least, and presumably others as well) it shows up identical to γ (gamma from the Greek alphabet, not the IPA alphabet). Also ʁ, the inverted small capital R, is supposed to have the vertical stroke on the left, the rounded part on the lower right, and the diagonal in the upper right. But instead it's displayed with the vertical stroke on the right, the rounded part on the lower left, and the diagonal in the upper left. I don't know which font is creating these problems, but maybe we should stop using it. --Angr/comhrá 19:46, 14 Apr 2005 (UTC)
- These characters look correct on my browser here - I'm using plain vanilla IE6 on Windows 2003. rossb 21:51, 14 Apr 2005 (UTC)
I'm using plain vanilla Netscape 7.2 on Windows XP. When I use IE it works. --Angr/comhrá 22:34, 14 Apr 2005 (UTC)
Am I the only Wikipedian who uses Netscape? I even added ".IPA { font-family: Doulos SIL; Gentium; }" to my monobook.css page to force fonts that I know display the characters correctly, but it still doesn't work; those fonts don't show up. It's very confusing, because every IPA-containing sans-serif Unicode font I have installed on my computer (Arial Unicode, Lucida Sans Unicode, Microsoft Sans Serif) has those two characters correct when I use them on MS Word. --Angr/comhrá 11:16, 15 Apr 2005 (UTC)
That should be .IPA { font-family: Doulos SIL, Gentium; }
, with a comma. Try .IPA { font-family: Doulos SIL, Gentium !important; }
, or making the selector more specific, like span.IPA { ...
. —Michael Z. 2005-04-15 15:22 Z
Thanks, Michael! I added both "span" before and "!important" after and now it works. --Angr/comhrá 19:27, 15 Apr 2005 (UTC)
- Glad it worked. Also, because of WP's caching, I find I can't test changes to monobook.css or monobook.js. They'll just show up within a day or two. —Michael Z. 2005-04-15 19:32 Z
-
- Well here it is over eight months later and I finally found out which font was causing all the trouble: MS Reference Sans Serif. I simply deleted it and now I don't need to specify anything in my monobook.css page and all the characters look right. Also, I'm using Mozilla Firefox now, not Netscape anymore. --Angr (t·c) 13:35, 31 December 2005 (UTC)
It's months later, and I'm still seeing the problem on some computers that run Firefox 1.5. Can we get the "!important" fix for the main monobook.css file on the site, so that individual users (who may not be CSS or even relatively computer literate) don't have to hack their systems to make it work? Dave 21:32, 30 April 2006 (UTC)
[edit] Size?
IPA is often nigh-illegible with the default font size, so I've found myself increasing the text size just to see what's going on. I now have my monobook.css set to display IPA at 16pt which is much nicer. Any thoughts on this? It does stand out, but then so does the image rendering of math TeX markup. Probably something other than points would have to be used in the CSS since people may be using different base font sizes. DopefishJustin (・∀・) 21:49, May 23, 2005 (UTC)
[edit] Showing tone diacritics in Firefox
With Firefox running on Mac OS 10.3.9 I can't get the diacritics for tones and and word accents to show upp properly. I just get the white boxes. However, when I helped Mark Dingemanse with some of his language articles, I noticed that when used in his vowel tables, they work like a charm! I tried with all kinds of tone diacritics, and they all seemed to work with his tables. Here's one of from Gbe languages:
Capo 1991:24 | Front | Central | Back |
---|---|---|---|
Close | i • ĩ | u • ũ | |
Close-mid | ẽ | o • õ | |
ə • ə̃ | |||
Open-mid | ɛ • ɛ̃ | ||
Open | a • ã |
Any idea why they show up properly with Marks method, but not with this template?
Peter Isotalo 16:56, May 25, 2005 (UTC)
- Try installing more fonts. For me (Firfox 1.0 on OS X 10.2.1) it works all right when I install TITUS Cyberbit Basic and Gentium. -- j. 'mach' wust ˈtʰɔ̝ːk͡x 19:54, 25 May 2005 (UTC)
-
- But the font families that are used in the table (Arial Unicode MS and Lucida Sans Unicode) are both present in the supporting Template:IPA fonts. Surely that must mean that the problem somehow lies in the template, not the lack of fonts. And since bishonen complained about the same problem, and is also using Firefox and OS 10, I suspect there are others who are having the same problem.
- Peter Isotalo 20:27, May 25, 2005 (UTC)
-
-
-
-
- That's what I think, too. When I remove the fonts I've mentioned, then not all the signs will show up correctly, even though when I copy paste them to a Unicode compliant application (such as TextEdit), all of them appear. There seems to be a problem with certain Mac OS X fonts on Firefox. -- j. 'mach' wust ˈtʰɔ̝ːk͡x 09:22, 26 May 2005 (UTC)
-
-
-
But how can it not be a template problem if the fonts work fine in the table but not in the template? It doesn't seem particularly constructive to claim that an OS is incompatible with a template which is designed specifically to fix these problems. Telling me to get more fonts is fine and all, but this will obviously be a problem to other users as well.
Peter Isotalo 15:11, May 26, 2005 (UTC)
- The template is designed to only affect the font display in MSIE/Windows, which has some major font display inadequacies. It shouldn't affect Firefox, Safari, etc. at all.
- In the table above, the font specification affects all browsers, if the specified fonts are present. —Michael Z. 2005-05-26 16:28 Z
-
- In the appropiate place (which one?), there should be a note that Firefox/Mac OS X has some troubles with some fonts (which ones with which ones?). The signs I have most troubles with are the tone signs: Unless I activate Gentium or Titus, I'll only see ? ? ? ? ? (or nothing at all) instead of ˥ ˦ ˧ ˨ ˩, even though they all show up correctly when I copy paste them to TextEdit. -- j. 'mach' wust ˈtʰɔ̝ːk͡x 23:05, 26 May 2005 (UTC)
-
-
-
- I use safari in mac 10.3.9. I think the problem has to do with what fonts are specified. The template does not affect anything at all for me, this is because of the font-family /**/:inherit; declaration. In Mark's table above, the font-family is specified and thus affects what is displayed. Whatever font is specified by the Mac browsers does not display the diacritics correctly. You can see this by comparing the tables below (I dont use Code2000, Chrysanthi Unicode, TITUS Cyberbit Basic, Bitstream Cyberbit, or Bitstream Vera):
-
-
|
|
|
||||||
|
|
|
||||||
|
|
-
-
-
- I dont know what to suggest for this. This font behaviour has something to do with Wikipedia itself. I think this because if I save this page as HTML locally (i.e. it doesnt reference the style sheets or whatever it is doing), then the diacritic behaviour is fine without declaring any font-family. I think I have reached the end of my knowledge about this, so someone please help. peace — ishwar (SPEAK) 18:18, 2005 Jun 3 (UTC)
-
-
-
-
-
- Here is the code for a quick test. Save as .html.
-
-
<html> <head> test </head> <body> this is a test <br><br> <table border="1" cellspacing="0" cellpadding="2" style="text-align: center"><br> <caption><b>no font specification</b></caption><br> <tr><br> <td> i • ĩ • u • ũ • ẽ • o • õ </td><br> </tr><br> <tr><br> <td>ə • ə̃ • ɛ • ɛ̃ • a • ã</td><br> </tr><br> </table> </body> </html>
-
-
-
-
- Different for me: On Safari 2.0 (OS X 10.4.1), everything displays all right except for the samples lacking font specification, no matter whether on the seperate file or on wikipedia. On Firefox 1.0.4, everything is okay, it is only annoying that i+'combining tilde' really is i+'combining tilde' and not ı with tilde above. -- j. 'mach' wust ˈtʰɔ̝ːk͡x 01:47, 4 Jun 2005 (UTC)
-
-
-
hi. From what I tell now, the reason my setup (still Safari 1.3, OS 10.3.9) was not displaying the combining diacritics correctly has to be with the specification:
font-family: sans-serif
This declaration forces my version of Safari to use the Helvetica font, and it is this font which does not properly align the diacritics. (but Helvetica does align things correctly if I paste into TextEdit). If Safari uses another font, then this problem is resolved. Incidentally, if I disable Helvetica (through Font Book), then Safari used the Lucida Grande font which displays all diacritics correctly.
The font-family declaration is in Wikipedia's main.css file.
Anyway, maybe this just obvious to everyone else. If so, sorry. peace – ishwar (speak) 03:38, 2005 Jun 21 (UTC)
[edit] No underlining for {{IPA}}
Underlining obscures certain IPA characters, particularly those with descenders that may distinguish them from similar characters, so I've added the style "text-decoration: none;" to the template. This works in IE but not Firefox. Did I do something wrong? Usually Firefox is pickier about the exact format, but I'm pretty sure I've followed this tutorial exactly. —Simetrical (talk) 4 July 2005 23:10 (UTC)
- What you were doing seems fine, but why is
text-decoration:none;
necessary? The word is not a link, so it shouldn't be underlined in any case, right?
- If you want to make it a link, and keep it from being underlined, that won't work without changing Wikipedia's style sheet. There's probably a declaration in the style sheet like
a:link {text-decoration:underline;}
, which would be more specific in scope thantext-decoration:none;
applied to the surrounding span. The less specific declaration embedded in the page can't override a more specific declaration. —Michael Z. 2005-07-5 04:13 Z
I thought that any specification made in the style attribute of a tag is considered more specific than a specification made in the style sheet? a:link
refers to any chunk of text in <a> tags, after all, while the low-level declaration only that specific chunk of text. —Simetrical (talk) 7 July 2005 02:27 (UTC)
-
- My current recommendation is to never make IPA characters a link. If you want to link to something, make a nearby word a link instead. Nohat 5 July 2005 05:45 (UTC)
That just isn't practical in many cases. Look at Hebrew alphabet#Numerical_value_and_pronunciation, for instance, over on the right (that really needs to be reworked to be much slimmer, incidentally). What should be done, making each entry a full wikilinked name like Glottal stop? Better to have the descenders obscured but allow anyone to figure out what it means by hovering over it or clicking, than fill the table with characters that will be totally incomprehensible to 95% of viewers. —Simetrical (talk) 7 July 2005 02:27 (UTC)
- Linking IPA text is not the magic cure to making IPA comprehensible to that 95% of viewers who don't understand it. That table is a huge mess and I'd say that the linked IPA does not add to the table's comprehensibility. IMHO, that table should summarize just the basic information for each letter, and the detailed information for each letter should be on each letter's page, which can spell out the name of the sounds represented. Nohat 7 July 2005 02:37 (UTC)
Possibly, but a single unified table is useful for quick reference. (I've actually split it into two now.) In any case, how does linking a confusing IPA symbol like x or j, or a completely incomprehensible one like ʔ, not aid comprehension if someone wants to know how yod or whatever is/was pronounced? —Simetrical (talk) 7 July 2005 03:18 (UTC)
- I agree with Nohat. Linking this way won't really help those who don't know IPA and will only annoy those who do. And linking every single usage of the template is really not useful. You can use a separate template or just clever normal linkage for that.
- Peter Isotalo 11:52, 20 August 2005 (UTC)
[edit] Problem
The template is currently not displaying IPA at all. I do not know how to fix this --Vincej 12:55, 20 August 2005 (UTC)
- It seems to be a problem with the code or something. Try to wait and see if it gets fixed before making edits.
- Peter Isotalo 13:31, 20 August 2005 (UTC)
[edit] This is annoying...
I'm using Firefox and noticed that where this template is used, the text is displayed in a font called Gentium on my computer. But if it is not used, IPA text is displayed in Arial Unicode MS (which I greatly prefer over any other). Anyway, I just thought I should say that it does affect the font display in other web browsers. On some pages, not all IPA text uses this tag, but some IPA text that were recently added do use this tag. So on pages with a mix of old and new IPA text with this tag, I end up with some IPA text on the same graph displayed in Arial Unicode MS and Gentium. It looks very messy so I had to remove Gentium from my fonts folder just so that all IPA text would appear in Arial Unicode MS. --Hecktor 21:09, 2 October 2005 (UTC)
- Very annoying; this is a brand-new behaviour affecting Safari too, and presumably all other browsers. It looks like Wikimedia has changed the way CSS comments are being rendered, and the second font declaration is now broken. Instead of
font-family /**/:inherit;
- The declaration which negates the fonts (for every browser except MSIE/Win) now renders with either a non-breaking space (in numeric entity format), or a regular space in place of the CSS comment:
font-family  :inherit;
- or
font-family :inherit;
- It mixes up these two versions on a single page. I'll try to figure out what happened and fix it. —Michael Z. 2005-10-2 21:43 Z
-
- I filed this as bug 3588 on Bugzilla. —Michael Z. 2005-10-2 22:16 Z
-
-
- Just wanted to add that I'm using IE (on a university computer, so I get very little option), and I haven't been able to see IPA characters for a few days now. Very annoying!
-
-
-
-
- I'll put the CSS for this template into the style sheet Wikipedia:monobook.css, and just leave
class="IPA"
in the template. This should work. I'll have to do this for Template:Unicode and Template:Polytonic, and any others too. In-page tables or divs that have this construction will have to be updated. - I'll do it sometime today, and report back here. Is someone able to update the documentation on this page, and for the other two templates I mentioned? —Michael Z. 2005-10-4 14:50 Z
- The template will add less page bloat—good.
- Users can style whole tables or divs by adding
class="IPA"
—good. - Non-admin users won't be able to change the font list—good or bad, depending on your point of view.
- I'll put the CSS for this template into the style sheet Wikipedia:monobook.css, and just leave
-
-
[edit] Template size
With the long title text and many fonts in the declaration, this template is currently 471 characters long. This template swells the article on the International Phonetic Alphabet by over 219 kilobytes, tripling its size!
The title text should be pared down. Only fonts that are likely to be on a user's machine should be included; if you want another font represented, add a declaration to your own user style sheet instead of adding it here (see #Applying custom styles to IPA text on this page). —Michael Z. 2005-10-2 22:51 Z
[edit] Font declaration has been moved to Common.css
The way Template:IPA, Template:Unicode, and Template:Polytonic do their job has been changed. They should continue to work as before. Sorry if this causes any inconvenience. Problems? Click "refresh".
The font declarations for these three templates have been moved to the style sheet at MediaWiki:Common.css. This reduces the size of Wikipedia pages' code, by as much as 100kB in the case of IPA. The respective font declarations are applied to HTML entities with one of the following attributes (capitalization counts). The three templates in question have been updated, so they will continue working as before.
class="IPA"
class="Unicode"
class="polytonic"
The only disadvantage of the new scheme is that only admin users are able to edit the font declarations in Common.css (or is it an advantage?). But you can override the font declaration for yourself by editing your own Wikipedia user style sheet. See Template talk:IPA#Applying custom styles to IPA text. Alternatively, you can use a browser like Mozilla Firefox, Opera, or Safari, in which Unicode text just works.
The reason for this change is that the Mediawiki software no longer allows comments in inline style sheets, because Microsoft Internet Explorer's incorrect parsing is unsafe and can be used for cross-site scripting attacks. See Wikimedia bug no. 3588.
Similar font declarations applied to any tables or divs on Wikipedia should have one of the above-mentioned class attributes added instead.
The style sheet code in Common.css looks like this:
/* Support for Template:IPA, Template:Unicode and Template:Polytonic. The inherit declaration resets the font for all browsers except MSIE6. The empty comment must remain. */ .IPA { font-family: Chrysanthi Unicode, Doulos SIL, Gentium, GentiumAlt, Code2000, TITUS Cyberbit Basic, DejaVu Sans, Bitstream Vera Sans, Bitstream Cyberbit, Arial Unicode MS, Lucida Sans Unicode, Hiragino Kaku Gothic Pro, Matrix Unicode; font-family /**/:inherit; } .Unicode { font-family: TITUS Cyberbit Basic, Code2000, Doulos SIL, Chrysanthi Unicode, Bitstream Cyberbit, Bitstream CyberBase, Bitstream Vera, Thryomanes, Gentium, GentiumAlt, Visual Geez Unicode, Lucida Grande, Arial Unicode MS, Microsoft Sans Serif, Lucida Sans Unicode; font-family /**/:inherit; } .polytonic { font-family: Athena, Gentium, Palatino Linotype, Arial Unicode MS, Lucida Sans Unicode, Lucida Grande, Code2000; font-family /**/:inherit; }
Please discuss this at Template talk:IPA#Font declaration has been moved to Common.css. —Michael Z. 2005-10-4 15:39 Z
[edit] Discussion
- css is certainly the right way to handle this sort of thing. However, not everyone uses monobook -- there are 7 other styles available in Special:Preferences. Since I can't edit the css files, I am fixing this temporarily by reverting to the old system. Please revert back after all the other css files are updated. And then, please test on a variety of configurations. Thanks. --Macrakis 18:54, 4 October 2005 (UTC)
-
-
- I use Classic, myself. Special:Preferences also shows MySkin, Cologne Blue, MonoBook, Nostalgia, Simple, Amethyst, and Chick. When you're done, you can also change back Template:Polytonic. --Macrakis 19:12, 4 October 2005 (UTC)
-
-
-
-
- I couldn't find any of those style sheets, but I've moved the offending code to MediaWiki:Common.css, so it should work in all skins. Please refresh and confirm that it's working for you. Thanks. —Michael Z. 2005-10-4 20:39 Z
-
-
-
-
-
-
- No, it will not work in all skins. If there are 6 of them, and the inclusion of Common.css is done only in 5 of them (it's not automatic; it has to be done by hand on each of the skins, since there's no support for it in the software), one of the skins is not working correctly. Someone should find out which page on the MediaWiki: namespace the missing skin is calling and create it, copying from one of the other skins (for instance, MediaWiki:Cologneblue.css). --cesarb 21:06, 4 October 2005 (UTC)
-
-
-
-
-
-
-
-
- Never mind, I've done it myself (there were two skins which didn't have the Common.css include). I have not tested them, but it should work. --cesarb 21:17, 4 October 2005 (UTC)
-
-
-
-
[edit] Tahoma for polytonic?
Compare:
- ὅπερ ἔδει δεῖξαι
- ὅπερ ἔδει δεῖξαι
The second one looks more like monobooks sans-serif font (defaults to Arial for western text, at least in IE and Firefox), doesn't it? Is there a specific reason Tahoma isn't in the list (and more importantly, before P.L.)? Are there important characters Tahoma doesn't support? Shinobu 02:10, 15 December 2005 (UTC)
[edit] Mac and IE
The template does not work with Macintosh and IE
System Software Overview:
System Version: Mac OS X 10.3.9 (7W98) Kernel Version: Darwin 7.9.0
Explorer Version: 5.2.3 (5815.1) Encryption: 128 Bit User Agent: Mozilla/4.0 (compatible; MSIE 5.23; Mac_PowerPC) Machine Type: Unknown System Version: System 10.3.9 TCP/IP Software: Open Transport - version 16.3.0 Drag Manager: 68K & PPC Version Text Encoding Converter: Version 1.9.0 System Memory: 2097,148K Bytes
Andreas 02:02, 28 December 2005 (UTC)
- [Replied at template talk:Polytonic#Mac and IE —Michael Z. 2005-12-28 06:02 Z]
[edit] CSS hackers needed
If any CSS hackers are in the house: Could you please have a look at Talk:Voiced_velar_plosive? It appears that Firefox preferably uses the font MS Reference Sans Serif for IPA letters, but the font is broken. Thanks, AxelBoldt 21:53, 29 December 2005 (UTC)
- Update: this is the same issue that Angr reported above for Netscape. AxelBoldt 22:34, 29 December 2005 (UTC)
[edit] Interwiki link to vi:
Please add an interwiki link to the Vietnamese version of this template:
<noinclude>[[vi:Tiêu bản:IPA]]</noinclude>
Thanks.
– Minh Nguyễn (talk, contribs) 22:32, 5 February 2006 (UTC)
- Done. --CBDunkerson 17:07, 8 April 2006 (UTC)
[edit] ͈͈͈͈͈ ͈ ͈
Hi there, I don't really know what I'm talking about, but I was wondering if you can shed some light on this. At Korean language, there is this use of the template, <͈>, which does not render correctly on my browser (Firefox 1.5). Is it something you could fix perhaps? Cheers. PizzaMargherita 22:25, 21 April 2006 (UTC)
- The character in question is combining diacritical mark, code point 0348, its appearance and usage are described at Korean language. Since you use Firefox, {{IPA}} does not affect your display. (It affect only MSIE.) If it does not render correctly on your browser, that would indicate that you don't have a font that supports this code point. If it displayed correctly, it would modify the preceding character: two vertial lines would appear under the < (which may not be what the editor intended). --teb728 16:44, 8 June 2006 (UTC)
[edit] Priority of fonts in CSS class
Could we place the fonts that do not handle diacritics placement lower in the CSS font priority? Fonts like Gentium or Chrysanthi Unicode do not have diacritics placement, so diacritics will not always be well placed, some centered, others not. Also could we put those that do and are hinted with a higer priority? Here's a proposed order:
- Doulos SIL - best IPA support: diacritics placement, stacking and decent hinting
- Charis SIL - same as quality as Doulos SIL
- DejaVu Sans - Sans Serif font with diacritics placement, some stacking and good hinting
- Gentium - good IPA support except for no diacritics placement, no stacking, good hinting
- Code2000 - good IPA support, diacritics placement, stacking but no hinting
- Chrysanthi Unicode - good IPA support but no diacritics placement and no hinting
- Others
---moyogo 06:47, 12 May 2006 (UTC)
[edit] Please remove Bitstream Vera Sans from font family!
Esteemed Powers That Be,
I am using Windows XP and Internet Explorer 6. Normal text of Wikipedia gets displayed in Arial as specified, text in the IPA template gets displayed in Arial MS Unicode, which works perfectly (except for the bug with the tie bar, of course). Today I wanted to open a WordPerfect document and installed OpenOffice 2.0 for this purpose. Surprise! The most basic characters in IPA template now get displayed in a weird font with shading (each letter looks like a jpeg, sort of), and all other characters are rectangles! It turns out that in this template Bitstream Vera Sans has priority over Arial Unicode MS. Bitstream Vera Sans indeed looks like what Internet Explorer displays now, and it is devoid of special characters more "exotic" than Čč. It is not a Unicode font!!! It is even worse than plain Arial (which has, for example, basic Greek and Cyrillic)! Please remove it! *wince* *wail*
(The alternative, of course, would be that I and everyone else with both Windows and OpenOffice delete that font from their computers. Surely deleting it from the IPA template would make more sense.)
Yours truly
David Marjanović | david.marjanovic_at_gmx.at | 00:06 CEST | 2006/5/15
Addendum: These strangenesses do not happen with {{unicode}} and {{latinx}}. These templates do not have Bitstream Vera Sans, as shown in Template_talk:Polytonic. Accordingly, it's indeed Bitstream Vera Sans that is the culprit.
David Marjanović | david.marjanovic_at_gmx.at | 02:01 CEST | 2006/5/17
Hello? Anybody here? Is this page on nobody's watchlist?
David Marjanović | david.marjanovic_at_gmx.at | 00:13 CEST | 2006/5/27
- There is no font specification in this template.--MarSch 10:21, 29 May 2006 (UTC)
- Actually, yes there is (indirectly). class="IPA" triggers a stylesheet rule, which should be changed. Shinobu 20:27, 29 May 2006 (UTC)
I removed Bitstream Vera from the .Unicode and .IPA classed. I wonder how it crept in there in the first place? —Ruud 00:50, 11 June 2006 (UTC)
- Here's how. --cesarb 04:17, 18 June 2006 (UTC)
- Thank you very much!!!
- David Marjanović | david.marjanovic_at_gmx.at | 16:32 CEST | 2006/7/17
[edit] Category
What exactly do we anticipate the category being used for? This is a meta-category and should properly be on the talk page, if a category is needed at all. But I would think what links here would be just as good. Christopher Parham (talk) 23:29, 1 August 2006 (UTC)
- Never mind, I think. Christopher Parham (talk) 03:59, 4 August 2006 (UTC)
[edit] Māori version of the template made
mi:Template:IPA on the Māori wiki (mi), for use on mi:Takuu, an article I am developing, and on upcoming linguistics-related articles. I have made it a protected template. I can't add the interwiki here since I am not a sysop on en. Cheers Kahuroa 05:17, 9 August 2006 (UTC)
[edit] Bambara Wikipedia
Is this be needed for the Bambara Wikipedia? Guaka 00:41, 29 August 2006 (UTC)
[edit] Linking, again
Hi, I propose a new template to link to articles using an IPA anchor. A preliminary version is available at {{User:Kjoonlee/tl}}. It uses the "nounderlines" class to stop underlines from being displayed.
Usage: {{User:Kjoonlee/tl|Target article|/aj pi ej/}}
You can see Elder Futhark to see why this might be needed. --Kjoonlee 07:13, 20 October 2006 (UTC)
- But what should we call this template? Template:IPA2 is already taken and IPA3 isn't very easy to remember. Template:IPA link, perhaps?
- Another reason this sort of template might be needed: Northern cities vowel shift can link to the vowels directly. --Kjoonlee 09:16, 21 October 2006 (UTC)
Doh. Template isn't really needed, since class="IPA" is now sufficient to suppress underlines and {{IPA|[[Voiceless alveolar fricative|[ɵ]]]}} syntax does the job. --Kjoonlee 09:38, 21 October 2006 (UTC)
[edit] Yet more linking: a proposal
I have an idea which I call "IPA Quickhelp templates" for making IPA symbols more comprehensible, like this: ʒ (try rolling over that with your mouse). That is, {{Ʒ}}. Currently it doesn't work with popups, I'm hoping to fix that. This is an improvement over the "linking" mentioned above for two reasons:
- The tooltip text that it shows is a redirect with a non-jargon name, so the average person who doesn't know all the IPA symbols (I consider myself savvy and I know maybe half by sight) and who doesn't know what "fricative" means can figure it out by just holding the mouse over each symbol in turn.
- The process of adding an alias is handled by a template and so requires much less typing and thought and linkchecking.
To discuss the concept, go here: template talk:Ʒ.--Homunq 04:38, 7 December 2006 (UTC)