diff options
author | wl <wl> | 2013-01-28 10:41:31 +0000 |
---|---|---|
committer | wl <wl> | 2013-01-28 10:41:31 +0000 |
commit | 5dc9540e8124a52f50fab6acda119c5b68b67d45 (patch) | |
tree | c1993ae96187947412f24a98f06c728160a59230 | |
parent | 4f80370e897ccba22d40e9e3f0bc076982a41153 (diff) | |
download | groff-5dc9540e8124a52f50fab6acda119c5b68b67d45.tar.gz |
* pdfmark.tmac (pdfmark, pdf:composed): Use `\!' instead of `\X'.
With the old pdfmark there are gaps between two of the lines, but
with the new version they disappear. The use of `.br' and `.in 0'
is arbitrary any request which causes an implicit break could be
used. Two breaks together only produce one line break, but if there
is an intervening `\X' then the second break finds the line buffer
not empty and generates another line break.
Using `\!' does alter the position of the pdfmark lines in the
intermediate file sent to grops (the pdfmark lines are output
immediately rather than being serialised through the output line
processing), but this has no effect since the contents of the
pdfmark line stay the same. It is the contents which determine
where bookmarks jump to not the position of the record in the input
stream to grops.
I initially used `.output', but hit a snag if a pdfbookmark occurs
before the document starts to output (message saying to insert an
explicit `.br'), this is quite likely for things like `.pdfinfo
/Author' which occur at the top of the document. So I'm using the
`\!' escape.
-rw-r--r-- | contrib/pdfmark/ChangeLog | 27 | ||||
-rw-r--r-- | contrib/pdfmark/pdfmark.tmac | 14 |
2 files changed, 30 insertions, 11 deletions
diff --git a/contrib/pdfmark/ChangeLog b/contrib/pdfmark/ChangeLog index aec7aac5..4d273a69 100644 --- a/contrib/pdfmark/ChangeLog +++ b/contrib/pdfmark/ChangeLog @@ -1,3 +1,28 @@ +2013-01-28 Deri James <deri@chuzzlewit.myzen.co.uk> + + * pdfmark.tmac (pdfmark, pdf:composed): Use `\!' instead of `\X'. + + With the old pdfmark there are gaps between two of the lines, but + with the new version they disappear. The use of `.br' and `.in 0' + is arbitrary any request which causes an implicit break could be + used. Two breaks together only produce one line break, but if there + is an intervening `\X' then the second break finds the line buffer + not empty and generates another line break. + + Using `\!' does alter the position of the pdfmark lines in the + intermediate file sent to grops (the pdfmark lines are output + immediately rather than being serialised through the output line + processing), but this has no effect since the contents of the + pdfmark line stay the same. It is the contents which determine + where bookmarks jump to not the position of the record in the input + stream to grops. + + I initially used `.output', but hit a snag if a pdfbookmark occurs + before the document starts to output (message saying to insert an + explicit `.br'), this is quite likely for things like `.pdfinfo + /Author' which occur at the top of the document. So I'm using the + `\!' escape. + 2012-09-20 Werner LEMBERG <wl@gnu.org> Simplify enviroment handling. @@ -344,7 +369,7 @@ First import of pdfmark files. -Copyright 2004-2012 +Copyright 2004-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, diff --git a/contrib/pdfmark/pdfmark.tmac b/contrib/pdfmark/pdfmark.tmac index 9dde08d5..3af42eaf 100644 --- a/contrib/pdfmark/pdfmark.tmac +++ b/contrib/pdfmark/pdfmark.tmac @@ -110,7 +110,7 @@ inspiration has come from discussion on the groff mailing list . \" . \" This PDFMARK is suitable for single chunk output ... . \" -. nop \X'ps:exec [\\$* pdfmark'\c +. nop \!x X ps:exec [\\$* pdfmark . \} . el \{\ . \" ... but, when the limit would be violated, then we must @@ -129,13 +129,11 @@ inspiration has come from discussion on the groff mailing list . \" . pdf*compose pdfmark . pdf*pdfmark.dispatch -. chop pdf:composed -. nop \Y[pdf:composed]\c . \" . \" And clean up when done. . \" . rm pdf*compose pdf*pdfmark.post -. rm pdf:compose.test pdf:composed pdf:composed.literal +. rm pdf:compose.test pdf:composed.literal . \} . rr pdf:length . \} @@ -428,9 +426,7 @@ inspiration has come from discussion on the groff mailing list .\" of the "pdf:composed" macro, for assembly of a new PDFMARK. .\" .de pdf*pdfmark.post.first -.de pdf:composed pdf*end -ps:exec \\*[pdf:composed.line] -.pdf*end +. nop \!x X ps:exec \\*[pdf:composed.line] .\" .\" Subsequent calls to "pdf*pdfmark.post" are redirected to the .\" alternative "pdf*pdfmark.post.next" macro, which simply appends @@ -439,9 +435,7 @@ ps:exec \\*[pdf:composed.line] .als pdf*pdfmark.post pdf*pdfmark.post.next .. .de pdf*pdfmark.post.next -.am pdf:composed pdf*end -\\*[pdf:composed.line] -.pdf*end +. nop \!+\\*[pdf:composed.line] .. .\" "pdf*end" is a dummy macro. It is required to mark the end .\" of each individual fragment which is added to "pdf:composed"; |