update makebook

This commit is contained in:
Sebastian Hugentobler 2020-05-21 13:38:04 +02:00
parent 47bc49bf0e
commit 1c094f9082

View File

@ -6,9 +6,9 @@
#
#**********************************************************#
# makebook #
# written by Donald P. Goodman III #
# Copyright (C) 2011 #
# #
# written by Donald P. Goodman III #
# Copyright (C) 2011 #
# #
# Impose pdf pages for binding #
#**********************************************************#
#
@ -60,27 +60,27 @@ VERT_OFFSET=0
SCALE=1
# make sure user has the right programs installed, and die
# horribly if not
command -v od >/dev/null 2>&1 ||
command -v od >/dev/null 2>&1 ||
{ echo >&2 "makebook: error: requires od, but it's not installed";
exit $E_NO_PROG;
}
command -v pdflatex >/dev/null 2>&1 ||
command -v pdflatex >/dev/null 2>&1 ||
{ echo >&2 "makebook: error: requires pdflatex, but it's not installed";
exit $E_NO_PROG;
}
command -v pdfinfo >/dev/null 2>&1 ||
command -v pdfinfo >/dev/null 2>&1 ||
{ echo >&2 "makebook: error: requires pdfinfo, but it's not installed";
exit $E_NO_PROG;
}
command -v pdftk >/dev/null 2>&1 ||
command -v pdftk >/dev/null 2>&1 ||
{ echo >&2 "makebook: error: requires pdftk, but it's not installed";
exit $E_NO_PROG;
}
command -v dc >/dev/null 2>&1 ||
command -v dc >/dev/null 2>&1 ||
{ echo >&2 "makebook: error: requires dc, but it's not installed";
exit $E_NO_PROG;
}
command -v bc >/dev/null 2>&1 ||
command -v bc >/dev/null 2>&1 ||
{ echo >&2 "makebook: error: requires bc, but it's not installed";
exit $E_NO_PROG;
}
@ -103,8 +103,8 @@ helpfunc ()
cat <<End-of-help
makebook v${REVISION}. Copyright (C) 2011, Donald P. Goodman III.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to
redistribute it under certain conditions; see
This is free software, and you are welcome to
redistribute it under certain conditions; see
the GNU GPL v3 for details.
-V: Prints license and version information, then exits
@ -136,7 +136,7 @@ unitarg ()
then
echo "ERROR: dimension \"$1\" not valid." >&2
exit $E_BAD_UNIT
fi
fi
if [ `expr match "$1" '.*\(in\)'` ]
then
OPTARG=`echo "scale=0; ${1%in} * 72" | bc`
@ -374,8 +374,8 @@ fi
tmp=`expr $NUM_PAGES + $NUM_BLANKS`
if [ $VERBOSE -eq 1 ]
then
echo "IMPOSING $NUM_PAGES pages ($tmp with blanks) on
$(dc -e "$NUM_SIGS $SECT_TYPE * p") signature(s) gathered in
echo "IMPOSING $NUM_PAGES pages ($tmp with blanks) on
$(dc -e "$NUM_SIGS $SECT_TYPE * p") signature(s) gathered in
sections of $SECT_TYPE signature(s) each...";
fi
# arrange the pages for impression on signatures
@ -643,8 +643,8 @@ fi
if [ $VERBOSE -eq 1 ]
then
echo "`expr $NUM_PAGES + $NUM_BLANKS` pages imposed in
$(dc -e "$NUM_SIGS $SECT_TYPE * p") $SIG_TYPE signatures gathered
in sections of $SECT_TYPE signature(s) each and output to
$(dc -e "$NUM_SIGS $SECT_TYPE * p") $SIG_TYPE signatures gathered
in sections of $SECT_TYPE signature(s) each and output to
${OUTFILE_NAME%.pdf}.pdf."
fi
if [ "$OUTFILE_NAME" = "stdout" ]