User:YBG/Living officeholders row/doc

Note This describes a userspace draft intended to be implemented as and subtemplates. I am no longer working on this version, instead I'm working on an alternative implementation, see, intended to be implemented as

Usage
$(${ Living officeholders row | Job=&lt;job&gt; | fmt=&lt;fmt&gt; | evt1=&lt;evt1&gt; | evt2=&lt;evt2&gt; | &lt;#1&gt; | &lt;#2&gt; | ... | &lt;#10&gt; $)$} where
 * job specifies the office to facilitate looking up the correct data.
 * = us-p, usvp for rows in tables in the articles about the Living presidents and vice presidents of the United States.
 * = aupm, sepm, nzpm, ukpm (not yet implemented) for the Living prime ministers of Australia, New Zealand, Sweden, and the UK.
 * fmt: specifies the date format
 * evt1: positive (negative) number for an accession (death) at the start of the period
 * evt2: positive (negative) number for an accession (death) at the end of the period (optional, defaults to today)
 * ev1a, ev2a: (optional) positive number for the mid-term accession following death of an officeholder
 * span: (optional) text to override the calculated time span; used for the first of the two July 4, 1826 deaths
 * 1, 2, ... 10: optionally signed numbers representing officeholders alive during the period

Overview of pages
The pages involved in this system include:
 * 1) The generic template and subtemplates (update when changing format):
 * 2) The office-specific data template (update when officeholder data changes):
 * 3) The article space pages (update when officeholder data changes):
 * Living presidents of the United States
 * Living vice presidents of the United States
 * 1) The article space pages (update when officeholder data changes):
 * Living presidents of the United States
 * Living vice presidents of the United States
 * Living presidents of the United States
 * Living vice presidents of the United States

Maintenance
Here are general instructions for each anticipated type of maintenance activity:
 * 1) A Living officeholder (#N) dies
 * 2) * Modify by adding the death date and description
 * 3) * Modify Living &lt;officeholder&gt;s  by adding -N to the last row and then appending a new row with -N
 * 4) A new officeholder (#N) assumes office
 * 5) * Modify by adding a new block for the new officeholder
 * 6) * Modify Living &lt;officeholder&gt;s  by adding +N to the last row and then appending a new row with +N
 * 7) Expand the system for a new type of officeholder
 * 8) * Create for the new office with name and event information for all officeholders
 * 9) * Modify by adding a new section to display all of the data for the new office type.
 * 10) * Create or modify the page in article space Living &lt;officeholder&gt;s  for the new office with general information plus the header, footer and one call to  for each chronological period
 * 11) Modify the format of all templates
 * 12) * Modify, and and test it by previewing
 * 13) * Modify Living &lt;officeholder&gt;s  headers and footers if necessary
 * 14) Modify the colors or style of the officeholder boxes
 * 15) * Modify and test it by previewing
 * 16) Implement an idiosyncratic format for some but not all offices
 * 17) * Create a new that generates the desired format
 * 18) * Add test case(s) to and modify  until it works OK
 * 19) * Modify Living &lt;officeholder&gt;s  by (a) adjusting the headers and footers and (b) calling the new

Structure
This system of subtemplates includes:
 * - the main template, formats a single row in the table.
 * Called from article space with multiple parameters (explained above)
 * Calls, ,
 * - Displays a colored box that links to an article on an officeholder
 * Called by and (for headers and footers) from article space
 * 1 the ordinal number of the officeholder (optionally signed)
 * 2 the code that specifies the office
 * Calls
 * - specifies the office-specific data, provides data for use by other templates
 * Called by and  to retrieve office-specific data.
 * 1 positive (negative) officeholder number for accession (death) info; either is OK for name
 * 2 date/descr date/description of the event, name for the officeholder's name (i.e., WP article title)
 * Calls no other templates in this system
 * - Provides +/&minus; signs consistently formatted based on the sign of the parameter
 * Called by and (for headers and footers) from article space
 * 1 optionally signed ordinal number of the officeholder
 * Calls no other templates in this system
 * - designed to test all (sub)templates in this system
 * Called by no other templates in this system
 * Calls no other templates in this system