From: Valentin Vidic Date: Mon, 2 Oct 2017 14:17:35 +0000 (+0200) Subject: Delete empty pages from pdf X-Git-Tag: debian/9.0.0~3 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=7b408b42ec0aaaf2fcf42f3b2eb40ebe55063a8e;p=carnet-upgrade.git Delete empty pages from pdf --- diff --git a/debian/fix_latex b/debian/fix_latex new file mode 100755 index 0000000..96179e0 --- /dev/null +++ b/debian/fix_latex @@ -0,0 +1,9 @@ +#!/bin/sh + +if [ "$1" = "-l" ]; then + # ignore lang settings + shift 2 +fi + +# prevent latex from adding empty pages +sed '1s|^\(\\documentclass\[.*\)\(\]{book}\)|\1,openany\2|' <$1 >$2 diff --git a/debian/rules b/debian/rules index b94f454..447df9d 100755 --- a/debian/rules +++ b/debian/rules @@ -24,7 +24,7 @@ override_dh_auto_build: mv doc/index.html doc/carnet-upgrade.html # Build pdf docs - (cd doc; debiandoc2pdf -l hr_HR.UTF-8 carnet-upgrade.sgml) + (cd doc; debiandoc2pdf -l hr_HR.UTF-8 -s ../debian/fix_latex carnet-upgrade.sgml) rm doc/carnet-upgrade.tpt override_dh_install: