From 2bdeed15387f2661661b87c2a41e541d6ac37de2 Mon Sep 17 00:00:00 2001 From: kogo59 Date: Sat, 24 Sep 2022 22:20:50 +0200 Subject: [PATCH] HTML --- Makefile | 22 +++++++++++++++------- chapters/preface/metadata_pdf_html.md | 12 ++++++++++++ 2 files changed, 27 insertions(+), 7 deletions(-) create mode 100644 chapters/preface/metadata_pdf_html.md diff --git a/Makefile b/Makefile index 3a5ca1f..8ad9f50 100644 --- a/Makefile +++ b/Makefile @@ -20,9 +20,12 @@ METADATA_ARG = --metadata-file=$(METADATA) METADATA_PDF = chapters/preface/metadata_pdf_html.md PREFACE_EPUB = chapters/preface/preface_epub.md PREFACE_HTML_PDF = chapters/preface/preface_html_pdf.md -ARGS = $(TOC) $(MATH_FORMULAS) $(CSS_ARG) $(METADATA_ARG) --reference-location=block +ARGS = $(TOC) $(MATH_FORMULAS) $(CSS_ARG) $(METADATA_ARG) --reference-location=section +ARGS_HTML = $(TOC) $(MATH_FORMULAS) $(CSS_ARG) --reference-location=section --metadata=lang:de #CALIBRE="../../calibre/Calibre Portable/Calibre/" -CALIBRE="C:/Program Files/Calibre2/" +#CALIBRE="C:/Program Files/Calibre2/" +CALIBRE="" +PANDOC = "pandoc" all: book @@ -37,18 +40,23 @@ html: $(BUILD)/html/$(OUTPUT_FILENAME).html pdf: $(BUILD)/pdf/$(OUTPUT_FILENAME).pdf -docx: $(BUILD)/docx/$(OUTPUT_FILENAME).docx - $(BUILD)/epub/$(OUTPUT_FILENAME).epub: $(MAKEFILE) $(METADATA) $(CHAPTERS) $(CSS_FILE) $(CSS_FILE_KINDLE) $(IMAGES) \ $(COVER_IMAGE) $(METADATA) $(PREFACE_EPUB) mkdir -p $(BUILD)/epub - "C:\Program Files\Pandoc/pandoc" $(ARGS) --from markdown+raw_html+fenced_divs+fenced_code_attributes+bracketed_spans --to epub+raw_html --resource-path=$(IMAGES_FOLDER) --epub-cover-image=$(COVER_IMAGE) -o $@ $(PREFACE_EPUB) $(CHAPTERS) + $(PANDOC) $(ARGS) --epub-chapter-level=2 --from markdown+raw_html+fenced_divs+fenced_code_attributes+bracketed_spans --to epub+raw_html --resource-path=$(IMAGES_FOLDER) --epub-cover-image=$(COVER_IMAGE) -o $@ $(PREFACE_EPUB) $(CHAPTERS) $(CALIBRE)ebook-polish --add-soft-hyphens -i -p -U $@ $@ $(CALIBRE)ebook-convert $@ $(BUILD)/epub/$(OUTPUT_FILENAME).azw3 --share-not-sync --disable-font-rescaling $(CALIBRE)ebook-convert $(BUILD)/epub/$(OUTPUT_FILENAME).azw3 $(BUILD)/epub/$(OUTPUT_FILENAME).mobi --share-not-sync --disable-font-rescaling --mobi-file-type both +docx: $(BUILD)/docx/$(OUTPUT_FILENAME).docx $(BUILD)/docx/$(OUTPUT_FILENAME).docx: $(MAKEFILE) $(METADATA) $(CHAPTERS) $(CSS_FILE) $(CSS_FILE_KINDLE) $(IMAGES) \ - $(COVER_IMAGE) $(PREFACE_HTML_PDF) + $(COVER_IMAGE) mkdir -p $(BUILD)/docx - pandoc $(ARGS) --from markdown+raw_html+fenced_divs+fenced_code_attributes+bracketed_spans --to docx --resource-path=$(IMAGES_FOLDER) -o $@ $(CHAPTERS) + pandoc $(ARGS_HTML) --from markdown+raw_html+fenced_divs+fenced_code_attributes+bracketed_spans --to docx --resource-path=$(IMAGES_FOLDER) -o $@ $(METADATA_PDF) $(PREFACE_EPUB) $(CHAPTERS) + +$(BUILD)/html/$(OUTPUT_FILENAME).html: $(MAKEFILE) $(METADATA) $(CHAPTERS) $(CSS_FILE) $(IMAGES) $(COVER_IMAGE) $(METADATA_PDF) + mkdir -p $(BUILD)/html + cp *.css $(IMAGES_FOLDER) + pandoc $(ARGS_HTML) --self-contained --standalone --resource-path=$(IMAGES_FOLDER) --from markdown+pandoc_title_block+raw_html+fenced_divs+fenced_code_attributes+bracketed_spans+yaml_metadata_block --to=html5 -o $@ $(METADATA_PDF) $(PREFACE_EPUB) $(CHAPTERS) + rm $(IMAGES_FOLDER)/*.css diff --git a/chapters/preface/metadata_pdf_html.md b/chapters/preface/metadata_pdf_html.md new file mode 100644 index 0000000..1069917 --- /dev/null +++ b/chapters/preface/metadata_pdf_html.md @@ -0,0 +1,12 @@ +% Die Zugspitz-Expedition zur Errichtung eines vergoldeten Eisen-Cylinder-Kreuzes. +% Christoph Ott + Der Urheber dieses Werks ist vor 1940 gestorben, es ist daher gemeinfrei, + weil seine urheberrechtliche Schutzfrist abgelaufen ist. Dies gilt für das + Herkunftsland des Werks und alle weiteren Staaten mit einer gesetzlichen + Schutzfrist von 80 oder weniger Jahren nach dem Tod des Urhebers. + Dieses Werk ist gemeinfrei in den Vereinigten Staaten, weil es + vor dem 1. Januar 1924 veröffentlicht wurde.

+ E-Buch erstellt von kogo@gmx.de.

+ Dieses Werk basiert auf dem Digitalisat des [DAV](http://www.dav-bibliothek.de/webOPAC/Buecher/Ott.Zugspitzexpedition.pdf) und ist Public Domain.

+% 1851, Christian Kaiser

+