Ajout de make pdf avec weasyprint
This commit is contained in:
parent
43f7692b9c
commit
89d46fdcc8
2 changed files with 83 additions and 0 deletions
12
Makefile
12
Makefile
|
|
@ -18,3 +18,15 @@ help:
|
|||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||
%: Makefile
|
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
||||
# Default make weasyprint target has a bug so we have to call it manually on the generated index.html file
|
||||
# After that, extract table of content data from the pdf and generate a .tex file
|
||||
# Then generate a toc.pdf from the .tex file
|
||||
# And put them together in a .pdf file
|
||||
# After all, clean up
|
||||
pdf: weasyprint
|
||||
weasyprint build/weasyprint/index.html build/weasyprint/index.pdf -s source/css/print-theme.css
|
||||
./pdftoc-to-latex build/weasyprint/index.pdf > build/weasyprint/toc.tex
|
||||
- pdflatex -interaction nonstopmode -output-directory=build/weasyprint build/weasyprint/toc.tex
|
||||
pdftk A=build/weasyprint/index.pdf B=build/weasyprint/toc.pdf cat A1 B A2-end output build/weasyprint/vheliotech.pdf
|
||||
rm build/weasyprint/index.pdf build/weasyprint/toc.tex build/weasyprint/toc.pdf build/weasyprint/GuidedemontageVheliotech.pdf
|
||||
Loading…
Add table
Add a link
Reference in a new issue