Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds pdfcrop to crop svg->pdf output #61

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ ODF2PDF?= soffice --convert-to pdf
ODF2PDFFLAGS?=--headless
INKSCAPE?= inkscape
INKSCAPEFLAGS?= -D -z --export-latex
PDFCROP?= pdfcrop
PDFCROPFLAGS?=
DIA?= dia
DIAFLAGS?=
XCF2PNGFLAGS?= -flatten
Expand Down Expand Up @@ -75,6 +77,7 @@ todo:

%.pdf: %.svg
${INKSCAPE} ${INKSCAPEFLAGS} --file=$< --export-pdf=$@
${PDFCROP} $@
%.ps: %.svg
${INKSCAPE} ${INKSCAPEFLAGS} --file=$< --export-ps=$@

Expand Down
3 changes: 3 additions & 0 deletions doc.mk.nw
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,13 @@ Unlike previously, we will only allow flags for [[inkscape]] to be set.
<<variables>>=
INKSCAPE?= inkscape
INKSCAPEFLAGS?= -D -z --export-latex
PDFCROP?= pdfcrop
PDFCROPFLAGS?=
@
<<SVG to PDF>>=
%.pdf: %.svg
${INKSCAPE} ${INKSCAPEFLAGS} --file=$< --export-pdf=$@
${PDFCROP} $@
@ We can thus create similar rules for the formats PS and EPS, instead of PDF.
<<SVG to PS>>=
%.ps: %.svg
Expand Down