Template:char: Difference between revisions
From Thesaurus Inscriptionum Raeticarum
Jump to navigationJump to search
Martin Braun (talk | contribs) No edit summary |
Martin Braun (talk | contribs) No edit summary |
||
Line 7: | Line 7: | ||
*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. | ||
Line 13: | Line 13: | ||
*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|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|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 | *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> |
Revision as of 18:50, 11 January 2015
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$
, andspace
or_
equally. - Property:character will not be defined.
Examples
- The code
{{char|s3 l a4 n2 i a4 i :2 u e r2 k2 a4 l a4 i :2 p a4 l a4}}
will display S3 s - The code
{{char|k a6 t u3 a9|d}}
will display - The code
{{char|a r i u a2 n e p a2 s2 :2 s2d i $ e ś}}
will display