User:DutchTreat/projects/template

From Wikisource
Jump to navigation Jump to search

Hoyt Quote

[edit]

This code intended to help test for a '.' at end of author parameter. Not working. {{#if:{{{author|}}}|{{#if:{{{work|}}}|—|{{#ifexpr:{{#rpos:{{{author}}}|.}} = {{#len:{{{author}}}}}|WHO|WHAT.}}}}}}<!-- test last position via rpos of . and test equal length -->

test index

[edit]
Caption text
Test Author Work Year Place
1A X . . .
2A . X X .
2B X . X .
3A X . . X
4A X* . X X
4B X* X X X
5A . X X X

test 1: Author only

[edit]
1A Missing the work and year
010

Text

trans

Phædrus Book IV

Source: page 35

test 2: Work with Year

[edit]
2A No author, includes both work and year
021

Text

trans

Li Diz (1942)
2B Author, work and year
022

Text

PhædrusLi Diz (1942)

Source: page 35

test 3: Author, No Work, but Place

[edit]
3A with place and year, no work
030

Text

Phædrus Book IV (1942)

test 4: Author "." with manual workaround

[edit]
4A Author + "." with place

when the user overrides of Author with no work by including a trailing "."

041

Text

Phædrus Book IV (1942)
4B Author + "." with work
042

Text

PhædrusLi Diz (1942)

test 5: No author

[edit]
5A
510

Text

Li Diz Book IV (1942)