Jump to content

Template:col

From Wiktionary, the free dictionary

    Usage

    This template creates a balanced, columnar, auto-sorting, auto-collapsing table and may be used to replace more specific templates such as {{col2}}, {{col3}}, {{col4}}, {{col5}} and {{col-top}}/{{col-bottom}}. By default, the template has the following features:

    1. The terms are automatically sorted. Use |sort=0 or |sort=n to turn this off. (NOTE: Currently, Japanese script languages such as Japanese, Okinawan and Miyako are not sorted by default, because automated sorting doesn't yet work properly for these languages. Specifically, sorting is done by pronunciation, which requires that the page in question be looked up to find the pronunciation, and this functionality is not yet implemented completely.)
    2. The terms by default are displayed partly collapsed, with only the first three rows visible and a "Show more" button at the bottom to expand the table and show the rest. (However, there is a setting in Preferences to change this and make all tables be fully displayed by default.) Use |collapse=0 or |collapse=n to turn off default collapsing.
    3. The number of columns is auto-selected. The algorithm implemented currently is fairly simple and just uses the number of rows to determine the number of columns, increasing the number of columns up to 5 as the number of rows increases. However, this is likely to change in the future. Use |n= to force a specific number of columns, e.g. |n=4 for 4 columns.
    4. Duplicates are automatically removed.

    Parameters

    |1= (required)
    Language code of the terms; see Wiktionary:List of languages. The parameter |lang= is a deprecated synonym; please do not use. If this is used, all numbered parameters move down by one.
    |2=, |3=, ...
    Terms to insert into the table. The following characteristics are of note:
    1. Individual terms can specify transliterations, glosses and other modifications inline using the inline modifier syntax, e.g. Изабе́лла<tr:Izabɛ́lla><t:Isabelle>; see below.
    2. Multiple comma-separated terms can be given (provided there is no space after the comma), and will be displayed next to each other, comma-separated. You can also separate terms with a tilde (~), which will be displayed as such (with spaces around the tilde).
      • Each comma-separated or tilde-separated term can have its own set of attached inline modifiers.
      • The intent of multiple terms in a single row is to list variants or alternative forms of the same term (e.g. different spellings with the same meaning). The tilde in particular should be used only for equivalent, closely related forms.
      • An example of using both delimiters is Ukrainian ви́прохати<g:pf>,випро́шувати<g:impf>~випро́хувати<g:impf>, using the comma to separate the perfective and corresponding imperfective verbs and the tilde to separate two equivalent imperfective verbs.
      • If you need to prevent a comma or tilde from being interpreted as a delimiter, surround the term in square brackets, e.g. [[1,6-Cleves acid]] or [[Micros~1]].
    3. You can prefix an individual term with a one or more language codes (see Wiktionary:List of languages) followed by a colon (and no space after the colon). This can be used if the term is not in the language specified in |1=. Separate multiple languages with a plus sign (+). The language(s) in question will be displayed after the term as a qualifier, unless the language is Translingual or is the same as the language in |1=. In general, use this sparingly and normally only for closely-related languages. See the example below.
    |n=
    Number of columns. If omitted, the module attempts to auto-determine the number of columns. Currently it uses a simple algorithm based on the number of items, but in the future it may use something more sophisticated.
    |title=
    Used to add a title.
    |sort=
    Use |sort=0 to suppress auto-sorting of the contents. To sort the list manually using the same rules as {{col}}, use {{subst:sort}}.
    |sc=
    Specifies the script code of all the terms in the table. This is rarely needed. It can be used for instance in Translingual entries that contain lists of cuneiform characters, where notating the script with <sc:Xsux> for every term would be overly verbose.
    |collapse=
    Use |collapse=0 to suppress auto-collapsing.
    |keepfirst=
    Specifies a number of rows at the beginning to exclude from sorting. Defaults to 0.
    |keeplast=
    Specifies a number of rows at the end to exclude from sorting. Defaults to 0.

    Example

    basic example

    {{col|en|day job|calendar day|daycare|a broken clock is right twice a day|daylight|all-day|as the day is long|Canada Day|daily|day after day|daybreak|daydream|day in, day out|day laborer|daylily|day nursery|day off|day of reckoning|day one|daypart|day school|daystar}}

    results in

    example with prefixed language codes

    This comes from Thesaurus:抽籤, for the verb sense "to draw lots; to cast lots; to draw straws".

    {{col3|zh|抽籤|抓鬮|拈鬮|hak:抽籤仔|hak:拈籤仔|mnp+nan-hbl:抽鬮|nan-tws:抾鬮}}

    results in

    The prefix mnp+nan-hbl, for example, refers to two languages, Northern Min (code mnp) and Hokkien (code nan-hbl), which are displayed after the term as qualifiers. (If the term gives explicit right qualifiers, the language qualifiers come after the explicitly-given ones.)

    Inline modifiers

    Use a syntax like Изабе́лла<tr:Izabɛ́lla><t:Isabelle> to specify modifiers such as transliterations, glosses and qualifiers. In this example, for the Russian name Изабе́лла (Izabɛ́lla, Isabelle), the manual transliteration Izabɛ́lla and gloss "Isabelle" are given. The following modifiers are recognized; see {{link}} for the exact meaning of these modifiers.

    • t: gloss
    • tr: transliteration
    • ts: transcription, for languages where the transliteration and pronunciation are markedly different
    • q: left qualifier, e.g. <q:neither sexual nor romantic in nature> (in reference to platonic love); this appears before the term, parenthesized and italicized
    • qq: right qualifier; this appears after the term, parenthesized and italicized
    • l: comma-separated left labels, e.g. <l:rare> or <l:UK,Australia> or <l:archaic,or,dialectal>; as shown, there must not be a space after the comma for it to be recognized as a delimiter; the labels appear before the term, parenthesized, italicized and appropriately linked as if {{lb}} were used (but without categorization); an alternative syntax is to enclose the labels in <<...>>, e.g. <l:<<rare>>, <<archaic>> or <<dialectal>>>
    • ll: comma-separated right labels; these appear after the term, parenthesized, italicized and appropriately linked as for left labels
    • ref: reference or references, using the syntax documented in Template:IPA#References
    • g: comma-separated list of gender/number specifications; see Module:gender and number for the complete list
    • alt: alternative display text
    • pos: part of speech
    • lit: literal meaning
    • id: sense ID; see {{senseid}}
    • sc: script code

    Examples

    example in Latin script, with glosses
    {{col|io|n=2
    |novo<t:a newcomer>
    |novajo<t:a new thing, novelty>
    |nove<t:newly, freshly>
    |novyaro<t:New Year>
    |novyara<t:New Year>
    |novigar<t:to innovate>
    |novero<t:innovator>
    }}
    

    results in

    example in non-Latin script, with transliterations and glosses
    {{col|fa
    |حرف اضافه<tr:harf-e ezâfe><t:preposition>
    |حرف ربط<tr:harf-e rabt><t:conjunction>
    |حرف زدن<tr:harf zadan><t:to speak>
    |حرف انداختن<tr:harf andâxtan>
    |پرحرف<tr:por-harf>
    |کم‌حرف<tr:kam-harf>
    }}
    

    results in

    example that must remain unsorted
    {{col|eo|sort=0<!-- by number of sides -->
    |dulatero<t:[[digon]]>
    |triangulo<t:[[triangle]]>
    |kvarlatero<t:[[quadrilateral]]>
    |kvinlatero<t:[[pentagon]]>
    |seslatero<t:[[hexagon]]>
    |seplatero<t:[[heptagon]]>
    |oklatero<t:[[octagon]]>
    |naŭlatero<t:[[nonagon]]>
    |deklatero<t:[[decagon]]>
    |dekunulatero<t:[[hendecagon]]>
    |dekdulatero<t:[[dodecagon]]>
    |dektrilatero<t:[[tridecagon]]>
    |dekkvarlatero<t:[[tetradecagon]]>
    |dekkvinlatero<t:[[pentadecagon]]>
    |dekseslatero<t:[[hexadecagon]]>
    |dekseplatero<t:[[heptadecagon]]>
    |dekoklatero<t:[[octadecagon]]>
    |deknaŭlatero<t:[[enneadecagon]]>
    |dudeklatero<t:[[icosagon]]>
    }}
    

    results in

    It is good practice to add a comment indicating how the terms are sorted if |sort=0 is used. This both helps people adding new terms and makes it clear that the use of |sort=0 is for good reason (some people use |sort=0 because of a temporary bug in the sorting algorithm for a particular language or for no clear reason, so having a reason helps prevent other editors from removing the |sort=0 in a cleanup run).

    Indentation

    You can indent individual terms by placing one or more asterisks (*) before the term in question, followed by a space. The following example illustrates this:

    {{col|sla-pro
    |*duxota<t:immateriality, transcendence>
    |*zaduxъ<t:asthma, shortness of air>
    |*vъzduxъ<t:air>
    |*dušiti<t:to sniff, to scent>
    |*duša<t:soul>
    |* *bezdušьnъ<t:heartless, soulless>
    |*duxovъ<t:aerial, spiritual>
    |* *duxovьnostь<t:spirituality>
    |* *duxovьnikъ<t:cleric>
    |* *duxovitъ<t:with high spirit>
    |{{l|sla-pro|*oduxotvoriti||to enchant}} < {{compound|sla-pro|*duxъ|*tvoriti|t2=to create|nocat=1}}
    }}
    

    which results in

    Note that there must be a space after the asterisk for it to be interpreted as an indent, and the above example shows why: if the space is missing, the term is interpreted as reconstructed.

    Sorting works correctly in the presence of indentation. Specifically, each sublist is "tethered" to the item above it and the result is sorted as an atomic unit; in addition, sublists are properly sorted.

    Arbitrary indentation is allowed and works correctly.

    Other examples

    An example with double indentation as well as multiple items on a line, each with inline modifiers:

    {{col|bg|n=2
    |бог-
    |* Бо́гдан<g:m>,Богда́на<g:f><qq:personal names>
    |бого-
    |* Богоми́л<g:m>,Богоми́ла<g:f><qq:personal names>
    |* богови́дец<t:theopath>
    |* богосло́в,богосло́вец<t:theologian>
    |** богосло́вие<t:theology>
    |* богобо́рие<t:theomachy>
    |* богоявле́ние<t:theophany>
    |* богобоязли́в<t:fearing God>
    |* боголюби́в<t:loving God>
    |* богоноси́в<t:carrying God within>
    |* богопома́зан<t:anointed by God>
    |* богоподо́бен<t:godlike>
    |* богоуго́ден<t:god-pleasing>
    |* богочести́в<t:honoring God>
    |божи-
    |* Божида́р<g:m>,Божида́ра<g:f><qq:personal names>
    |* Божими́р<g:m>,Божими́ра<g:f><qq:personal names>
    |богу́вам<t:to act as God>
    |божи́ч,божи́к<t:God's child, little god><ll:dialectal>
    |полубо́г<t:demigod>
    |сбо́гом<t:farewell><lit:[[with]] [[God]] /instr. case/>
    |бо́жие<t:theism><ll:obsolete>
    |* еднобо́жие<t:monotheism>
    |* многобо́жие<t:polytheism>
    |* безбо́жие<t:impiety>
    |** безбо́жник<g:m>,безбо́жница<t:atheist><g:f>
    |боже́ство<t:deity>
    |* боже́ствен<t:divine>
    }}
    

    which produces

    Another example:

    {{col|eo
    |feliĉe<t:[[happily]]; [[felicitously]]>
    |feliĉo,feliĉeco<t:[[happiness]]; [[felicity]]>
    |feliĉi<t:to be [[happy]]; to be [[felicitous]]>
    |* feliĉiĝi<t:to become [[happy]]>
    |** plifeliĉiĝi<t:to become [[happier]]>
    |** malplifeliĉiĝi<t:to become less [[happy]]>
    |* feliĉigi<t:to make [[happy]]>
    |** plifeliĉigi<t:to make [[happier]]>
    |** malplifeliĉigi<t:to make less [[happy]]>
    |malfeliĉa<t:[[unhappy]]; [[unfelicitous]]>
    |malfeliĉe<t:[[unhappily]]; [[unfelicitously]]>
    |malfeliĉo,malfeliĉeco<t:[[unhappiness]]; [[misfortune]]>
    |malfeliĉi<t:to be [[unhappy]]; to be [[unfelicitous]]>
    |* malfeliĉiĝi<t:to become [[unhappy]]>
    |** plimalfeliĉiĝi<t:to become [[unhappier]]>
    |** malplimalfeliĉiĝi<t:to become less [[unhappy]]>
    |* malfeliĉigi<t:to make [[unhappy]]>
    |** plimalfeliĉigi<t:to make [[unhappier]]>
    |** malplimalfeliĉigi<t:to make less [[unhappy]]>
    }}
    

    producing

    Another example:

    {{col|az|n=2
    |qaçırmaq,qaçırtmaq<t:to kidnap>
    |qaçılmaq
    |* qaçılmaz<t:inevitable>
    |** qaçılmazlıq<t:inevitable>
    |qaçqın<t:refugee>
    |qaçaqaç<t:running about>
    |qaçış<t:run; flight; escape>
    |qaçaq<t:robber; runaway; smuggler>
    |* qaçaq-qaçaq
    |* qaçaq-quldur
    |* qaçaqbaşı
    |* qaçaqlıq
    |* qaçaqçı<t:smuggler>
    |** qaçaqçılıq
    |* qaçaqmal<t:contraband, smuggled goods>
    |** qaçaqmalçı<t:smuggler>
    |*** qaçaqmalçılıq<t:smuggling>
    }}
    

    which produces

    See also