Wikisource:WikiProject 1911 Encyclopædia Britannica/Transclusion

From Wikisource
Jump to navigation Jump to search
Wikisource:WikiProject 1911 Encyclopædia Britannica Transclusion

If you look at the wikitext in many articles you will not find the actual text of the EB1911 article. Instead, you will find syntax that directs the server to include the appropriate text from page space. This process is called Transclusion. To add a new article, an editor must first correct the text in page space, and then create the article itself in article space using the correct syntax to "transclude" the article text. If you are considering adding the text of a red-linked article, please first verifying and tagging it in page space, and then transcluding it, because that kills two birds with one stone. The project supplies templates to simplify this process.

Why transclusion?[edit]

We believe that our readers will in general want to read articles in article space. The goal of the project is to create these articles. However, the best way to create a word-perfect copy of the original is to perform side-by-side comparisons with the "pictures" of the pages, and this is easily done using the tools and displays provided in page space. By using transclusion, any edit in page space to correct transcription error will immediately be reflected in the article in article space. In addition, anyone reading the article in article space can bring up the page-space version to verify that the transcription is correct.

Markup in page space[edit]

An article in the original EB1911 may be completely included on a single page, or it may start on one page and end on the next page, or it may start on a page and continue on one or more complete pages before ending on a final page. From the perspective of page space, each page may contain "sections" of one or more articles.

To perform transclusion, we must identify the article sections on each page. Each section on a page is assigned a tag that is unique on that page. The EB1911 project has elected to use the EB1911 article name as the tag. Thus the tag for all sections of the 1911 Encyclopædia Britannica/Great Mother of the Gods article is "Great Mother of the Gods". These tags are inserted in each page immediately before the text in the section. The first tag on each page is at the top of the page. The section starts immediately after the tag and continues until immediately before the next tag. The last section on a page ends at the end of the page.

The EB1911 project uses a server-side code to implement a simplified tag syntax. To add a tag, start at the beginning of a line. Place two hash-marks, a space, the tag, a space, and two hash-marks on a line. Thus:

## Great Mother of the Gods ##

on a single line will tag the section.

If the article is on multiple pages, then add the same tag (## ''the tag'' ##) at the top of each page which contains a continuation of the article. In the example article of "Great Mother of the Gods", The article starts on one page (after the end of another article), and then continues onto the next page and then for 2 paragraphs on a third page, so in total three tags are needed. The initial tag and two more identical ones at the top of the following two pages.

For the text itself, please follow the Style Manual.


After you proof and tag the text in page space, you can create articles in article space using transclusion. An article consists of front matter and text. The front matter is implemented using the {{EB1911}} template, and the text is transcluded using the "pages index" construct.

The most efficient way to create a new page is to use {{EB1911set}}. Used properly, this generates both the EB1911 and the "pages index" construct. Alternatively, you can simply copy the entire wikitext from an existing article (such as 1911 Encyclopædia Britannica/Great Mother of the Gods ) and modify all the fields of the {{EB1911}} template and the "pages index:" construct.

{{EB1911set}} should be used as {{subst:EB1911set}}: copy the form to fill in from the Template page and paste it into the page you want to create, complete and save. This is certainly the best way to create long articles, since it takes the initial and final page numbers and adds everything in between. As rendered, this template becomes the {{EB1911}} standard template on top of the required transclusion message.

Transclusion artefacts[edit]

Paragraph breaks at page breaks[edit]

Transclusion handles simple page breaks with no intervention when the page ends at the end of the word or sentence. When the page ends at the end of a paragraph, the editor must ensure that the blank line that denotes a paragraph is not elided by the wiki software. The simplest way of doing this is with the {{nop}} template.

The paragraph ends at the end of a page if the last line (in the scans) is not right-justified, and the first line of the next page is indented. After the last word on the page (when it is also the last word in a paragraph), add {{nop}} on a line by itself and with no newline afterwards. This will have no visible effect in Page space, but will result in a paragraph space in the transcluded article. See the {{nop}} documentation for an explanation.

Fine print[edit]

At the end of many EB1911 articles there is a bibliography section which is in fine print. The usual template to use for this is {{EB1911 fine print|text goes here}}

If the block of text spans the end of one page and the start of the next then place {{EB1911 fine print/s}} at the start of the block and then on the next page after the block ends {{EB1911 fine print/e}} — See also Templates across page breaks

Hyphenated word at end of page[edit]

If the final word of the page is hyphenated, as Encyclopædia Britannica style allows, there will be a space after the hyphen before the second half of the word. In this case, we use the {{hws}} template (hyphenated word start) at the end of the page and the {{hwe}} template at the start of the next page.

Other page-crossing constructs[edit]

On occasion, you may encounter other problems at the page boundary, such as phrases in italics or phrases in small caps. if these cannot be broken into two constructs, then we correct this by brute force, using the following construct:

<includeonly>article text</includeonly><noinclude>page text</noinclude>

With this construct, the "page text" is a faithful reproduction of the text to place on the page and is sourced completely from the page it is displayed on the transcription of the page in page space. The "article text" is a copy of the text on the page, plus text from the following page. This text is not displayed on the transcription in page space, but it is displayed in the article.

On the next page, the text that is copied into "article text" should be placed before the ##...## tag. This prevents that text from being transcluded into the article.

See also[edit]