From 9c05f342da9bf6b29a078d5cebc7e5f6c2d0b360 Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Wed, 11 Mar 2020 14:58:36 -0500 Subject: [PATCH] Update step-by-step guide --- www/contribute/producing-an-ebook-step-by-step.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/contribute/producing-an-ebook-step-by-step.php b/www/contribute/producing-an-ebook-step-by-step.php index 8f668cdc..2523d969 100644 --- a/www/contribute/producing-an-ebook-step-by-step.php +++ b/www/contribute/producing-an-ebook-step-by-step.php @@ -113,7 +113,7 @@ require_once('Core.php');
  • Split the source text at logical divisions

    The file we downloaded contains the entire work. Jekyll is a short work, but for longer work it quickly becomes impractical to have the entire text in one file. Not only is it a pain to edit, but ereaders often have trouble with extremely large files.

    -

    The next step is to split the file at logical places; that usually means at each chapter break. For works that are contain their chapters in larger “parts,” the part division should also be its own file. For example, see Treasure Island.

    +

    The next step is to split the file at logical places; that usually means at each chapter break. For works that are contain their chapters in larger “parts,” the part division should also be its own file. For example, see Treasure Island.

    To split the work, we use se split-file. se split-file takes a single file and breaks it in to a new file every time it encounters the markup <!--se:split-->. se split-file automatically includes basic header and footer markup in each split file.

    Notice that in our source file, each chapter is marked with an h2 tag. We can use that to our advantage and save ourselves the trouble of adding the <!--se:split--> markup by hand:

    perl -pi -e "s/<h2/<\!--se:split--><h2/g" src/epub/text/body.xhtml

    (Note the slash before the ! for compatibility with some shells.)