diff --git a/www/contribute/producing-an-ebook-step-by-step.php b/www/contribute/producing-an-ebook-step-by-step.php index b3460215..d1b5c722 100644 --- a/www/contribute/producing-an-ebook-step-by-step.php +++ b/www/contribute/producing-an-ebook-step-by-step.php @@ -172,7 +172,9 @@ proceed to seal up my confession, I bring the life of that unhappy Henry Jekyll
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: |([0-9])+’|\1′|g
, |([0-9])+”|\1″|g
Typography rules for 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]
Semantics for italics: <em>
should be used for when a passage is emphasized, as in when dialog is shouted or whispered. <i>
is used for all other italics, with the appropriate semantic inflection. Older transcriptions usually use just <i>
for both, so you must change them manually if necessary.
Sometimes, transcriptions from Project Gutenberg may use ALL CAPS instead of italics. To replace these, you can use sed
:
sed --regexp-extended --in-place "s|[A-Z’]{2,}|<em>\L&</em>|g" src/epub/text/*
+ This will unfortunately replace language tags like en-US
, so fix those up with this:
sed --regexp-extended --in-place "s|en-<em>([a-z]+)</em>|en-\U\1|g" src/epub/text/*
+ These replacments don’t take Title Caps into account, so use git diff
to review the changes and fix errors before committing.
Semantics rules for chapter titles.
@@ -279,6 +286,7 @@ proceed to seal up my confession, I bring the life of that unhappy Henry Jekyll+He wanted to think of some one part of nature as yet untouched...
When running se interactive-sr
, press y
to accept a replacement and n
to reject a replacement.
Use the following regular expression invocations to correct a certain set of such phrases:
se interactive-sr "/\v([Ss])ome one/\1omeone/" src/epub/text/* git commit -am "[Editorial] some one -> someone"
se interactive-sr "/\v(<[Aa])ny one/\1nyone/" src/epub/text/* git commit -am "[Editorial] any one -> anyone"