Template:Interlinear/doc

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Basic usage[edit]

This template formats a linguistic interlinear glossed text:

{{interlinear|lang=jig
|Nginda-rni ngaja-mi jurliji-rdarra diyim ka-rdu
|DEM(M)-FOC see-IRR bird-PL fly 3SG-go
|'Look at all the birds flying!'}}

Nginda-rni

DEM(M)-FOC

ngaja-mi

see-IRR

jurliji-rdarra

bird-PL

diyim

fly

ka-rdu

3SG-go

Nginda-rni ngaja-mi jurliji-rdarra diyim ka-rdu

DEM(M)-FOC see-IRR bird-PL fly 3SG-go

'Look at all the birds flying!'

Important: On lines to be interlinearised, any wiki markup or templates should not span word boundaries. Мarkup or templates that apply to a sequence of words must be repeated for each word: (It is also possible to apply formatting to an entire line, see below)

{{interlinear|italics2=yes
|Te ni-ke'''koo''' '''te̱e''' '''ún'''
|And past-arrived.PL man he
|"The men arrived"}}

Te

And

ni-kekoo

past-arrived.PL

te̱e

man

ún

he

Te ni-kekoo te̱e ún

And past-arrived.PL man he

"The men arrived"

The characters <, > and = should not be used directly. They can be substituted as follows:

Character Substitute
< &lt;
> &gt;
= {{=}}

To let a multi-word expression be treated as a single word, surround it in {curly brackets}. Similarly, use {} for an empty word:[1]

{{interlinear|lang=nl
|Dit is een voorbeeldje in het Nederlands
|This is a {little example} in {} Dutch.|}}

Dit

This

is

is

een

a

voorbeeldje

little example

in

in

het

 

Nederlands

Dutch.

Dit is een voorbeeldje in het Nederlands

This is a {little example} in {} Dutch.

The template can be invoked with any number of unnamed parameters, which are interpreted as lines of text. If there is only one unnamed parameter, then it will be rendered in-line and treated as a gloss line: {{interlinear|house-ATTR master-ABS}} gives: house-ATTR master-ABS. If they are more than one, then all will be interlinearised except the last one, which is assumed to be the free translation. To force the interlinearisation of all lines, supply an empty last unnamed parameter:

{{interlinear|lang=zap
|Ù-dììny 	Juáàny 	bèʔcw.
|COMPL-hit 	Juan 	dog|}}

Ù-dììny

COMPL-hit

Juáàny

Juan

bèʔcw.

dog

Ù-dììny Juáàny bèʔcw.

COMPL-hit Juan dog

Layout[edit]

A line of text to be displayed above the interlinear block is given using |top=, one to be displayed immediately below the free translation is set using |bottom=. Example numbering can be set using |number=. The parameter consists in one or more characters to be displayed in the left margin.

{{interlinear|number=(15a)|top=''Kʼetʼuq ɣˤay ħaƛułxo.''
|kʼetʼu-q ɣˤay ħaƛu-'''ł'''-xo
|cat-POSS:ESS milk:ABS drink-'''POT'''-PRS
|"The cat can drink milk."}}
(15a)
Kʼetʼuq ɣˤay ħaƛułxo.

kʼetʼu-q

cat-POSS:ESS

ɣˤay

milk:ABS

ħaƛu-ł-xo

drink-POT-PRS

kʼetʼu-q ɣˤay ħaƛu-ł-xo

cat-POSS:ESS milk:ABS drink-POT-PRS

"The cat can drink milk."

The indentation of the interlinear block (measured in ems) can be modified using |indent=. The default value is 3 if |number= is set, and 0 otherwise.

The spacing between consecutive word stacks can be adjusted using |spacing=; it is measured in ems and its default value is 1. To visually set off the interlinear display from surrounding text, the |box=yes parameter can be used. It surrounds the whole interlinear text in a box with a wikitable-like background colour.

{{interlinear|lang=jig|spacing = 3| box = yes
|Nyama-baji imimikin-bili-rni-rni ardalakbi-wurru-ju
|DEM-PL old.woman-ANIM.DU-F-ERG hot-3PL-do
|'The two old women feel hot.'}}

Nyama-baji

DEM-PL

imimikin-bili-rni-rni

old.woman-ANIM.DU-F-ERG

ardalakbi-wurru-ju

hot-3PL-do

Nyama-baji imimikin-bili-rni-rni ardalakbi-wurru-ju

