Template:char: Difference between revisions

From Thesaurus Inscriptionum Raeticarum
Jump to navigationJump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:


=== Usage ===
=== Usage ===
*The first parameter must be the transliteration, each character written as its character variant and separated by space or comma.
*The first parameter must be the transliteration, each character written as its [[Property:character variant|character variant]] and separated by space or comma.
*The second (optional) parameter defines the writing direction. Use <code>d</code> for dectroverse sequences, anything else or nothing for sinistroverse ones.
*The second (optional) parameter defines the writing direction. Use <code>d</code> for dectroverse sequences, anything else or nothing for sinistroverse ones.
*Single dextroverse characters against a generay sinistroverse writing direction can be defined by adding a <code>d</code>. (The other way round is not possible.)
*Single dextroverse characters against a generay sinistroverse writing direction can be defined by adding a <code>d</code>. (The other way round is not possible.)
*Upper and lower case letters are allowed.
*Upper and lower case letters are allowed.
*You may use <code>punctuation</code> or <code>:</code> and <code>space</code> or <code>_</code> equally.
*You may use <code>punctuation</code> or <code>:</code>, <code>symbol</code> or <code>$</code>, and <code>space</code> or <code>_</code> equally.
*[[Property:character]] will <u>not</u> be defined.
*[[Property:character]] will <u>not</u> be defined.


=== Examples ===
=== Examples ===
*The code <code><nowiki>{{char|s3 l a4 n2 i a4 i :2 u e r2 k2 a4 l a4 i :2 p a4 l a4}}</nowiki></code> will display {{char|s3 l a4 n2 i a4 i :2 u e r2 k2 a4 l a4 i :2 p a4 l a4}}
*The code <code><nowiki>{{char|s2 l a4 n2 i a4 i :2 u e r2 k2 a4 l a4 i :2 p a4 l a4}}</nowiki></code> will display {{char|s2 l a4 n2 i a4 i :2 u e r2 k2 a4 l a4 i :2 p a4 l a4}}
*The code <code><nowiki>{{char|k a6 t u3 a9|d}}</nowiki></code> will display {{char|k a6 t u3 a9|d}}
*The code <code><nowiki>{{char|k a6 t u3 a9|d}}</nowiki></code> will display {{char|k a6 t u3 a9|d}}
*The code <code><nowiki>{{char|a r i u a2 n e p a2 s2 :2 s2d i t4 e ś}}</nowiki></code> will display {{char|a r i u a2 n e p a2 s2 :2 s2d i t4 e ś}}
*The code <code><nowiki>{{char|a r i u a2 n e p a2 s2 :2 s2d i $ e ś}}</nowiki></code> will display {{char|a r i u a2 n e p a2 s2 :2 s2d i $ e ś}}


__NOTOC__
__NOTOC__
[[Category:Text Module]]
[[Category:Text Module]]
</noinclude><includeonly>{{#vardefine: values | {{lc:{{{1|}}} }} }}{{#vardefine: direction | {{{2|}}} }}{{#ifeq: {{#var: direction }}|d||{{#vardefine: direction |}} }}{{#vardefine: values | {{#replace: {{#var: values }}|space|_}} }}{{#vardefine: values | {{#replace: {{#var: values }}|punctuation|:}} }}{{#vardefine: values | {{#replace: {{#var: values }}| |,}} }}{{#vardefine: values | {{#replace: {{#var: values }}|,,|,}} }}{{#vardefine: i | 0 }}{{#vardefine: ok | 1 }}{{#while:
</noinclude><includeonly>{{#vardefine: values | {{lc:{{{1|}}} }} }}{{#vardefine: direction | {{{2|}}} }}{{#ifeq: {{#var: direction }}|d||{{#vardefine: direction |}} }}{{#vardefine: values | {{#replace: {{#var: values }}|space|_}} }}{{#vardefine: values | {{#replace: {{#var: values }}|punctuation|:}} }}{{#vardefine: values | {{#replace: {{#var: values }}|symbol|$}} }}{{#vardefine: values | {{#replace: {{#var: values }}| |,}} }}{{#vardefine: values | {{#replace: {{#var: values }}|,,|,}} }}{{#vardefine: i | 0 }}{{#vardefine: ok | 1 }}{{#while:
   | {{#ifexpr: {{#var: ok }} = 1 | true }}
   | {{#ifexpr: {{#var: ok }} = 1 | true }}
   |<nowiki/>{{#ifeq: {{#var: direction }} |d|{{#vardefine: entry | {{#explode: {{#var: values }}|,| {{#var: i }} }} }}|{{#vardefine: entry | {{#explode: {{#var: values }}|,| -{{#expr:{{#var: i }}+1}} }} }} }}{{#ifeq: {{#var: entry }}||{{#vardefine: ok | 0 }}|{{#vardefine: entry | {{ucfirst:{{#var: entry }} }} }}{{#vardefine: entry | {{#replace: {{#var: entry }}|:|punctuation}} }}{{#vardefine: entry | {{#replace: {{#var: entry }}|_|space}} }}
   |<nowiki/>{{#ifeq: {{#var: direction }} |d|{{#vardefine: entry | {{#explode: {{#var: values }}|,| {{#var: i }} }} }}|{{#vardefine: entry | {{#explode: {{#var: values }}|,| -{{#expr:{{#var: i }}+1}} }} }} }}{{#ifeq: {{#var: entry }}||{{#vardefine: ok | 0 }}|{{#vardefine: entry | {{ucfirst:{{#var: entry }} }} }}{{#vardefine: entry | {{#replace: {{#var: entry }}|$|symbol}} }}{{#vardefine: entry | {{#replace: {{#var: entry }}|:|punctuation}} }}{{#vardefine: entry | {{#replace: {{#var: entry }}|_|space}} }}
{{c||{{#var:entry}}|{{#var:direction}} }}{{#vardefine: i | {{#expr: {{#var: i }} + 1 }} }} }} }}</includeonly>
{{c||{{#var:entry}}|{{#var:direction}} }}{{#vardefine: i | {{#expr: {{#var: i }} + 1 }} }} }} }}</includeonly>

Latest revision as of 20:05, 12 May 2016

This template serves to display sequences of "North Italic" characters. To do so, it uses the Template:c.

Usage

  • The first parameter must be the transliteration, each character written as its character variant and separated by space or comma.
  • The second (optional) parameter defines the writing direction. Use d for dectroverse sequences, anything else or nothing for sinistroverse ones.
  • Single dextroverse characters against a generay sinistroverse writing direction can be defined by adding a d. (The other way round is not possible.)
  • Upper and lower case letters are allowed.
  • You may use punctuation or :, symbol or $, and space or _ equally.
  • Property:character will not be defined.

Examples

  • The code {{char|s2 l a4 n2 i a4 i :2 u e r2 k2 a4 l a4 i :2 p a4 l a4}} will display A4 sL sA4 sP spunctuation2 sI sA4 sL sA4 sK2 sR2 sE sU spunctuation2 sI sA4 sI sN2 sA4 sL sS2 s
  • The code {{char|k a6 t u3 a9|d}} will display K dA6 dT dU3 dA9 d
  • The code {{char|a r i u a2 n e p a2 s2 :2 s2d i $ e ś}} will display Ś sE ssymbol sI sS2d spunctuation2 sS2 sA2 sP sE sN sA2 sU sI sR sA s