template-ebook/README.md
2025-05-18 19:33:42 +02:00

179 lines
5.6 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# eBook - Dokumentation Vorlage
**Gleichzeitig eBook-Template für Maniskripte in Markdown**
![Buch-Logo](./media/logo/logo-v2-256x256.png)
Dieses Manuskript dient mir persönlich auch als Template für andere eBooks daher sind viele Stellen explizit sehr detailiert beschrieben.
## Inhalt
- [eBook - Dokumentation Vorlage](#ebook---dokumentation-vorlage)
- [Inhalt](#inhalt)
- [Infos](#infos)
- [Struktur](#struktur)
- [Installation und Build](#installation-und-build)
- [Nötige Software für den Build](#nötige-software-für-den-build)
- [Templates](#templates)
- [PDF](#pdf)
- [eBook (epub)](#ebook-epub)
- [DOCX (Office/ Word)](#docx-office-word)
- [Build](#build)
- [Lizenz](#lizenz)
---
## Infos
---
## Struktur
```plaintext
book/
├── manuscript/ # Hauptinhalt in Markdown-Dateien
│ ├── 00_vorwort.md
│ ├── 01_einleitung.md
│ ├── 02_kapitel1.md
│ ├── ...
│ └── 99_anhang.md
├── media/ # Bilder, Grafiken, Diagramme usw.
│ ├── kapitel1/
│ │ └── bild1.png
│ └── kapitel2/
│ └── diagramm.svg
├── styles/ # Pandoc-Templates, LaTeX-Vorlagen, CSS
│ ├── ebook-template.tex
│ ├── ebook.css
│ └── print-template.tex
├── build/
├── metadata/
│ ├── title.txt
│ ├── author.txt
│ └── ebook.yaml
├── Makefile #
├── README.md # Projektdokumentation
└── LICENSE # Lizenz für das Buch (z.B. CC-BY)
📁 ./ #
├── 📁 build # Ausgabeordner (wird vom Build-Prozess befüllt)
│ └── 📄 .gitkeep # Platzhalter damit git leere Verzeichnisse trackt
├── 📁 manuscript #
│ ├── 📄 00_deckblatt.md #
│ ├── 📄 05_vorwort.md #
│ ├── 📄 10_kapitel1.md #
│ ├── 📄 20_kapitel2.md #
│ └── 📄 30_kapitel2.md #
├── 📁 media #
│ ├── 📁 logo #
│ │ ├── 📄 logo-v1.png #
│ │ ├── 📄 logo-v2-256x256.png #
│ │ └── 📄 logo-v2.png #
│ └── 📄 favicon.ico #
├── 📁 metadata # Metadaten für eBook, Titelblatt, Author etc
│ ├── 📄 author.txt #
│ └── 📄 ebook.yaml #
├── 📁 styles #
│ ├── 📄 ebook-template.tex #
│ ├── 📄 ebook.css #
│ ├── 📄 print-template.tex #
│ └── 📄 reference.docx #
├── 📄 .gitignore #
├── 📄 CHANGELOG.md #
├── 📄 desktop.ini #
├── 📄 LICENSE #
├── 📄 Makefile # Automatisierter Build-Prozess mit Pandoc etc.
├── 📄 README.md # Diese Datei - Erklärung zum Build des Buchs
└── 📄 VERSION # Paketversion (ohne Zeilenumbruch einzeilig 0.0.0)
```
---
## Installation und Build
### Nötige Software für den Build
**Hinweis: TeX unter Windows?**
Obwohl es grundsätzlich möglich ist, TeX unter Windows zu installieren und auch entsprechende Distributionen wie MiKTeX oder TeX Live für Windows existieren rate ich dringend davon ab, auf diesem Weg zu starten.
Für einen stabilen und reproduzierbaren Build-Prozess empfiehlt sich stattdessen der Einsatz eines Linux-Systems. Wenn du kein dediziertes Linux verwendest, ist das Windows Subsystem for Linux (WSL) eine ausgezeichnete Alternative.
>Voraussetzung:
>Du solltest mit `apt` umgehen können und wissen, dass ein `update` vor dem `install` obligatorisch ist.
Falls der Build trotzdem scheitert oder du dir den Aufwand sparen möchtest, lade dir einfach die fertige PDF-Version herunter oder bestelle dir direkt ein gedrucktes Exemplar des Buchs.
- **✅ Pandoc installieren:**
```sh
sudo apt install pandoc
```
- **✅ Empfohlene Installation: TeX Live Full** (ca.8GB)
```sh
sudo apt install texlive-full
```
Wenn NICHT `texlive-full`, dann aber:
- Zusätzlich deutsche Sprache (falls babel fehlt):
```bash
sudo apt install texlive-lang-german
```
Ich empfehle aber dringend `texlive-full` zu installieren da man erfahrungsgemäss am Anfang auf viele Fehler mit fehlenden Abhängigkeiten stößt wenn man Templates testet.
- **✅ Make installieren:**
Make oder besser die Anwendung `make` wird benötigt um die Erstellung der Ziele wie PDF zu automatisiern.
Dafür liegt auch das vorbereitete Skript `Makefile` im Hauptverzeichnis. Die ist nur optional und man kann es selbstverständlich auch manuell durchführen.
```sh
sudo apt install make
```
Ich verwende Version:
```sh
> make -v
GNU Make 4.3
Built for x86_64-pc-linux-gnu
```
### Templates
#### PDF
#### eBook (epub)
#### DOCX (Office/ Word)
### Build
Schau mal ins [`Makefile`](./Makefile), dort findest Du einige Kandidaten um aus dem vorliegenden Markdown Manuskript eine entsprechende Version zu konvertieren. Es stehen zum aktuellen Zeitpunkt folgende zur Verfügung:
```sh
make pdf
make epub
make docx
```
---
## Lizenz
**(C) 2025 - Adam Skotarczak**
---