Template:Character info/documentation: Difference between revisions
m (Changed links to point to Wiktionary) |
m (Text replacement - "(\[\[)w:(.+?\|.+?\]\])" to "\1Wikipedia:\2") |
||
Line 9: | Line 9: | ||
; {{para|1}}, {{para|codepoint}} | ; {{para|1}}, {{para|codepoint}} | ||
: Chooses the Unicode code point to display. Normally you can leave this empty, and it generates the infobox from the page title. However, there are times when the article title is not the desired character, and even when it is, this method will occasionally generate an error with a pre-composed Unicode character. There are three ways to specify the character to be displayed, which will also work around the error message. Using {{wt|Ç}} as an example, these are: | : Chooses the Unicode code point to display. Normally you can leave this empty, and it generates the infobox from the page title. However, there are times when the article title is not the desired character, and even when it is, this method will occasionally generate an error with a pre-composed Unicode character. There are three ways to specify the character to be displayed, which will also work around the error message. Using {{wt|Ç}} as an example, these are: | ||
:* {{temp|character info|Ç}} (actual character; [[ | :* {{temp|character info|Ç}} (actual character; [[Wikipedia:HTML entity|HTML entity]] is also allowed) | ||
:* {{temp|character info|0xC7}} (hexadecimal codepoint, starting with "0x") | :* {{temp|character info|0xC7}} (hexadecimal codepoint, starting with "0x") | ||
:* {{temp|character info|199}} (decimal codepoint) | :* {{temp|character info|199}} (decimal codepoint) |
Latest revision as of 04:45, 30 August 2024
This template shows an infobox with Unicode character information, using the show
function in Module:character info.
Parameters
|sc=
- Specifies the script code. The code is used to get the script category and apply the CSS class.
|nocat=1
- Suppresses putting the page in the script category. Categorisation is applied only to entry pages (main and Appendix namespaces).
|1=
,|codepoint=
- Chooses the Unicode code point to display. Normally you can leave this empty, and it generates the infobox from the page title. However, there are times when the article title is not the desired character, and even when it is, this method will occasionally generate an error with a pre-composed Unicode character. There are three ways to specify the character to be displayed, which will also work around the error message. Using Ç as an example, these are:
{{character info|Ç}}
(actual character; HTML entity is also allowed){{character info|0xC7}}
(hexadecimal codepoint, starting with "0x"){{character info|199}}
(decimal codepoint)
|caption=
- Sets the caption below the image.
To reduce memory usage on high-memory pages, such as 生, simply enter {{#subst:character info/save memory|codepoint=|next_codepoint=|previous_codepoint=}}
with the code points filled in. This removes the dependency on subpages of Module:Unicode data. The parameters that are automatically filled in are the following:
|name=
,|previous_codepoint_name=
,|next_codepoint_name=
- The name of the code point.
|image=
- Image. Set to the empty string (or whitespace) to indicate that there is not an image.
|block=
- Name of the Unicode block that the character is found in.
|previous_codepoint=
,|next_codepoint=
- The nearest previous and next code points that are not in the General Category of Other (C), except for formatting characters (Cf). Pass them in the same format as
|1=
or|codepoint=
. |sc=
,|previous_codepoint_sc=
,|next_codepoint_sc=
- The Wiktionary script code for the current, previous, or next code point.
|combining=
,|previous_codepoint_combining=
,|next_codepoint_combining=
- Whether the current, previous, or next code point is combining.
|printable=
,|previous_codepoint_printable=
,|next_codepoint_printable=
- Whether the current, previous, or next code point is printable.
|previous_codepoint_title=
,|next_codepoint_title=
- The title where the previous or next code point is described. There are two special values:
self
means the title is the same as the character; an empty parameter (or parameter containing only whitespace) means there is no page to link to.
Template placement
Place this template right at the top of the entry, including above {{also}}
whenever applicable. (if the order were inverted, this would cause a blank space to appear above {{character info}}
)
This is correct:
{{character info}} {{also|...}} ==Translingual== ===Symbol=== {{mul-symbol}} # Sense 1.
Collapsable list
Use {{character info/var}}
for extended an list of variant characters, each separated by a pipe.
CSS
The CSS for this template is located at Template:character info/style.css.