Prevent latex from adding empty pages.
authorValentin Vidic <vvidic@carnet.hr>
Mon, 14 Apr 2008 13:26:14 +0000 (15:26 +0200)
committerValentin Vidic <vvidic@carnet.hr>
Mon, 14 Apr 2008 13:26:14 +0000 (15:26 +0200)
debian/fix_latex [new file with mode: 0755]
debian/rules

diff --git a/debian/fix_latex b/debian/fix_latex
new file mode 100755 (executable)
index 0000000..96179e0
--- /dev/null
@@ -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
index 15f214a..acf3b06 100755 (executable)
@@ -25,7 +25,7 @@ build-stamp: doc/carnet-upgrade.sgml
        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
 
        touch $@