View Single Post
Old 07-11-2014, 04:10 AM   #1
Leonatus
Wizard
Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.
 
Leonatus's Avatar
 
Posts: 1,027
Karma: 11066877
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
Epub erstellen mit Notepad

Insbesondere Fachleute ziehen es manchmal vor, epubs nicht mit Hilfe von Sigil, Calibre oder anderen Tools zu erstellen, sondern "direkt" über einen Texteditor. Als Nicht-Fachmann kann es hilfreich sein, zumindest einzelne der einzelnen Schritte dazu nachvollziehen zu können; das verschafft immerhin einen Überblick über die Struktur eines epub. Ich selbst konnte auf diese Weise den einen oder anderen Fehler ausräumen.

Ich habe bei David J Pedersen
Code:
http://www.gotangst.com/p/how-to-make-e-book-in-epub-format-with.html
eine einfache Anleitung dazu gefunden und mir eine Übersetzung mit größerer Strukturieerung der einzelnen Schritte angefertigt. Ich sehe keinen Grund, das nicht der Allgemeinheit zur Verfügung zu stellen.

Hier also:

Spoiler:
Epub erstellen mit Notepad++ und WinZip
nach David J Pedersen
http://www.gotangst.com/p/how-to-mak...rmat-with.html


Erforderlich:
• Texteditor (hier Notepad++)
• Kompressionstool (hier WinZip)

Unter Windows sicherstellen, dass Dateierweiterungen sichtbar sind.

Zu erstellende Dateistruktur:

Ordner book
Ordner META-INF
Ordner OEBPS
Ordner images

Ordner Enthält
META-INF container.xml
OEBPS content.opf, toc.ncx, stylesheet.css, chapters.xhtml, images
images Cover und andere Illustrationen

Schritte:

1. In Notepad Ordner „book“ erstellen

2. Darin die Ordner META-INF und OEBPS erstellen

3. mimetype im Ordner book als Textdatei erstellen
a. Dazu im book-Ordner rechtsklicken und „neu“ auswählen
b. Dann „Textdokument“ auswählen
c. Auf Textdokument doppelklicken, um es zu öffnen
d. Kopieren und einfügen 'application/epub+zip' (ohne Kolon)
e. Umbenennen der Datei in „mimetype“ und nicht „mimetype.txt“; Warnung ignorieren

4. In META-INF Datei container.xml erstellen
a. Auf META-INF doppelklicken
b. Im Ordner rechtsklicken und „Neues Textdokument“ auswählen
c. Auf neues Textdokument doppelklicken und einfügen:

<?xml version="1.0"?>
<container version="1.0" xmlns="urnasis:names:tcpendocument:xmlns:conta iner">
<rootfiles>
<rootfile full-path="OEBPS/content.opf" media-type="application/oebps-package+xml"/>
</rootfiles>
</container>
d. Speichern und Notepad schließen. Dateibezeichnung ändern in „container.xml“

5. Im Ordner OEBPS für jedes Kapitel folgende Dateien erstellen
a. content.opf
b. title_page.xhtml
c. toc.ncx (Inhaltsverzeichnis)
d. stylesheet.css
e. und ein „images“ Ordner
alle Dateien (nicht den Ordner) als Textdateien und wie angegeben umbenennen

6. Jedes Kapitel des Buches als .xhtml Datei erstellen, z. B. „chapter01.xhtml“, etwa in der Weise:


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Chapter 1</title>
<link href="stylesheet.css" type="text/css" rel="stylesheet" />
</head>
<body>
<div>
<h3>Chapter 1</h3>
&nbsp;&nbsp;&nbsp;&nbsp;Angst was not happy. This was not an uncommon statement, or a fleeting concern caused by a recent event. Unfortunately, this had been his state of mind for years and today's project reaffirmed everything he believed to be wrong with his life. His expectations lay heavy on his shoulders, making them droop like the nearby tables burdened with enormous stacks of paper and parchment. He sighed at the discouraging mess, which almost reached high enough to block the hint of sunlight creeping through the castle window. Paper dust filled the air, providing the light a solid quality that seemed to point to the door.<br />
</div>
</body>
</html>


7. Ein stylesheet.css entsprechend den eigenen Bedürfnissen erstellen, etwa so:

/* Style Sheet */
/* This defines styles and classes used in the book */
body { margin-left: 5%; margin-right: 5%; margin-top: 5%; margin-bottom: 5%; text-align: justify; }
pre { font-size: x-small; }
h1 { text-align: center; }
h2 { text-align: center; }
h3 { text-align: center; }
h4 { text-align: center; }
h5 { text-align: center; }
h6 { text-align: center; }
p { text-indent : 10px; }


.CI {
text-align:center;
margin-top:0px;
margin-bottom:0px;
padding:0px;
}
.center {text-align: center;}
.smcap {font-variant: small-caps;}
.u {text-decoration: underline;}
.bold {font-weight: bold;}
.footer {
position:absolute;
bottom:0;
width:100%;
height:60px; /* Height of the footer */
background:#6cf;
}

CSS-Kenntnisse sind erforderlich; CSS kann in Notepad erstellt werden (mit Dateiendung)

8. Für die title_page.xhtml schlägt Verf. vor:


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Angst</title>
<link href="stylesheet.css" type="text/css" rel="stylesheet" />
</head>
<body>
<div>
<h1>Angst</h1><br />
<h1>by David J. Pedersen</h1>
<br /><br /><br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;(c) 2010 by David J. Pedersen All rights reserved.<br />
&nbsp;&nbsp;&nbsp;&nbsp;ISBN 1-452-82408-8<br />
&nbsp;&nbsp;&nbsp;&nbsp;EAN-13 9781452824086<br />
</div>
</body>
</html>
9. Für toc.ncx zu beachten:
a. Jede Zeile von <navPoint id=...> zu </navPoint> für jedes Kapitel erstellen
b. Bei meta name="dtb:uid" content="" einen spezifischen Identifizierer verwenden, etwa ISBN-Nummer (wenn vorhanden).
c. Vorschlag Verf.:

