Difference between revisions of "Template:IPA/doc"
imported>Thnidu m (Typo fix) |
imported>Edokter (→Usage: update) |
||
| Line 5: | Line 5: | ||
--> | --> | ||
=== Usage === | === Usage === | ||
| − | '''[[Template:IPA]]''' is | + | '''[[Template:IPA]]''' is useful when there are multiple instances of the [[International Phonetic Alphabet]] (IPA) on a page. It contains |
<nowiki><span title="Representation in the International Phonetic Alphabet (IPA)" class="IPA">{{{1}}}</span></nowiki> | <nowiki><span title="Representation in the International Phonetic Alphabet (IPA)" class="IPA">{{{1}}}</span></nowiki> | ||
| − | This means | + | This means it specifies a class called "IPA" as a hook for CSS styling and DOM scripting. This allows for assigning specific fonts to display IPA characters. Registered Wikipedia users can specify their own fonts for IPA text by editing their user style sheet, e.g. [[Special:MyPage/common.css]]. Users can also edit their global stylesheet ([[meta:Special:MyPage/global.css]]), which works across all projects. [[MediaWiki:Common.css]] also ensures that links inside IPA transcriptions marked up with this template do not use underlines since these carry special semantics there. |
| − | |||
| − | |||
| − | |||
| − | [[MediaWiki:Common.css]] also ensures that links inside IPA transcriptions marked up with this template do not use underlines since these carry special semantics there. | ||
=== TemplateData === | === TemplateData === | ||
Revision as of 18:20, 25 April 2016
| This is a documentation subpage for Template:IPA. It contains usage information, categories and other content that is not part of the original template page. |
| This project or template has a transwiki guide to help editors adapt it to a remote wiki when this cannot be done by simply copying the codes of one single template. See Template:IPA/doc/Transwiki guide for instructions. |
Contents
Usage
Template:IPA is useful when there are multiple instances of the International Phonetic Alphabet (IPA) on a page. It contains
<span title="Representation in the International Phonetic Alphabet (IPA)" class="IPA">{{{1}}}</span>
This means it specifies a class called "IPA" as a hook for CSS styling and DOM scripting. This allows for assigning specific fonts to display IPA characters. Registered Wikipedia users can specify their own fonts for IPA text by editing their user style sheet, e.g. Special:MyPage/common.css. Users can also edit their global stylesheet (meta:Special:MyPage/global.css), which works across all projects. MediaWiki:Common.css also ensures that links inside IPA transcriptions marked up with this template do not use underlines since these carry special semantics there.
TemplateData
TemplateData for IPA
This template ensures proper display of transcriptions using the International Phonetic Alphabet (IPA), especially in older operating systems and browsers. There are related specialized templates that also semi-automatically generate the transcription itself.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| transcription | 1 | including square brackets [...] for phonetic transcriptions or enclosing forward slashes /.../ for phonemic ones | String | required |
Examples
Placing a phonemic rendering of the word characters in Template:IPA:
{{IPA|/ˈkærəktɚz/}}
{{IPA|/[[character|ˈkærəktɚz]]/}}
The result will be a span with a class attribute, like this:
<span title="Representation in the International Phonetic Alphabet (IPA)" class="IPA">/ˈkærəktɚz/</span>
Which appears in your browser as:
- /ˈkærəktɚz/
- /ˈkærəktɚz/
Without template:IPA:
- /ˈkærəktɚz/
- /ˈkærəktɚz/
[These sets may look different if you are using Windows XP, or if you have a custom style defined for IPA text.]
Please place all IPA text into the template, even if it doesn't have any special IPA characters, like this: /mi/. This will allow users to format all examples of IPA text consistently, with their choice of fonts, colours, etc.
List of fonts
The following is a list of fonts used in Windows XP that are used using this template.
Template:Usage of IPA templates