From 7b408b42ec0aaaf2fcf42f3b2eb40ebe55063a8e Mon Sep 17 00:00:00 2001 From: Valentin Vidic Date: Mon, 2 Oct 2017 16:17:35 +0200 Subject: [PATCH] Delete empty pages from pdf --- debian/fix_latex | 9 +++++++++ debian/rules | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 debian/fix_latex 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: -- 1.7.10.4