diff --git a/doc.mk b/doc.mk index 169fab5..0dd4a65 100644 --- a/doc.mk +++ b/doc.mk @@ -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 @@ -75,6 +77,7 @@ todo: %.pdf: %.svg ${INKSCAPE} ${INKSCAPEFLAGS} --file=$< --export-pdf=$@ + ${PDFCROP} $@ %.ps: %.svg ${INKSCAPE} ${INKSCAPEFLAGS} --file=$< --export-ps=$@ diff --git a/doc.mk.nw b/doc.mk.nw index 08169f0..614a9c6 100644 --- a/doc.mk.nw +++ b/doc.mk.nw @@ -213,10 +213,13 @@ Unlike previously, we will only allow flags for [[inkscape]] to be set. <>= INKSCAPE?= inkscape INKSCAPEFLAGS?= -D -z --export-latex +PDFCROP?= pdfcrop +PDFCROPFLAGS?= @ <>= %.pdf: %.svg ${INKSCAPE} ${INKSCAPEFLAGS} --file=$< --export-pdf=$@ + ${PDFCROP} $@ @ We can thus create similar rules for the formats PS and EPS, instead of PDF. <>= %.ps: %.svg