DEM-PL old.woman-ANIM.DU-F-ERG hot-3PL-do

'The two old women feel hot.'

To add a comment after a given line, use |cN= (where N is the sequence of the line: the content of |c1= will be appended at the end of first line, |c2= – at the end of the second line etc.):

{{interlinear
|Shte da e vidiyal
|FUT COMPL AUX see.PTC.M.SG
|'He must have seen it.'
|c1 = (rare in spoken usage)}}

Shte

FUT

da

COMPL

e

AUX

vidiyal

see.PTC.M.SG

(rare in spoken usage)

 

Shte da e vidiyal

FUT COMPL AUX see.PTC.M.SG

'He must have seen it.'

Line formatting[edit]

Formatting can be set for an entire line using the |styleN= parameter, which applies CSS style properties[2] to line N (|style1= for the first line, |style2= for the second one, etc):

{{interlinear|style1 = font-size:120%|style2 = color:DarkMagenta;
|Įxę̀ę eya ı̨-lè
|yesterday sick/painful PFV.3.SBJ-COP.PFV
|'Yesterday he was sick.'}}

Įxę̀ę

yesterday

eya

sick/painful

ı̨-lè

PFV.3.SBJ-COP.PFV

Įxę̀ę eya ı̨-lè

yesterday sick/painful PFV.3.SBJ-COP.PFV

'Yesterday he was sick.'

Similarly, CSS classes[3] can be specified for line N using |classN=. Classes should be given without any quotation marks.

Italics are by default applied to the first line, unless disabled by |italics1=no. Any line can be italicised using |italicsN=yes (where N is the number of the line). On italicised lines, tone numbers[4] will be formatted as superscripts, unless |tone-superscripting= is set to no. To turn off italics for a particular word within an italicised line, use {{noitalic}}.

To specify the language of a given line, you can use |langN= (with N being 1 for the first line, 2 for the second one etc.).[5] The parameter should be the ISO code of the language, as in the familiar Template:Lang. If the unnumbered |lang= is given, then it is applied to the first line. If line N employs IPA, then the effect of Template:IPA can be mimicked by setting |ipaN=yes.[6] If transliteration has been used, then the transliteration scheme can be specified with the |translN= parameter (similarly to Template:Transl).

Glossing abbreviations[edit]

Linguistic glosses typically abbreviate grammatical category labels, like this: ACC, instead of the full name 'accusative'. The line containing such glosses is specified using |glossingN=yes (where N is the number of the line within the interlinear text). If no line is specified, then it is assumed such glosses are found in the second line (this can be bypassed with |glossing2=no). Within the lines so specified, any sequence of upper case letters will be interpreted as a grammar gloss and formatted in small caps.

Additionally, the template will attempt to recognise the meaning of each abbreviation: it is looked up in the table of abbreviations, and if found there, it will be formatted with a dotted underline and the "label" of this abbreviation will be displayed in a tooltip, like this: DAT. Alternatively, the abbreviation can be turned into a link to the wikipedia article about the corresponding grammatical category, like this: DAT. To choose the latter behvaiour, use the following parameter: |glossing=link. It is possible for separate lines to employ different styles, in this case the parameters used will be |glossing2=, |glossing3=, etc.

If a particular glossing abbreviation is to be treated differently from the rest, then {{gcl}} can be used:

{{interlinear|ngagun-yi nga-nanda-yi nung
|{{gcl|1sg}}.NOM-{{gcl|ERG||}} {{gcl|1sgA|1st-person singular "agent"}}.3sgO-see-{{gcl|'''P'''ST}} {{gcl|3sg}}.ACC
|'I saw him/her.'}}

ngagun-yi

1sg.NOM-ERG

nga-nanda-yi

1sgA.3sgO-see-PST

nung

3sg.acc

ngagun-yi nga-nanda-yi nung

1sg.NOM-ERG 1sgA.3sgO-see-PST 3sg.acc

'I saw him/her.'

