Template:Sonnet/doc

Usage
This template should be placed at the top of each article for William Shakespeare's individual sonnets (e.g. Sonnet 1). It provides navigation to the previous and next sonnets in the sequence, a place for an image from the 1609 Quarto with caption, and houses the full text of the sonnet with verse structure apparatus and citation.

Main parameters
Most transclusions of this template will use 5 parameters. The numbered parameters do not need to be named in the code, but their values must occur in the stated order separated by pipes :


 * 1 (required) is the sonnet number, as printed in the 1609 Quarto (and virtually all modern editions).
 * 2 (optional) is an image of the sonnet (or portion thereof) as printed in the 1609 Quarto. Use only the simple file name (e.g. ), not   or.
 * 3 (optional) is the caption for the image.
 * 4 (required) is the full text of the sonnet, with no special formatting required, other than  (or alternatively, 2 spaces) added to the beginning of both lines of the final couplet.
 * source (optional) is the source of the text in a properly-formatted inline reference syntax. That is, the reference value must be supplied with its own  or sfn or similar markup. It is a named parameter so must always be invoked with its name.

If no value is assigned to 2, then 3 is ignored, whether a value is present or not. However, the positions of both 2 and 3 must be maintained — that is, even if they have no value their pipe-defined positions must remain in place and the sonnet text must still be the 4th value. Thus, to display the Sonnet box without an image:

Example
The following code uses all 5 main parameters, and results in the Sonnet box displayed on this page + the reference which appears below.

Image size
The size of the image defaults to "upright=1.5", that is, 150% of the default thumbnail size. For most users, this results in a width of 330 pixels. This should be close to ideal in most cases, but it can be adjusted using the parameter upright. This parameter can be used to the multiplier (e.g. 1.3).

Verse structure apparatus
Two additional named parameters — stanzas and linenumbers — provide visual aids to the structure of the sonnet text. The first marks the beginning of Quatrains 1, 2, and 3, and the Couplet, down the left side of the text. The second indicates the number of the final line of each of these 4 components down the right side. Both of these parameters default to the correct values for a standard Shakespearean sonnet, so they should not be used in typical transclusions.

However, 2 sonnets, Sonnet 99 and Sonnet 126, are nonstandard in structure, so they require custom values to be placed in these parameters. They are: Since the first stanza of this poem is a Quintain, the label "Q" is still appropriate, if a touch ambiguous.
 * Sonnet 99

This code suppresses the entire lefthand stanza apparatus for Sonnet 126, which seems preferable. Alternatively, one could use:
 * Sonnet 126