User:Sarri.greek/ref templates

From Wiktionary, the free dictionary
Jump to navigation Jump to search

Sarri.greektalk ref - audio - notes - nouns - verbs - αβγόαἴρω/αἱρῶΤ' αστέρι του βοριά (song)
CATpg.en :: @elpg.elfontstesttest1vern.labverbs.testtArT1·aT3, T4menu


Reference templates

Intro

[edit]

Data

[edit]

The title and data of a dictionary or other work

Principles


[edit]

IF lemma is marked

  • quote-book puts it at end, as in printed citations
  • or place it first, like the linked similars.

IF general text is marked

  • put at end, as in printed citations


top of page

[edit]

With automatic link to a lemma word (= the PAGENAME or lemma= choice or other word

  • place at beginning, unlike printed citations. Principle: Put first what reader needs to click immediately. (many more links to wikipedia for author, work follow)

Examples link auto

codes

[edit]

{{#expr:{{#invoke:ugly hacks|match|{{{page|{{{pages}}}}}}|[0-9]+}}

Magic words are enclose between TWO curly brackts like {{PAGENAME}}

function export.match(frame)
	return (mw.ustring.match(frame.args[1] or "", frame.args[2] or ""))
end

It says, translated in wikitext: ?? what are these numbers??


??



top of page What I need in wikitext for an automatic lemma: [linkuurl show p.xxxx]

  • and what is urlencode?? Magic word {{urlencode:string}} Encodes string for use in URL query strings; {{urlencode:test string}}, for example, produces: test+string. To encode string for use in URL paths or MediaWiki page names, append, respectively, |PATH or |WIKI (to produce "test%20string" or "test_string").
    Does it always work ok? Does it cause problems??
    ...

write p.xxxx or page + nobreak + xxxx Otherwise, it may break line.

[xxxx{{urlencode:{{{1|{{PAGENAME}}}}}}} page {{{2|{{{1|{{PAGENAME}}}}}}}}]

or, no urlencode

[xxxx{{{1|{{PAGENAME}}}}} p.{{{2|{{{1|{{PAGENAME}}}}}}}}]

it says

[{{#if:{{{1|}}}|{{{1|}}}|{{PAGENAME}} p.{{#if:{{{2|}}}|{{{2|}}}|{{#if:{{{1|}}}|{{{1|}}}|{{PAGENAME}}}}}}]

in detail

....<!--
link to 1 (page number or could be called lemma= or page=
-->{{#if:{{{1|}}}<!-- suppose there is a 1
1 yes if editor adds 1st position
	-->|{{{1|}}}<!-- write it
	-->|{{PAGENAME}}<!-- if not, just write the magic word PAGENAME
-->}}<!-- close 1 link

show the 2nd position - could be named alt= or show=)
2 yes if editor adds 1st position
-->{{#if:{{{2|}}}<!-- if  2nd position
	-->|{{{2|}}}<!-- if editor adds a 2nd position (1yes, 2yes), show it
	-->|{{#if:{{{1|}}}<!-- if 1
		-->|{{{1|}}}<!-- if editor has written a 1st position (1yes, 2yes), show it (as well as linking it)
		-->|{{2|}}}<!-- if he has not, (1no, 2no) write his choice2, while linking the magic word PAGENAME
	-->}}<!-- close if2


top of page

[edit]

A ref with link to a page or lemma or page, lemma which has to be added by editor after checking the pagenumber, or the id of the lemma.

Examples with manual lemma
with cite-book



top of page