Wikisource:TemplateScript/RunningHeader

One link added by TemplateScript, which is very useful for Wikisource transcription, is RunningHeader. This page describes how it works.

How it works
The  link adds the RunningHeader to the "Header" section of a page, and attempts to pre-populate its parameters based on neighboring pages. It works best for works with sequential page numbers (whether in roman or arabic numerals), and for works with consistent text in the headers of odd-numbered pages and in the headers of even-numbered pages. For such works, if you proofread the pages in sequence, the link will typically pre-load the correct header, only occasionally requiring manual editing.

The script will generally consult the header already entered two pages prior to the one you're working on. (By skipping a page, it avoids the common situation where page numbers are on the opposite side of the page for even- or odd-numbered pages, or where even-numbered pages have different text from odd-numbered pages.)

Below, this document will refer to "the page two pages prior to the one you're working on" as simply the "header source page".

Where it will fail
The script does not handle all cases perfectly; with some works, it will function flawlessly, while for others, it will require frequent manual editing. Here are the things that will cause it to fail:

If the header source page doesn't contain a RunningHeader template (this occurs frequently, for instance, on the first page of a chapter), the script will attempt to consult neighboring pages and still populate the page you're on, but it will often fail.

If the current page has different text than a source page (for instance, in a work of short poems, where the page header contains the title of each poem), you will have to manually edit the header text.

If the header source page contains an template at the beginning of the body text (such as hwe or center), that template will get copied into the "header" field by the script, along with a  tag. Other extraneous templates from the header source page are sometimes inserted as well.