[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] Unix Text Processing - PDF Bookmarks
From: |
Deri James |
Subject: |
[Groff] Unix Text Processing - PDF Bookmarks |
Date: |
Wed, 23 Jan 2013 16:21:28 +0000 |
User-agent: |
KMail/4.8.5 (Linux/3.4.24-desktop-3.mga2; KDE/4.8.5; x86_64; ; ) |
I have now completed the patch to the Unix Text Professing book to add pdf
bookmarks to it.
The results can be downloaded here:-
<http://chuzzlewit.co.uk/utp_book-1.1.pdf>
The attached patch can be applied to the existing UTP source by doing:-
patch -p1 <../patch-utp-1.0-v3.diff
rm -rf index #optional - no longer used
chmod +x mkindex.pl
make
There is a second make file which you can use to generate the same book but
using pdfroff instead of gropdf. It can be used as "make -f Makefile.pdfroff".
Notes:-
Gropdf version.
Unless you use the latest CVS version of groff the pdf produced has two
faults:-
A) The thick line on the front page will have square caps instead of round
caps, and
B) The entries for "Preface" and "Chapter 4" will be open in the bookmarks
pane of the pdf reader (should be closed).
PDFroff version.
A further patch is required to pdfmark.tmac changing it to use the \! to
communicate with grops instead of \X. The reason is because in certain
circumstances groff can insert a blank line when planting a bookmark. The
newer \! escape does not do this. Without the patch you will see extra space
in the book which should not be there. This patch is not "release quality
since it only corrects the behaviour if the length of the pdfmark inserted
into the postscript is greater than 255 characters (none of the UTP
bookmarks). On further thought, it may be better to use the .ouput directive
now it is available.
Cheers
Deri
patch-utp-1.0-v3.diff
Description: Text Data
patch-pdfmark.diff
Description: Text Data
- [Groff] Unix Text Processing - PDF Bookmarks,
Deri James <=