Difference between revisions of "Template:Latin script"

From blackwiki
Jump to navigation Jump to search
imported>Хинт
(rev)
imported>DePiep
(restructuring wikitable+subtemplates (with same content & effect) see talk & /doc)
Line 1: Line 1:
<includeonly>{|class="wikitable latinalphabet" style="clear:{{{clear|both}}};margin:0.2em auto;width:{{{width|90%}}};border-collapse:collapse;"
+
{{Latin alphabet/main
|-
+
| 1={{StripWhitespace|{{{1|{{PAGENAME}}}}}}}<!-- 1= input-->
!colspan="26" style="background:#efefef;text-align:center"|{{Tnavbar-header|The [[ISO basic Latin alphabet]]|Latin alphabet}}
+
| show letter ={{Latin alphabet/determine letter|{{{1|{{PAGENAME}} }}} }}<!-- "letter X" -->
|-style="text-align:center
+
| show diacritic ={{Latin alphabet/determine diacritic<!--
|style="text-align:center;width:3.85%"|[[A|Aa]]
+
-->| {{#switch:{{lc:{{{show diacritic | {{{2|yes}}} }}} }}<!--
|style="text-align:center;width:3.85%"|[[B|Bb]]
+
-->| n|no  =no<!-- suppress any showing
|style="text-align:center;width:3.85%"|[[C|Cc]]
+
-->| y|yes ={{{2| {{{1|{{PAGENAME}} }}} }}}<!-- from unnamed input 2= or 1= or pagename
|style="text-align:center;width:3.85%"|[[D|Dd]]
+
-->| #default ={{{show diacritic|{{{2| {{{1|{{PAGENAME}} }}} }}} }}}<!-- from input sdc,2,1, pagename
|style="text-align:center;width:3.85%"|[[E|Ee]]
+
-->}} }}<!-- diacritic name OR "no" (but not a "yes") -->
|style="text-align:center;width:3.85%"|[[F|Ff]]
+
| show diacritic 2 ={{{show diacritic 2|no}}}
|style="text-align:center;width:3.85%"|[[G|Gg]]
+
| show pairs =<!--
|style="text-align:center;width:3.85%"|[[H|Hh]]
+
-->{{{show pairs|<!-- unnamed input 2=deprecated
|style="text-align:center;width:3.75%"|[[I|Ii]]
+
-->{{#switch:{{{2 |{{{1|{{PAGENAME}} }}} }}}<!--
|style="text-align:center;width:3.85%"|[[J|Jj]]
+
-->| A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z=yes<!--
|style="text-align:center;width:3.85%"|[[K|Kk]]
+
-->| #default=no}}}}}
|style="text-align:center;width:3.85%"|[[L|Ll]]
+
}}<noinclude>
|style="text-align:center;width:3.85%"|[[M|Mm]]
 
|style="text-align:center;width:3.85%"|[[N|Nn]]
 
|style="text-align:center;width:3.85%"|[[O|Oo]]
 
|style="text-align:center;width:3.85%"|[[P|Pp]]
 
|style="text-align:center;width:3.85%"|[[Q|Qq]]
 
|style="text-align:center;width:3.85%"|[[R|Rr]]
 
|style="text-align:center;width:3.85%"|[[S|Ss]]
 
|style="text-align:center;width:3.85%"|[[T|Tt]]
 
|style="text-align:center;width:3.85%"|[[U|Uu]]
 
|style="text-align:center;width:3.85%"|[[V|Vv]]
 
|style="text-align:center;width:3.85%"|[[W|Ww]]
 
|style="text-align:center;width:3.85%"|[[X|Xx]]
 
|style="text-align:center;width:3.85%"|[[Y|Yy]]
 
|style="text-align:center;width:3.85%"|[[Z|Zz]]
 
|-
 
|colspan="26" class="Unicode"|
 
{{Latin alphabet inclusion|{{{1|{{PAGENAME}}}}}|{{{2|{{{1|{{PAGENAME}}}}}}}}}}
 
{{nowrap|[[History of the Latin alphabet|history]] •}}
 
{{nowrap|[[palaeography]] •}}
 
{{nowrap|[[Latin-derived alphabet|derivations]] •}}
 
{{nowrap|[[diacritic]]s •}}
 
{{nowrap|[[punctuation]] •}}
 
{{nowrap|[[Roman numerals|numerals]] •}}
 
{{nowrap|[[Latin characters in Unicode|Unicode]] •}}
 
{{nowrap|[[List of Latin letters|list of letters]] •}}
 
{{nowrap|[[ISO/IEC 646]]}}
 
|}</includeonly><noinclude>
 
 
{{Documentation}}
 
{{Documentation}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS -->
 
 
</noinclude>
 
</noinclude>

Revision as of 16:12, 28 July 2011

Template documentation[view] [edit] [history] [purge]

Usage

Basic examples

  • Input parameter #1: À, single letter: {{Latin script|À}}

Adding the block "Letter X with diacritics"

  • When the parameter is "A" (or À: with or without diacritics), the block is added "Letter A with diacritics"
  • {{Latin script|A}}

Adding the block "Letters with diacritic ^"

  • When the parameter has a diacritic e.g. Â, the block "All letters with diacritic ^ (circumflex)" is shown.
  • When the parameter "show diacritic=" is set, that block will show: {{Latin script|A|show diacritic=grave}}
  • {{Latin script|A|show diacritic=circumflex}}

Adding the block "Pairs with Letter X"

  • When the parameter is a straight letter A-Z, the block with letter pairs is shown.
  • When the parameter show pairs=yes/no is set, the pairs will show/hide accordingly:

{{Latin script|À|show pairs=yes}}

More options

  • When the parameter show diacritic 2= is used, a second block of diacritics will be shown:
  • {{Latin script|A|show diacritic=grave|show diacritic 2=circumflex}}

Parameter list

The full parameter list:

{{Latin script
|
| show diacritic =
| show diacritic 2 =
| show letter = 
| show pairs = 
}}

Input options are:

First, unnamed parameter: (default: the PAGENAME). The input where information is derived from: which basic A-Z letter, which diacritic is used?
show diacritic: (default: derived from first parameter). Which diacritic is shown: acute, hook, ... Also: if set to show diacritic=no the diacritic blok will not be shown at all.
show diacritic 2: Allows for the block of a second diacritic being shown.
show letter: (default: determined from input 1). Sets which block "Letter X with diacritics" is shown. Also: if set to show letter=no the diacritic blok will not be shown at all.
show pairs: (default:yes if input 1 = A-Z). If set to "yes", all pairs with basic input 1-letter are shown.

Editing the template

Technical background

Template data

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Latin script

No description.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Letter/Diacritic1

The input where information is derived from: which basic A-Z letter, which diacritic is used?

Default
Defaults to ((PAGENAME))
Auto value
Stringsuggested
Diactriticshow diacritic

Which diacritic is shown: acute, hook, ... Also: if set to show diacritic=no the diacritic block will not be shown at all.

Default
This parameter defaults to the first parameter.
Stringoptional
2nd Diacriticshow diacritic 2

Allows for the block of a second diacritic being shown.

Stringoptional
Lettershow letter

Sets which block "Letter X with diacritics" is shown. Also: if set to show letter=no the diacritic block will not be shown at all.

Default
This parameter defaults to the first parameter.
Stringoptional
Pairsshow pairs

If set to "yes", all pairs with basic input 1-letter are shown.

Default
This parameter defaults to "yes" if input 1 = A-Z
Booleanoptional

See also