X-Git-Url: https://git.distorted.org.uk/~mdw/drwho/blobdiff_plain/637087030d1b660a2f6ba36c811ca254abc5ae99..HEAD:/drwho.tex

diff --git a/drwho.tex b/drwho.tex
index 5074bfa..dd29493 100644
--- a/drwho.tex
+++ b/drwho.tex
@@ -21,6 +21,7 @@
 
 \documentclass[a4paper, 10pt]{article}
 
+\usepackage[level]{fmtcount}
 \usepackage[T1]{fontenc}
 \usepackage[palatino, helvetica, courier, maths=cmr]{mdwfonts}
 
@@ -30,27 +31,47 @@
 \voffset=-1in \topmargin=20mm \headheight=0mm \headsep=0mm
 \textheight=\paperheight \advance\textheight by -2\topmargin
 
-\newdimen\titlewidth \titlewidth=0.5\textwidth \advance\titlewidth by -40pt
+\newdimen\titlewidth
 
 \pagestyle{empty}
 \errorcontextlines=50
 \showboxbreadth=\maxdimen \showboxdepth=\maxdimen
 
+\makeatletter
+
+\newcounter{doctor}
+  \renewcommand\thedoctor{\Ordinalstring{doctor}}
+  \setcounter{doctor}{0}
+\newcounter{season}
+  \renewcommand\theseason{\arabic{season}}
+  \setcounter{season}{0}
+
 \newif\iftop \toptrue
-\def\doctor#1{%
+\def\doctor#1#2{%
   \omit
   \vrule \iftop\else height 24pt \fi width 0pt depth 6pt
   \large \sffamily \bfseries
-  \ignorespaces #1\unskip \hfil
+  \stepcounter{doctor}%
+  The \thedoctor\ Doctor (#1--#2)\hfil
   &&&&&\cr
 }
-\def\season#1{%
-  \omit
+\def\@@season#1{%
   \vrule width 0pt height 14pt depth 4pt
   \sffamily \bfseries
-  \ignorespaces #1\unskip \hfil
+  #1\hfil
   &&&&&\cr
 }
