Wikisource:TemplateScript/RunningHeader

From Wikisource
Jump to navigation Jump to search
How to use the "running header" link activated by TemplateScript
After installing template script (see parent page/), here is where the "running header" link will appear.

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

How it works[edit]

An example of the code that will be inserted when you click the link. In this case, the information entered is entirely correct, with no manual editing needed. Here's the page used as an example: Page:Whitman's Ride through Savage Lands.djvu/192

The running header 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[edit]

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.

The wrong text was inserted here, and the wrong page number as well.

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.

This time, only the wrong text was inserted.

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 <noinclude> tag. Other extraneous templates from the header source page are sometimes inserted as well.

This time, an extraneous {{hwe}} template was pulled in, which needs to be manually deleted.