diff options
Diffstat (limited to 'Makefile')
-rwxr-xr-x | Makefile | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -5,7 +5,7 @@ METADATA = ebook/metadata.xml TOC = --toc --toc-depth=2 --epub-chapter-level=2 COVER_IMAGE = docs/cover.png LATEX_CLASS = book -PANDOC_TEX = pandoc --from="markdown_mmd+link_attributes+backtick_code_blocks+fenced_code_attributes+raw_tex" $(TOC) --latex-engine=xelatex -V documentclass=book +PANDOC_TEX = pandoc --from="markdown_mmd+link_attributes+backtick_code_blocks+fenced_code_attributes+raw_tex+latex_macros" $(TOC) --latex-engine=xelatex -V documentclass=book TEMPLATE=./pdf PREFACES = docs/foreword-trans.md \ docs/foreword-v3.md \ @@ -66,7 +66,7 @@ APPENDIXS = docs/appendix-a.md \ docs/appendix-c.md APPENDIXS_PDF = $(shell echo $(APPENDIXS) | sed 's/.md/_pdf.md/g') PDF_IMG = category.pdf code-zh.pdf song-book-jutta-scrunch-crop-zh.pdf -SVG_IMG = docs/fs-translations/ar-libre.svg docs/fs-translations/be-libre.svg docs/fs-translations/bg-gratis.svg docs/fs-translations/bg-libre.svg docs/fs-translations/bn-libre.svg docs/fs-translations/el-gratis.svg docs/fs-translations/el-libre.svg docs/fs-translations/fa-gratis.svg docs/fs-translations/fa-libre.svg docs/fs-translations/he-gratis.svg docs/fs-translations/he-libre.svg docs/fs-translations/hi-gratis.svg docs/fs-translations/hi-libre.svg docs/fs-translations/hy-libre.svg docs/fs-translations/ja-kanji-gratis.svg docs/fs-translations/ja-kanji-libre.svg docs/fs-translations/ja-libre.svg docs/fs-translations/ka-gratis.svg docs/fs-translations/ka-libre.svg docs/fs-translations/ko-libre.svg docs/fs-translations/mk-gratis.svg docs/fs-translations/mk-libre.svg docs/fs-translations/ml-gratis.svg docs/fs-translations/ml-libre.svg docs/fs-translations/ru-gratis.svg docs/fs-translations/ru-libre.svg docs/fs-translations/si-libre.svg docs/fs-translations/sr-gratis.svg docs/fs-translations/sr-libre.svg docs/fs-translations/ta-gratis.svg docs/fs-translations/ta-libre.svg docs/fs-translations/th-libre.svg docs/fs-translations/uk-libre.svg docs/fs-translations/ur-gratis.svg docs/fs-translations/ur-libre.svg docs/fs-translations/vi-libre.svg docs/fs-translations/zh-cn-free.svg docs/fs-translations/zh-cn-gratis.svg docs/fs-translations/zh-cn-libre.svg docs/fs-translations/zh-tw-free.svg docs/fs-translations/zh-tw-gratis.svg docs/fs-translations/zh-tw-libre.svg +#SVG_IMG = docs/fs-translations/ar-libre.svg docs/fs-translations/be-libre.svg docs/fs-translations/bg-gratis.svg docs/fs-translations/bg-libre.svg docs/fs-translations/bn-libre.svg docs/fs-translations/el-gratis.svg docs/fs-translations/el-libre.svg docs/fs-translations/fa-gratis.svg docs/fs-translations/fa-libre.svg docs/fs-translations/he-gratis.svg docs/fs-translations/he-libre.svg docs/fs-translations/hi-gratis.svg docs/fs-translations/hi-libre.svg docs/fs-translations/hy-libre.svg docs/fs-translations/ja-kanji-gratis.svg docs/fs-translations/ja-kanji-libre.svg docs/fs-translations/ja-libre.svg docs/fs-translations/ka-gratis.svg docs/fs-translations/ka-libre.svg docs/fs-translations/ko-libre.svg docs/fs-translations/mk-gratis.svg docs/fs-translations/mk-libre.svg docs/fs-translations/ml-gratis.svg docs/fs-translations/ml-libre.svg docs/fs-translations/ru-gratis.svg docs/fs-translations/ru-libre.svg docs/fs-translations/si-libre.svg docs/fs-translations/sr-gratis.svg docs/fs-translations/sr-libre.svg docs/fs-translations/ta-gratis.svg docs/fs-translations/ta-libre.svg docs/fs-translations/th-libre.svg docs/fs-translations/uk-libre.svg docs/fs-translations/ur-gratis.svg docs/fs-translations/ur-libre.svg docs/fs-translations/vi-libre.svg docs/fs-translations/zh-cn-free.svg docs/fs-translations/zh-cn-gratis.svg docs/fs-translations/zh-cn-libre.svg docs/fs-translations/zh-tw-free.svg docs/fs-translations/zh-tw-gratis.svg docs/fs-translations/zh-tw-libre.svg all: book html @@ -79,7 +79,7 @@ clean: -rm $(PDF_IMG) -rm -r site -rm $(BOOKNAME).* - -rm $(SVG_IMG) + #-rm $(SVG_IMG) -rm $(PREFACES_PDF) $(CHAPTERS_PDF) $(APPENDIXS_PDF) epub: $(BOOKNAME).epub @@ -90,17 +90,17 @@ pdf: $(BOOKNAME).pdf odf: $(BOOKNAME).odt -$(SVG_IMG): docs/fs-translations/%.svg : docs/fs-translations/%.pdf - pdf2svg $< $@ +#$(SVG_IMG): docs/fs-translations/%.svg : docs/fs-translations/%.pdf + #pdf2svg $< $@ -$(BOOKNAME).epub: $(TITLE) $(PREFACES) $(CHAPTERS) $(APPENDIXS) $(SVG_IMG) +$(BOOKNAME).epub: $(TITLE) $(PREFACES) $(CHAPTERS) $(APPENDIXS) #$(SVG_IMG) ln -s docs/fs-translations/ . #消除Warning # cp docs/*.png . pandoc $(TOC) -S -t epub3 --epub-metadata=$(METADATA) --epub-cover-image=$(COVER_IMAGE) -o $@ $^ #$(shell echo $(SVG_IMG) | sed 's/docs\///g' ) rm fs-translations # rm *.png -$(BOOKNAME).html: $(PREFACES) $(CHAPTERS) $(APPENDIXS) $(SVG_IMG) +$(BOOKNAME).html: $(PREFACES) $(CHAPTERS) $(APPENDIXS) #$(SVG_IMG) ln -s docs/fs-translations/ . #消除Warning pandoc $(TOC) --standalone --to=html5 -o $@ $^ #$(shell echo $(SVG_IMG) | sed 's/docs\///g' ) mkdocs build --clean @@ -111,8 +111,8 @@ $(BOOKNAME).html: $(PREFACES) $(CHAPTERS) $(APPENDIXS) $(SVG_IMG) $(PREFACES_PDF) $(CHAPTERS_PDF) $(APPENDIXS_PDF): docs/%_pdf.md : docs/%.md cp $< $@ -# 编译时把<!--(used-by-pdf)和(used-by-pdf)-->去掉,把<!--(pdf-newline)--><br>替换成\newline{},将svg替换成pdf - sed -i 's/<!--(used-by-pdf)//g;s/(used-by-pdf)-->//g;s/.svg)/.pdf)/g;s/<!--(pdf-newline)--><br>/\\newline{}/g' $@ +# 编译时把<!--(pdf)和(pdf)-->去掉,把<!--(pdf-newline)--><br>替换成\newline{},将svg替换成pdf + sed -i 's/<!--(pdf)//g;s/(pdf)-->//g;s/.svg)/.pdf)/g;s/<!--(pdf-newline)--><br>/\\newline{}/g' $@ $(BOOKNAME).pdf: $(TITLE) $(PREFACES_PDF) $(CHAPTERS_PDF) $(APPENDIXS_PDF) $(PDF_IMG) @@ -140,7 +140,7 @@ define pdfgen @echo "Done!" endef -$(BOOKNAME).odt: $(PREFACES) $(CHAPTERS) $(APPENDIXS) $(SVG_IMG) +$(BOOKNAME).odt: $(PREFACES) $(CHAPTERS) $(APPENDIXS) #$(SVG_IMG) ln -s docs/fs-translations/ . pandoc -t odt -o $@ $^ #$(shell echo $(SVG_IMG) | sed 's/docs\///g' ) rm fs-translations |