+\def\seasonlike{\omit\@@season}
+\def\@season#1{\@@season{Season \theseason#1}}
+\def\season{%
+  \omit
+  \@ifstar
+    {\@season{ (cont.)}}%
+    {\stepcounter{season}%
+     \@ifnextchar[\season@{\@season{}}}%
+}
+\def\season@[#1]{\@season{: #1}}
+
 \def\lost#1{\textit{#1}}
 
 \newdimen\hrwd \hrwd=0.2pt
@@ -103,7 +124,7 @@
 \def\fulltrack{full}
 
 \namelet{dflt/empty}\relax
-\namedef{dflt/full}{\hfil\vrule\hfil}
+\namelet{dflt/full}\vrule
 
 \namelet{dots/empty}\strut
 \namedef{dots/full}{\strut\raisebox{-2pt}{\smash{{$\vdots$}}}}
@@ -180,7 +201,7 @@
 }
 
 \edef\oldoutput{\the\output}
-%\output={\showbox255 \oldoutput}
+%%\output={\showbox255 \oldoutput}
 
 \begin{document}
 
@@ -189,6 +210,8 @@
 \lineskip=0pt
 \footnotesize
 
+\titlewidth=0.5\textwidth \advance\titlewidth by -4em
+
 \global\def\\{&&&&&\cr}
 \halign%
   {\strut\hbox to \titlewidth{\qquad\ignorespaces#\unskip\hfil}%
@@ -201,9 +224,9 @@
   %
 &\omit\qquad&\omit\qquad&\omit\qquad&\omit\qquad\cr\cr
   %
-\doctor{The First Doctor (1963--1966)}
+\doctor{1963}{1966}
   %
-\season{Season 1}
+\season
   An Unearthly Child            \join{t0}{S}{Susan Foreman}
                                 \join{t1}{B}{Barbara Wright}
                                 \join{t2}{I}{Ian Chesterton}            \\
@@ -215,7 +238,7 @@
   The Sensorites                                                        \\
   The Reign of Terror                                                   \\
   %
-\season{Season 2}
+\season
   Planet of Giants                                                      \\
   The Dalek Invasion of Earth   \depart{t0}                             \\
   The Rescue                    \join{t3}{V}{Vicki Pallister}           \\
@@ -227,7 +250,7 @@
                                 \join{t0}{S}{Stephen Taylor}            \\
   The Time Meddler                                                      \\
   %
-\season{Season 3}
+\season
   Galaxy Four                                                           \\
   \lost{Mission to the Unknown}                                         \\
   \lost{The Myth Makers}        \depart{t3}
@@ -236,7 +259,7 @@
                                 \die{t1}
                                 \joindie{t2}{S}{Sara Kingdom}           \\
   \lost{The Massacre of St Bartholomew's Eve}
-                                \join{t3}{D}{Dodo Chaplet}              \\
+                                \join{t3}{D}{Dorothea `Dodo' Chaplet}   \\
   The Ark                                                               \\
   \lost{The Celestial Toymaker}                                         \\
   The Gunfighters                                                       \\
@@ -245,13 +268,13 @@
                                 \join{t1}{P}{Polly Wright}
                                 \join{t2}{B}{Ben Jackson}               \\
   %
-\season{Season 4}
+\season
   \lost{The Smugglers}                                                  \\
   The Tenth Planet                                                      \\
   %
-\doctor{The Second Doctor (1966--1969)}
+\doctor{1966}{1969}
   %
-\season{Season 4 (cont.)}
+\season*
   The Power of the Daleks                                               \\
   \lost{The Highlanders}        \join{t0}{J}{Jamie McCrimmon}           \\
   The Underwater Menace                                                 \\
@@ -260,7 +283,7 @@
   The Faceless Ones             \depart{t1} \depart{t2}                 \\
   The Evil of the Daleks        \join{t3}{V}{Victoria Waterfield}       \\
   %
-\season{Season 5}
+\season
   The Tomb of the Cybermen                                              \\
   \lost{The Abominable Snowmen}                                         \\
   The Ice Warriors                                                      \\
@@ -269,7 +292,7 @@
   Fury from the Deep            \depart{t3}                             \\
   \lost{The Wheel in Space}     \join{t1}{Z}{Zoe Heriot}                \\
   %
-\season{Season 6}
+\season
   The Dominators                                                        \\
   The Mind Robber                                                       \\
   The Invasion                                                          \\
@@ -279,36 +302,36 @@
   The War Games                 \depart{t0} \depart{t1}                 \\
   %
 \pagebreak
-\doctor{The Third Doctor (1970--1974)}
+\doctor{1970}{1974}
   %
-\season{Season 7}
+\season
   Spearhead from Space          \join{t0}{L}{Elizabeth Shaw}            \\
   Doctor Who and the Siluarians                                         \\
   The Ambassadors of Death                                              \\
   Inferno                       \depart{t0}                             \\
   %
-\season{Season 8}
+\season
   Terror of the Autons          \join{t0}{J}{Jo Grant}                  \\
   The Mind of Evil                                                      \\
   The Claws of Axos                                                     \\
   Colony in Space                                                       \\
   The Daemons                                                           \\
   %
-\season{Season 9}
+\season
   Day of the Daleks                                                     \\
   The Curse of Peladon                                                  \\
   The Sea Devils                                                        \\
   The Mutants                                                           \\
   The Time Monster                                                      \\
   %
-\season{Season 10}
+\season
   The Three Doctors                                                     \\
   Carnival of Monsters                                                  \\
   Frontier in Space                                                     \\
   Planet of the Daleks                                                  \\
   The Green Death               \depart{t0}                             \\
   %
-\season{Season 11}
+\season
   The Time Warrior              \join{t0}{S}{Sarah Jane Smith}          \\
   Invasion of the Dinosaurs                                             \\
   Death to the Daleks                                                   \\
@@ -316,49 +339,48 @@
   Planet of the Spiders                                                 \\
   %
 \pagebreak
-\doctor{The Fourth Doctor (1974--1981)}
+\doctor{1974}{1981}
   %
-\season{Season 12}
-  Robot                                 \join{t1}{H}{Harry Sullivan}    \\
+\season
+  Robot                         \join{t1}{H}{Harry Sullivan}            \\
   The Ark in Space                                                      \\
   The Sontaran Experiment                                               \\
   Genesis of the Daleks                                                 \\
   Revenge of the Cybermen                                               \\
   %
-\season{Season 13}
-  Terror of the Zygons                  \depart{t1}                     \\
+\season
+  Terror of the Zygons          \depart{t1}                             \\
   Planet of Evil                                                        \\
   Pyramids of Mars                                                      \\
   The Android Invasion                                                  \\
   The Brain of Morbius                                                  \\
   The Seeds of Doom                                                     \\
   %
-\season{Season 14}
+\season
   The Masque of Mandragora                                              \\
-  The Hand of Fear                      \depart{t0}                     \\
+  The Hand of Fear              \depart{t0}                             \\
   The Deadly Assassin                                                   \\
-  The Face of Evil                      \join{t0}{L}{Leela}             \\
+  The Face of Evil              \join{t0}{L}{Leela}                     \\
   The Robots of Death                                                   \\
   The Talons of Weng-Chiang                                             \\
   %
-\season{Season 15}
+\season
   Horror of Fang Rock                                                   \\
-  The Invisible Enemy                   \join{t1}{K}{K--9}              \\
+  The Invisible Enemy           \join{t1}{K}{K--9}                      \\
   Image of the Fendahl                                                  \\
   The Sun Makers                                                        \\
   Underworld                                                            \\
-  The Invasion of Time                  \depart{t0}                     \\
+  The Invasion of Time          \depart{t0}                             \\
   %
-\season{Season 16 (The Key to Time)}
-  The Ribos Operation                   \join{t0}{R}{Romanadvoratrelundar
-                                                        (`Romana')} \\
+\season[The Key to Time]
+  The Ribos Operation     \join{t0}{R}{Romanadvoratrelundar (`Romana')} \\
   The Pirate Planet                                                     \\
   The Stones of Blood                                                   \\
   The Androids of Tara                                                  \\
   The Power of Kroll                                                    \\
   The Armageddon Factor                                                 \\
   %
-\season{Season 17}
+\season
   Destiny of the Daleks                                                 \\
   City of Death                                                         \\
   The Creature from the Pit                                             \\
@@ -366,55 +388,54 @@
   The Horns of Nimon                                                    \\
   Shada                                                                 \\
   %
-\season{Season 18}
+\season
   The Leisure Hive                                                      \\
   Meglos                                                                \\
-  Full Circle                           \join{t2}{A}{Adric}             \\
+  Full Circle                   \join{t2}{A}{Adric}                     \\
   State of Decay                                                        \\
-  Warriors' Gate                        \depart{t0} \depart{t1}         \\
-  The Keeper of Traken                  \join{t3}{N}{Nyssa of Traken}   \\
-  Logopolis                             \join{t0}{T}{Tegan Jovanka}     \\
+  Warriors' Gate                \depart{t0} \depart{t1}                 \\
+  The Keeper of Traken          \join{t3}{N}{Nyssa of Traken}           \\
+  Logopolis                     \join{t0}{T}{Tegan Jovanka}             \\
   %
 \pagebreak
-\doctor{The Fifth Doctor (1981--1984)}
+\doctor{1981}{1984}
   %
-\season{Season 19}
+\season
   Castrovalva                                                           \\
   Four to Doomsday                                                      \\
   Kinda                                                                 \\
   The Visitation                                                        \\
   Black Orchid                                                          \\
-  Earthshock                            \die{t2}                        \\
+  Earthshock                    \die{t2}                                \\
   Time-Flight                                                           \\
   %
-\season{Season 20}
+\season
   Arc of Infinity                                                       \\
   Snakedance                                                            \\
-  Mawdryn Undead                        \join{t1}{T}{Vislor Turlough}   \\
-  Terminus                              \depart{t3}                     \\
+  Mawdryn Undead                \join{t1}{T}{Vislor Turlough}           \\
+  Terminus                      \depart{t3}                             \\
   Enlightenment                                                         \\
-  The King's Demons                     \join{t2}{K}{Kameleon}          \\
+  The King's Demons             \join{t2}{K}{Kameleon}                  \\
   %
-\season{(Special)}
+\seasonlike{(Special)}
   The Five Doctors                                                      \\
   %
-\season{Season 21}
+\season
   Warriors of the Deep                                                  \\
   The Awakening                                                         \\
   Frontios                                                              \\
-  Resurrection of the Daleks            \depart{t0}                     \\
-  Planet of Fire                        \depart{t1}
-                                        \die{t2}
-                                        \join{t3}{P}{Perpugilliam
-                                                        `Peri' Brown}   \\
+  Resurrection of the Daleks    \depart{t0}                             \\
+  Planet of Fire                \depart{t1}
+                                \die{t2}
+                                \join{t3}{P}{Perpugilliam `Peri' Brown} \\
   The Caves of Androzani                                                \\
   %
-\doctor{The Sixth Doctor (1984--1986)}
+\doctor{1984}{1986}
   %
-\season{Season 21 (cont.)}
+\season*
   The Twin Dilemma                                                      \\
   %
-\season{Season 22}
+\season
   Attack of the Cybermen                                                \\
   Vengeance on Varos                                                    \\
   The Mark of the Rani                                                  \\
@@ -422,33 +443,32 @@
   Timelash                                                              \\
   Revelation of the Daleks                                              \\
   %
-\season{Season 23 (The Trial of a Time Lord)}
+\season[The Trial of a Time Lord]
   The Mysterious Planet                                                 \\
-  Mindwarp                              \die{t3}                        \\
-  Terror of the Vervoids                \join{t0}{M}{Melanie Bush}      \\
+  Mindwarp                      \die{t3}                                \\
+  Terror of the Vervoids        \join{t0}{M}{Melanie Bush}              \\
   The Ultimate Foe                                                      \\
   %
-\doctor{The Seventh Doctor (1987--1989)}
+\doctor{1987}{1989}
   %
-\season{Season 24}
+\season
   Time and the Rani                                                     \\
   Paradise Towers                                                       \\
   Delta and the Bannerman                                               \\
-  Dragonfire                            \depart{t0}
-                                        \join{t1}{A}{Dorothy `Ace'
-                                                        McShane Gale}   \\
+  Dragonfire                    \depart{t0}
+                               \join{t1}{A}{Dorothy `Ace' McShane Gale} \\
   %
-\season{Season 25}
+\season
   Remembrance of the Daleks                                             \\
   The Happiness Patrol                                                  \\
   Silver Nemesis                                                        \\
   The Greatest Show in the Galaxy                                       \\
   %
-\season{Season 26}
+\season
   Battlefield                                                           \\
   Ghost Light                                                           \\
   The Curse of Fenric                                                   \\
-  Survival                              \depart{t1}                     \\
+  Survival                      \depart{t1}                             \\
   %
 }
 
