diff --git a/www/contribute/semantics.php b/www/contribute/semantics.php index c61f3dfa..e3972cb0 100644 --- a/www/contribute/semantics.php +++ b/www/contribute/semantics.php @@ -559,10 +559,78 @@ section[epub|type~="epigraph"] > * + *{ /* End full-page epigraphs */ -
-

Letter semantic patterns

-

Coming soon!

-
+
+

Letters

+

Letters require particular attention to styling and semantic tagging. While you are not required to exactly match the formatting of a letter in the source scans, you should make some attempt to create a version in visual sympathy with the source.

+
+

General Outline

+
    +
  1. A letter, or portion of a letter, should be put in a <blockquote> element.
  2. +
  3. The enclosing blockquote is given the semantic inflection of z3998:letter, that is: <blockquote epub:type="z3998:letter"> ... </blockquote>.
  4. +
  5. Parts of a letter prior to the body of the text, for example the address from where it is written and the date, should be enclosed in a <header> element.
  6. +
  7. The location and date of a letter are given the semantic inflection of se:letter.dateline. The date can be tagged with a <time> tag with a computer-readable date, for example: <time datetime="1863-10-11">11th of October, 1863</time>.
  8. +
  9. The salutation (for example, “Dear Sir", or “My dearest Jane") is given the semantic inflection of z3998:salutation. If the salutation is on a separate line to the body of the letter and a header block already exists, place the salutation within the header.
  10. +
  11. If the salutation is included within the first line of the letter (for example “My dear Mother, I was so happy to hear from you."), put the salutation inflection in a <span> element, in this example: <span epub:type="z3998:salutation">Dear Mother</span>, I was so happy to hear from you.
  12. +
  13. If the name of the recipient of the letter is set out other than within a saluation (for example a letter headed “To: John Smith Esquire"), the name should be given the semantic inflection of z3998:recipient. Sometimes this may occur at the end of a letter, particularly for more formal communications, in which case it should be placed within a footer block (see below).
  14. +
  15. The valediction and signature and any postscript should be contained in a <footer> element.
  16. +
  17. The valediction (for example, “Yours Truly" or “With best regards") is given the semantic inflection of z3998:valediction.
  18. +
  19. The sender’s name is given the semantic inflection of z3998:sender. If the name appears to be a signature to the letter, it should be given a class of “signature". This will eventually be deprecated and is retained for legacy reasons.
  20. +
  21. Any postscript should also be included within the footer, and given the semantic inflection of z3998:postscript.
  22. +
  23. If the letter is being read aloud by a character in a work of fiction, then each element and paragraph should begin with quotes, as is usual for the spoken word. If it is not being read aloud, then the quotes are not needed.
  24. +
+
+
+

Example Letter 1:

+

Here is a simple example, a child's letter drawn from The Enchanted Castle by E. Nesbit:

+ <blockquote epub:type="z3998:letter"> + <p epub:type="z3998:salutation">Dearest Auntie,</p> + <p>Please may we have some things for a picnic? Gerald will bring them. I would come myself, but I am a little tired. I think I have been growing rather fast.</p> + <footer> + <p epub:type="z3998:valediction">Your loving niece,</p> + <p class="signature" epub:type="z3998:sender">Mabel</p> + <p epub:type="z3998:postscript">P.S.⁠—Lots, please, because some of us are very hungry.</p> + </footer> +</blockquote> +

And here is a slightly more complex example, loosely based on a letter from Pride and Prejudice by Jane Austen:

+ <blockquote epub:type="z3998:letter"> + <header> + <p epub:type="se:letter.dateline">Gracechurch-street, <time datetime="08-02">August 2</time>.</p> + </header> + <p><span epub:type="z3998:salutation">My dear Brother</span>, At last I am able to send you some tidings of my niece, and such as, upon the whole, I hope will give you satisfaction. Soon after you left me on Saturday, I was fortunate enough to find out in what part of London they were. The particulars, I reserve till we meet. It is enough to know they are discovered, I have seen them both⁠—</p> + <p>I shall write again as soon as anything more is determined on.</p> + <footer"> + <p epub:type="z3998:valediction">Yours, etc.</p> + <p epub:type="z3998:sender">Edward Gardner</p> + </footer> +</blockquote> +

CSS for letters:

+ [epub|type~="z3998:letter"] header{ + text-align: right; +} + +footer{ + margin-top: 1em; + text-align: right; +} + +[epub|type~="z3998:salutation"] + p, +[epub|type~="z3998:letter"] header + p{ + text-indent: 0; +} + +[epub|type~="z3998:sender"], +[epub|type~="z3998:recipient"], +[epub|type~="z3998:salutation"]{ + font-variant: small-caps; +} + +[epub|type~="z3998:postscript"]{ + margin-top: 1em; + text-indent: 0; + text-align: left; +} +
+

Poetry, verse, and song semantic patterns

Unfortunately there’s no great way to semantically format poetry in HTML. We have to conscript unrelated elements for use in poetry.