texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

texinfo ChangeLog contrib/booklet.mak


From: karl
Subject: texinfo ChangeLog contrib/booklet.mak
Date: Thu, 07 Feb 2013 18:19:28 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     karl <karl>     13/02/07 18:19:28

Modified files:
        .              : ChangeLog 
Added files:
        contrib        : booklet.mak 

Log message:
        new contribution from John Darrington

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/contrib/booklet.mak?cvsroot=texinfo&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texinfo/ChangeLog?cvsroot=texinfo&r1=1.1543&r2=1.1544

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/texinfo/texinfo/ChangeLog,v
retrieving revision 1.1543
retrieving revision 1.1544
diff -u -b -r1.1543 -r1.1544
--- ChangeLog   7 Feb 2013 18:14:45 -0000       1.1543
+++ ChangeLog   7 Feb 2013 18:19:28 -0000       1.1544
@@ -1,5 +1,7 @@
 2013-02-07  Karl Berry  <address@hidden>
 
+       * contrib/booklet.mak: new contribution from John Darrington.
+
        * Pod-Simple-Texinfo/pod2texi.pl (preamble): back to inserting
        the default.
        * contrib/perldoc-all/GNUmakefile (pod2texi_args): omit it.

Index: contrib/booklet.mak
===================================================================
RCS file: contrib/booklet.mak
diff -N contrib/booklet.mak
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ contrib/booklet.mak 7 Feb 2013 18:19:28 -0000       1.1
@@ -0,0 +1,89 @@
+# -*- makefile -*-
+#
+# booklet.mak - making booklets from Texinfo.
+#
+# Copyright 2013 John Darrington.
+#
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# This makefile can be used to generate booklets from Texinfo sources.
+# It reduces each page to A5 size and renders two pages per sheet onto
+# A4 landscape.  The pages are ordered into a "quire" or "gathering".
+# This means that you can print the result on a standard laser printer,
+# fold in half and using simple stapler bind the result into a 
+# booklet.
+
+# Targets are <foo>-{a4,a5}-book.{dvi,ps,pdf} where <foo>.texi is the texinfo
+# source file.
+# It is suitable for Texinfo documents up to approx. 70 pages.
+
+# The *-a4-book targets produce A4 half area reduced pages.  The *-a5-book
+# targets produce A5 full sized pages.  The *a5-book option will therefore
+# have larger text, but will have a higher page count.  It may also have
+# problems if the document has @display or @example environments with 
+# long lines.
+
+# Example of use:
+# 1. make -f Makebook manual-a4-book.ps
+# 2. Print the result on a double sided laser printer.  Alternatively
+#  if your laser printer does not support double sided printing, print the ODD
+#  numbered sheets, retreive the result from the printer and thinking carefully
+#  about the page orientation, shove them back into the paper tray.  Depending
+#  on your printer, you may have to reverse the order of the sheets.  Then 
print
+#  the EVEN numbered sheets.  I find gv usefull for this.
+# 3. Fold the result along the short dimension.
+# 4. Staple in place, using a long arm stapler.
+# 5. Using a guillotine cut the pages such that their edges co-incide.
+# 6. Sit back in an armchair and enjoy your reading.
+
+# For those of you who live in countries which refuse to conform to ISO 216,
+# you have a problem.
+
+# End of instructions.
+
+all:
+       echo 'Usage: make -f Makebook <target>'
+
+
+# Mutate the source, with appropriate headings, overriding anything that the 
+# author has thoughtlessly imposed.
+# We want to specify the paper size, and double headings.  Anything else?
+%-a4.texi: %.texi
+       sed -e 's/@afivepaper/@afourpaper/' -e '/@end titlepage/a @headings 
double' $< > $@
+
+%-a5.texi: %.texi
+       sed -e 's/@afourpaper/@afivepaper/' -e '/@end titlepage/a @headings 
double' $< > $@
+
+# Older versions of Texinfo break if the locale is non-english.
+%.dvi: %.texi
+       LC_ALL=C texi2dvi $< -o $@
+
+
+# Reorder the dvi into the correct order for the quire.
+%-sig.dvi: %.dvi
+       dvibook $< -o $@
+
+# Render 2 pages per sheet, ensuring there is an appropriate "gutter"
+%-a5-book.dvi: %-a5-sig.dvi
+       dvitodvi  '2:0+1(148mm,0)' $< $@
+
+%-a4-book.dvi: %-a4-sig.dvi
+       dvitodvi  '2:address@hidden(-15mm,-5mm)+1(210mm,-5mm)' $< $@
+
+# print the result in landscape orientation
+%.ps: %.dvi
+       dvips -t a4 -t landscape -t landscape $< -o $@
+
+%.pdf: %.ps
+       ps2pdf $< $@
+
+
+.PHONY: clean
+clean:
+       $(RM) *-a[54].*



reply via email to

[Prev in Thread] Current Thread [Next in Thread]