<?xml version="1.0" encoding="UTF-8"?>
<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1">
<head>
<meta name="dtb:uid" content="1452824088"/>
<meta name="dtb:depth" content="1"/>
<meta name="dtb:totalPageCount" content="0"/>
<meta name="dtb:maxPageNumber" content="0"/>
</head>
<docTitle>
<text>Angst</text>
</docTitle>
<navMap>
<navPoint id="titlepage" playOrder="1">
<navLabel>
<text>Title Page</text>
</navLabel>
<content src="title_page.xhtml"/>
</navPoint>
<navPoint id="dedication" playOrder="2">
<navLabel>
<text>Acknowledgements</text>
</navLabel>
<content src="dedication.xhtml"/>
</navPoint>
<navPoint id="chapter01" playOrder="3">
<navLabel>
<text>Chapter 1</text>
</navLabel>
<content src="chapter01.xhtml"/>
</navPoint>
<navPoint id="chapter02" playOrder="4">
<navLabel>
<text>Chapter 2</text>
</navLabel>
<content src="chapter02.xhtml"/>
</navPoint>
</navMap>
</ncx>

d. Für Umschlagbild lautet der Vorschlag:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Cover</title>
<style type="text/css"> img { max-width: 100%; } </style>
</head>
<body>
<div id="cover-image">
<img src="images/Angst.jpg" alt="Angst by David J Pedersen"/>
</div>
</body>
</html>

e. Ein Cover-Bild muss in den images-Ordner. Für die verschiedenen ebook reader gibt es wegen der Größe unterschiedliche Standards. ver. schlägt 600x800 pixel vor. Eigene Erfahrung: 1563x2500 px.

10. Die Datei content.opf folgt folgender Struktur: (Vorschlag des Verf.)

<?xml version="1.0"?>
<package xmlns="http://www.idpf.org/2007/opf" version="2.0" unique-identifier="bookid">
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlnspf="http://www.idpf.org/2007/opf">
<dc:title>Angst</dc:title>
<dc:creator>David J Pedersen</dc:creator>
<dc:language>en-US</dc:language>
<dc:identifier id="bookid">urn:uuid:1452824088</dc:identifier>
<meta name="cover" content="cover-image"/>
</metadata>
<manifest>
<item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml"/>
<item id="style" href="stylesheet.css" media-type="text/css" />
<item id="cover" href="cover.html" media-type="application/xhtml+xml" />
<item id="imgl" href="images/Angst.jpg" media-type="image/jpeg" />
<item id="titlepage" href="title_page.xhtml" media-type="application/xhtml+xml"/>
<item id="dedication" href="dedication.xhtml" media-type="application/xhtml+xml"/>
<item id="chapter01" href="chapter01.xhtml" media-type="application/xhtml+xml" />
<item id="chapter02" href="chapter02.xhtml" media-type="application/xhtml+xml" />
</manifest>
<spine toc="ncx">
<itemref idref="cover" linear="no"/>
<itemref idref="titlepage"/>
<itemref idref="dedication"/>
<itemref idref="chapter01"/>
<itemref idref="chapter02"/>
</spine>
<guide>
<reference href="cover.html" type="cover" title="Cover"/>
</guide>
</package>

Dabei gilt:
• dc:creator ist der Autor
• dc:language, Sprache; für deutsch: de-DE
• dc:identifier ist eine spezifische Reihe von Buchstaben und Ziffern, die mit dem identifier im toc.ncx übereinstimmen muss (gegfls. ISDN)
• manifest enthält jedes im OEBPS Ordner enthaltene Dokument, für jedes Kapitel; darüber hinaus kommen alle möglichen Metadaten in Betracht

11. In .zip-Format packen:
• mimetype-Datei kann nicht komprimiert werden, wenn sie zum Zip-Ordner hinzugefügt wird, daher besonderes Verfahren
• Rechtsklicken im book-Ordner (freier Platz)
• „Neu“ auswählen
• „WinZip-Datei“ auswählen
• Es wird erstellt: „Neue WinZip Datei.zip“
• Zum Öffnen doppelklicken
• Mimtype-Datei auswählen und in die neue WinZip Datei.zip ziehen
• Schaltfläche „Hinzufügen“ öffnet sich
• „Komprimierung auf „Keine“ einstellen, dann „Hinzufügen“ klicken
• „Neue WinZip Datei.zip“ schließen
• META-INF und OEBPS Ordner auf „Neue WinZip Datei.zip“ ziehen
• Fenster öffnet sich; Komprimierung sollte auf „Normal“ voreingestellt sein
• Haken entfernen bei „System- und verborgene Dateien einschließen“
• „Hinzufügen“ klicken
• Schließen und „Neue WinZip Datei.zip“ umbenennen in „.epub“. Als Name bietet sich der Buchtitel an, also „Buchtitel.epub“

Damit ist epub erstellt. Auf der Homepage des zitierten Artikels finden sich weitere Hinweise, insbesondere zum Testen des epub.


Oh, die Smilies sind auf entsprechende Tastenkombinationen zurückzuführen.

Last edited by Leonatus; 07-11-2014 at 04:12 AM.
Leonatus is offline   Reply With Quote