diff --git a/www/contribute/producing-an-ebook-step-by-step.php b/www/contribute/producing-an-ebook-step-by-step.php index 03e2b541..72cbbd35 100644 --- a/www/contribute/producing-an-ebook-step-by-step.php +++ b/www/contribute/producing-an-ebook-step-by-step.php @@ -165,14 +165,18 @@ proceed to seal up my confession, I bring the life of that unhappy Henry Jekyll
Normalizes spacing in em-, en-, and double-em-dashes, as well as between nested quotation marks, and adds word joiners.
-You can run se typogrify
as many times as you want on a source directory; it should always produce the same result, regardless of what state the source directory was in when you ran it.
While se typogrify
does a lot of work for you, each ebook is totally different so there’s almost always more work to do that can only be done by hand. In Jekyll, you’ll notice that the chapter titles are in all caps. The SE standard requires chapter titles to be in title case, and se titlecase
can do that for us.
se titlecase
accepts a string as its argument, and outputs the string in title case. Many text editors allow you to configure external macros—perfect for creating a keyboard shortcut to run se titlecase
on selected text.
There are many things that se typogrify
isn’t well suited to do automatically. Check our complete typography manual to see exactly how to format the work. Below is a brief, but incomplete, list of common issues that arise in ebooks:
Typography rules for coordinates. Use the prime and double prime glyphs for coordinates. These regexes helps match and replace coordinates:
+Elision. ′
(i.e., ’
) is used for elided letters in a word. se typogrify
often gets this wrong, and you need to review your ebook by hand to ensure it didn't insert ‘
(‘
) instead.
Use this regex to examine potential candidates for correction:
+\s‘[a-z]
+ Coordinates. Use the prime and double prime glyphs for coordinates. These regexes helps match and replace coordinates:
sed --regexp-extended --in-place "s|([0-9])+’|\1′|g" src/epub/text/*
sed --regexp-extended --in-place "s|([0-9])+”|\1″|g" src/epub/text/*
Typography rules for ampersands in names. This regex helps match candidates: [a-zA-Z]\.?\s*&\s*[a-zA-Z]
Typography rules for text in all caps. Text in all caps is almost never correct, and should either be converted to lowercase with the <em>
tag (for spoken emphasis), <strong>
(for extreme spoken emphasis), or <b>
(for unsemantic small caps, like in storefront signs). This case-sensitive regex helps find candidates: (?<!en-)(?<!z3998:roman">)(?<![A-Z])[A-Z]{2,}(?!")
Text in all caps. Text in all caps is almost never correct, and should either be converted to lowercase with the <em>
tag (for spoken emphasis), <strong>
(for extreme spoken emphasis), or <b>
(for unsemantic small caps, like in storefront signs). This case-sensitive regex helps find candidates: (?<!en-)(?<!z3998:roman">)(?<![A-Z])[A-Z]{2,}(?!")
Sometimes se typogrify
doesn’t close quotation marks near em-dashes correctly. Try to find such instances with this regex: —[’”][^<\s]