From dad938ce695c1e7e189f69734ed0a417583d6285 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sat, 27 Mar 2021 19:36:28 +0100 Subject: [PATCH] =?UTF-8?q?PDF=E2=86=92EPUB:=20Add=20EPUB=203=20step,=20us?= =?UTF-8?q?e=20HTML=205=20in=20example.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/posts/how-i-convert-pdfs-to-epub.adoc | 49 ++++++++++++------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/content/posts/how-i-convert-pdfs-to-epub.adoc b/content/posts/how-i-convert-pdfs-to-epub.adoc index 09d8710..1666722 100644 --- a/content/posts/how-i-convert-pdfs-to-epub.adoc +++ b/content/posts/how-i-convert-pdfs-to-epub.adoc @@ -53,14 +53,25 @@ guide. Click on menu:Add books[Add empty book]. Then fill in the metadata and select “EPUB” as format. You can add more metadata and a cover image by right-clicking the book and then selecting menu:Edit metadata[]. Open Calibre's editor by right -clicking on the book and selecting menu:Edit book[]. You start with a single XHTML -file, `start.xhtml`. I always use that for the title page, the copyright notice -and so on. You can force a page break to separate the title and the copyright -notice with CSS: Add `style="page-break-after: always;"` to the last element of -the virtual “page” or use a CSS class. To add a CSS file click menu:File[New -file] and enter a filename ending with `.css`. Add the CSS file to the document -by right clicking on `start.xhtml` in the file browser and selecting -menu:Link stylesheets…[]. +clicking on the book and selecting menu:Edit book[]. + +Calibre creates EPUB 2 books by default. Convert the book to EPUB +3footnote:[EPUB 3 introduces many accessibility features, see +link:{url-ap-semantics}[AccessiblePublishing: EPUB Semantics, ARIA Roles, & +Metadata] for details.] by clicking menu:Tools[Upgrade book internals]. This +will, among other things, convert `toc.ncx` to `nav.xhtml`. To support e-book +readers which can't handle EPUB 3 yet, re-create `toc.ncx` as an empty file. It +is filled automatically when you create the table of Contents. Open +`metadata.opf` and replace `` with `` (`id1` is the ID +of `toc.ncx`, defined a few lines above). + +You start with a single XHTML file, `start.xhtml`. I always use that for the +title page, the copyright notice and so on. You can force a page break to +separate the title and the copyright notice with CSS: Add +`style="page-break-after: always;"` to the last element of the virtual “page” or +use a CSS class. To add a CSS file click menu:File[New file] and enter a +filename ending with `.css`. Add the CSS file to the document by right clicking +on `start.xhtml` in the file browser and selecting menu:Link stylesheets…[]. [NOTE] The built-in preview does not show page breaks. @@ -71,7 +82,7 @@ Your files should look similar to this: [source,html] -------------------------------------------------------------------------------- - + Meine zwei Jahre in Russland @@ -80,23 +91,25 @@ Your files should look similar to this: -
+

Emma Goldman

Meine zwei Jahre in Russland

-
+ -

1. Auflage
- München, Januar 2020

+
+

1. Auflage
+ München, Januar 2020

- + -

Die englische Originalausgabe erschien 1921 und 1925 in den - USA aufgrund eines Versehens in zwei Teilen unter den Titeln - My Disillusionment in Russia und My Further Disillusionment in - Russia.

+

Die englische Originalausgabe erschien 1921 und 1925 in den + USA aufgrund eines Versehens in zwei Teilen unter den Titeln + My Disillusionment in Russia und My Further Disillusionment in + Russia.

+