![]() | This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 | Archive 2 | Archive 3 | → | Archive 5 |
Template:IPA is for IPA characters only!
Template:IPA contains
<span title="Representation in the International Phonetic Alphabet (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:
Without template:IPA:
[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.
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.
In
MediaWiki:Common.css, the declaration for font-family
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)
Criteria for selecting fonts:
Less important criteria:
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.
Free Sans Free Serif Free Mono
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 your own monobook.css page after logging in.
.IPA { color: green; }
If you want to see IPA displayed in a particular font, try something like this:
.IPA { font-family: 'Charis SIL', 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.
{{IPA2|fəˈnɛɾɪk}}
renders thus: IPA:
[fəˈnɛɾɪk]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)
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.
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
font-family
or font
, 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)
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)
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?
Disadvantages:
Any comments? — Michael Z. 20:22, 2005 Jan 14 (UTC)
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
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)
In my opinion the brackets should be integrated to the Template already. Stern 07:59, 16 Mar 2005 (UTC)
... can be found here and can be copied to the english Wikipedia. Stern 08:06, 16 Mar 2005 (UTC)
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)
text-decoration: none
, but it won't work in an inline style, because the style sheet's :hover
selector is more specific. To make this work we need the co-operation of an admin who can edit
monobook.css. —
Michael
Z. 2005-05-3 15:31 ZI'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)
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; }
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
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)
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
![]() | This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 | Archive 2 | Archive 3 | → | Archive 5 |
Template:IPA is for IPA characters only!
Template:IPA contains
<span title="Representation in the International Phonetic Alphabet (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:
Without template:IPA:
[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.
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.
In
MediaWiki:Common.css, the declaration for font-family
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)
Criteria for selecting fonts:
Less important criteria:
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.
Free Sans Free Serif Free Mono
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 your own monobook.css page after logging in.
.IPA { color: green; }
If you want to see IPA displayed in a particular font, try something like this:
.IPA { font-family: 'Charis SIL', 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.
{{IPA2|fəˈnɛɾɪk}}
renders thus: IPA:
[fəˈnɛɾɪk]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)
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.
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
font-family
or font
, 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)
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)
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?
Disadvantages:
Any comments? — Michael Z. 20:22, 2005 Jan 14 (UTC)
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
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)
In my opinion the brackets should be integrated to the Template already. Stern 07:59, 16 Mar 2005 (UTC)
... can be found here and can be copied to the english Wikipedia. Stern 08:06, 16 Mar 2005 (UTC)
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)
text-decoration: none
, but it won't work in an inline style, because the style sheet's :hover
selector is more specific. To make this work we need the co-operation of an admin who can edit
monobook.css. —
Michael
Z. 2005-05-3 15:31 ZI'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)
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; }
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
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)
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