In this example, {{gcl|acc}} marks up acc as a glossing abbreviation (it wouldn't have otherwise been interpreted as such because it is lower-case). {{gcl|1sgA|1st-person singular "agent"}} is used to define the meaning of the unusual abbreviation 1sgA, which wouldn't be recognised even in upper case. {{gcl|ERG||}} displays the abbreviation as a link to the Wikipedia article. {{gcl|'''P'''ST}} applies formatting to a part of a glossing abbreviation; if {{gcl}} weren't used here then the wikimarkup would have forced P to be treated as a separate abbreviation from ST.

If the grammatical category labels are not abbreviated but written out in full (like that: ACCUSATIVE) then |glossing= should be set to no abbr, which will only apply small-caps formatting:

{{interlinear|glossing=no abbr
|wǒ yǐjing jiàn-guò {Zhāng Sān} le.
|I already see-EXPERIENTIAL {Zhang San} RESULTATIVE.|}}

I

yǐjing

already

jiàn-guò

see-EXPERIENTIAL

Zhāng Sān

Zhang San

le.

RESULTATIVE.

wǒ yǐjing jiàn-guò {Zhāng Sān} le.

I already see-EXPERIENTIAL {Zhang San} RESULTATIVE.

Additional style[2] parameters can be applied to all gloss abbreviations using |glossing-style=. The default formatting using small caps can be disabled with |small-caps=no, and the default underlining can be turned off using |underline=no. To exempt a particular abbreviation from being treated as a grammatical gloss, use {{no gloss}}.

The pesky boxes with glossing messages that are shown in preview mode can be turned off with |display-messages=no.

Custom abbreviations[edit]

When an individual abbreviation is not recognised, or it is necessary to use it with a meaning different from the standard one, then one way is to format each instance with {{gcl}}, as seen above. A second option is to supply a list of custom glossing abbreviations using |abbreviations= (or |ablist=). These will be applied to all (upper-case) glossing abbreviations detected by the template. The list of custom abbreviations takes the format: ABBREVIATION1:meaning1:wikipedia_article1; ABBREVIATION2:meaning2:wikipedia_article2... (specifying a Wikipedia article is optional and has no effect unless |glossing=link):

{{interlinear|abbreviations=RES:resultative; EXP:experiential aspect
|wǒ yǐjing jiàn-guò {Zhāng Sān} le.
|I already see-EXP {Zhang San} RES.|}}

I

yǐjing

already

jiàn-guò

see-EXP

Zhāng Sān

Zhang San

le.

RES.

wǒ yǐjing jiàn-guò {Zhāng Sān} le.

I already see-EXP {Zhang San} RES.

If an abbreviation is commonly used and umabiguous, then the template can be set up to recognise it natively by the addition of an entry to the module's data page.

Troubleshooting[edit]

This is a list of problems that are likely to be encountered:

  • One of the lines went missing.
    Does this line contain anywhere an equals sign? If yes, then all instances of the equals sign should be replaced with {{=}}.
  • I've applied bolding/italics to a phrase and now the formatting is all over the place.
    Any formatting should be applied separately to each word.
  • I receive the error "Mismatch in the number of words".
    Interlinearised lines don't contain the same number of words. If this is intended, then consider filling the empty slots with {}. If this is not intended, then the following points might help track down the cause:
    • if formatting or a template is applied to a piece of text then this text is treated as a single word:
    • non-breaking spaces are not treated as word separators;
    • if a sequence of words is enclosed in {curly brackets} then it's treated as a single word.
  • I receive the error "Unknown glossing abbreviation(s)".
    See above for details, but in short:
    • If this was not intended as a glossing abbreviation, enclose it in {{no gloss}}.
    • To set the meaning of one instance of a glossing abbreviation, format that instance with {{gcl}}, for example {{gcl|PF|perfective aspect}}.
    • If the abbreviation occurs several times within the same example then it might be easier to use the |abbreviations= parameter, for example: |abbreviations=PF:perfective aspect.

Notes[edit]

  1. ^ An alternative in each case is to use a non-breaking space: the example sentence would then be: This is a little&nbsp;example in &nbsp; Dutch.
  2. ^ a b See https://www.w3schools.com/html/html_styles.asp, with the caveat that not all html features are available in wikitext, see Help:HTML in wikitext.
  3. ^ See WP:CLASS for a list of available classes. See also Help:User style for setting up customised display of classes.
  4. ^ Any single digit following an alphabetical character is treated as a tone number.
  5. ^ At this stage, the resulting behaviour does not necessarily match that of the {{lang}} template/s.
  6. ^ This only applies the IPA CSS class.

See also[edit]

  • {{fs interlinear}}, a version of this template which makes it easier to set up glosses with separate lines for a foreign-script text and a transliteration
  • {{gcl}}, for formatting individual glossing abbreviations