Template:MultiPubList/Outline
Jump to navigation
Jump to search
Outline of Template MultiPubList, Version 12b
- In the following, T is template; p is template parameter;and code1, code2 etc. are parts of parameter 1 of this template
A. Initialize dpl variables
- 1. dplvar:plc = CompFromWorkTitle (line 1)
- 2. dplvar:pnc
- a. Convert apostrophe to comma (2)
- b. Convert assorted symbols (!"$&*+-.:;<>?`~„…†‡‹‘’“”•–—›¡§¨«°±·º»¿×÷ʹʺ#%) to commas (3)
- c. If parameter 2 (publication year) exists, add it to beginning of pnc with one space between (4)
- 3. dplvar:plcc – If plc is a composer with works, then plcc = composer name; if not, then plcc = "zzzz" (5)
- 4. dplvar:pnc (again)
- a. If plcc = "zzzz" (i.e., composer's name is not in parenthesis at end of title), then:
- i. If title still has parenthesis at end, pnc = TitleOnly + ( + CompFromWorkTitle + ) (6)
- ii. If title has parenthesis not at end, convert both ( and ) in pnc to commas (7a)
- iii. If no parenthesis, no change to pnc (7b)
- b. Convert two commas (,,) to one in pnc (8)
- a. If plcc = "zzzz" (i.e., composer's name is not in parenthesis at end of title), then:
B. Subdivide flow into two dpl calls: I. All works in publication have the same composer, so matching can be done on TitleOnly; II. Different composers, so match is done on whole title (9a)
C. Start dpl I (10a)
- 1. dpl-parameters down to include (10b)
- 2. dpl-parameter "include" (comma-delimited)
- a. If code1 of template-parameter 1 is "seq", then the first part of "include" is T.Pub p.no, the second part is a link to Page Title (without composer) (10c)
- b. If code1 of template-parameter 1 is "seq", then add a comma and the template corresponding to code2 (11)
- c. If code1 of template-parameter 1 is not "seq" then the first part of "include" is link to Page Title, and the second part is the template corresponding to code1 (12)
- d. If code2 exists, then add a comma and the template corresponding to it (13)
- e. Repeat (d) for codes 3-11 (14-22)
- 3. dpl-parameter "includematch" (comma-delimited) (23)
- a. If code1 of template-parameter 1 is "seq", then add a regexp I-1 that will match the year and publication (title only) in a Pub line on the work page (24)
- b. If code1 of template-parameter 1 is "seq", then add a comma and: (25)
- i. If code2 is "pg", then add a regexp I-1 as in (a)
- ii. If code2 is "yr", then add a regexp I-2 that will match the Pub¦1 line on the work page
- iii. If code2 is anything else, add blank
- c. If code1 of template-parameter 1 is not "seq", then add items as in b(i)-b(iii) for code1 (26)
- d. If code1 of template-parameter 1 is not "seq", then add items as in b(i)-b(iii) for code2 (27)
- e. If code3 exists, then add items as in b(i)-b(iii) for code 3 (28)
- f. Repeat (e) for codes 4-11 (29-36)
- 4. dpl-parameter "table"
- a. Set table with class="wikitable sortable" (37)
- b. If code1 of template-parameter 1 is "seq", then add ",-,No.,Title" (38)
- c. If code1 of template-parameter 1 is not "seq", then add a comma and the column title associated with code1 (39)
- d. If code2 exists, add a comma and the column title associated with code 2 (40)
- e. Repeat (d) for codes 3-11 (41-49)
- 5. dpl-parameters at end of dpl A: (50)
- a. tablesortcolumn – if code1 is "seq", then sort on it; otherwise sort on work title (the dpl-parameter "tablerow" interferes with this in nonstandard ways, so it is not used)
- b. format – as typical in most dpl calls
- c. replaceintitle - removes the parenthesis at end of work titles, including the space before it
D. Start dpl II (52a)
- 1. Repeat step C1 (52b)
- 2. Repeat step C2 (52c-65)
- 3. dpl-parameter "includematch" (comma-delimited)
- a. If there are four or more commas in pnc, then repeat step C3, except this regexp II-1 will match the year and the whole publication title to get "seq" or "pg"; same regexp I-2 to get "yr" (66-78)
- b. If there are 0 - 3 commas in pnc, then repeat step C3, except this regexp II-2 will match the year and the whole publication title to get "seq" or "pg"; same regexp I-2 to get "yr" (79-91)
- 4. Repeat step C4 (92-105)
- 5. Repeat step C5 (106)