[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff-commit] groff/contrib/pdfmark ChangeLog pdfmark.tmac
From: |
Keith Marshall |
Subject: |
[Groff-commit] groff/contrib/pdfmark ChangeLog pdfmark.tmac |
Date: |
Wed, 11 Apr 2007 22:23:48 +0000 |
CVSROOT: /cvsroot/groff
Module name: groff
Changes by: Keith Marshall <keithmarshall> 07/04/11 22:23:48
Modified files:
contrib/pdfmark: ChangeLog pdfmark.tmac
Log message:
* pdfmark.tmac (pdfbookmark): Don't evaluate within diversions; defer
placement until diversion is copied out at top level.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/pdfmark/ChangeLog?cvsroot=groff&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/pdfmark/pdfmark.tmac?cvsroot=groff&r1=1.6&r2=1.7
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/contrib/pdfmark/ChangeLog,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- ChangeLog 30 Jul 2006 21:49:51 -0000 1.20
+++ ChangeLog 11 Apr 2007 22:23:48 -0000 1.21
@@ -1,3 +1,8 @@
+2007-04-11 Keith Marshall <address@hidden>
+
+ * pdfmark.tmac (pdfbookmark): Don't evaluate within diversions; defer
+ placement until diversion is copied out at top level.
+
2006-07-30 Keith Marshall <address@hidden>
* pdfroff.sh (PDFROFF_KILL_NULL_PAGES): Require `%%BeginPageSetup' on
Index: pdfmark.tmac
===================================================================
RCS file: /cvsroot/groff/groff/contrib/pdfmark/pdfmark.tmac,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- pdfmark.tmac 31 Mar 2006 22:07:02 -0000 1.6
+++ pdfmark.tmac 11 Apr 2007 22:23:48 -0000 1.7
@@ -3,7 +3,7 @@
pdfmark.tmac
-Copyright (C) 2004, 2005, 2006
+Copyright (C) 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Keith Marshall (address@hidden)
@@ -661,33 +661,39 @@
.\" $3 = suffix for PDF internal bookmark name (optional)
.\" ------------------------------------------------------------------
.\"
-.if \\n[PDFOPMODE] \{\
+.ie '\\n(.z'' \{\
.\"
-.\" Make the bookmark name "untagged" by default,
-.\" then parse any specified options, to set a "tag", if required
+.\" When we are at the top diversion level, i.e. actually emitting text
+.\" to the output device stream, then we compute the location of, and
+.\" plant this bookmark immediately.
.\"
+. if \\n[PDFOPMODE] \{\
+. \"
+. \" Make the bookmark name "untagged" by default,
+. \" then parse any specified options, to set a "tag", if required
+. \"
. ds pdf:href-T
. while dpdf:href.opt\\$1 \{\
. pdf:href.opt\\$1 \\$@
. shift \\n[pdf:href.argc]
. \}
. rr pdf:href.argc
-.\"
-.\" If we found "--" to mark the end of the options, discard it
-.\"
+. \"
+. \" If we found "--" to mark the end of the options, discard it
+. \"
. if '\\$1'--' .shift
-.\"
-.\" Synchronise the bookmark cache
-.\" to the requested bookmark nesting level
-.\"
+. \"
+. \" Synchronise the bookmark cache
+. \" to the requested bookmark nesting level
+. \"
. pdf:bm.sync \\$1
. shift
-.\"
-.\" Increment the bookmark serialisation index
-.\" in order to generate a uniquely serialised bookmark name,
-.\" ( which we return in the string "PDFBOOKMARK.NAME" ),
-.\" and insert this bookmark into the cache
-.\"
+. \"
+. \" Increment the bookmark serialisation index
+. \" in order to generate a uniquely serialised bookmark name,
+. \" ( which we return in the string "PDFBOOKMARK.NAME" ),
+. \" and insert this bookmark into the cache
+. \"
. pdf:href.sety
. nr pdf:bm.nr +1
. ds PDFBOOKMARK.NAME pdf:bm\\n[pdf:bm.nr]\\*[pdf:href-T]
@@ -697,6 +703,15 @@
. pdf:href.options.clear
. rr PDFPAGE.Y
. \}
+. \}
+.el \{\
+.\"
+.\" But when we are collecting a diversion which will be written out later,
+.\" then we must defer bookmark placement, until we emit the diversion.
+.\" (don't rely on $0 == pdfbookmark here; it may be a volatile alias).
+.\"
+. nop \!.pdfbookmark \\$@
+. \}
..
.\"
.\" Macro "pdf:bm.sync" is called for each bookmark created,
- [Groff-commit] groff/contrib/pdfmark ChangeLog pdfmark.tmac,
Keith Marshall <=