[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 01/01: Make PDFPIC behave the same whether -Tps or -Tpdf used.
From: |
Deri James |
Subject: |
[groff] 01/01: Make PDFPIC behave the same whether -Tps or -Tpdf used. |
Date: |
Thu, 12 Apr 2018 14:25:43 -0400 (EDT) |
deri pushed a commit to branch master
in repository groff.
commit 82630588fc32a5d2e00f257bc79cac7493e7e809
Author: Deri James <address@hidden>
Date: Thu Apr 12 19:23:25 2018 +0100
Make PDFPIC behave the same whether -Tps or -Tpdf used.
Previously the -Tpdf version did not cause a break nor position
to the line beneath the imported picture, whilst the -Tps
version did.
* tmac/pdfpic.tmac: Corrected behavior.
* NEWS: Explain the change of behaviour and how to reinstate
the previous behaviour using register PDFPIC_NOSPACE or the
environment variable GROFF_PDFPIC_NOSPACE.
---
ChangeLog | 14 ++++++++++++++
NEWS | 27 +++++++++++++++++++++++++++
tmac/pdfpic.tmac | 10 ++++++++++
3 files changed, 51 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 8553fbf..5ea92e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2018-04-12 Deri James <address@hidden>
+
+ Make PDFPIC behave the same whether -Tps or -Tpdf used.
+
+ Previously the -Tpdf version did not cause a break nor position
+ to the line beneath the imported picture, whilst the -Tps
+ version did.
+
+ * tmac/pdfpic.tmac: Corrected behavior.
+
+ * NEWS: Explain the change of behaviour and how to reinstate
+ the previous behaviour using register PDFPIC_NOSPACE or the
+ environment variable GROFF_PDFPIC_NOSPACE.
+
2018-03-27 Bertrand Garrigues <address@hidden>
Define a short version for data installation dir name.
diff --git a/NEWS b/NEWS
index b6a016b..fea449c 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,33 @@ o The `hy' request has been extended. Value 16 enables
hyphenation before
character.
+PDFPIC
+------
+
+o PDFPIC has now been corrected, so the behaviour is the same whether you
+ use the postscript or pdf drivers. However, this means that any documents
+ which were written using the old behaviour will not be rendered correctly
+ if using the pdf driver with the new version.
+
+ The change would mean that documents which relied on the previous behaviour
+ are likely to have a gap underneath the image which was not there before.
+ If you see this effect there are three ways you can restore the previous
+ 0behaviour:-
+
+ Add the line ".nr PDFPIC_NOSPACE 1" to the document before the first call
+ to .PDFPIC.
+
+ If it is just a single document which exhibits this behaviour you can run
+ groff adding "- rPDFPIC_NOSPACE=1" to the command-line.
+
+ If you have many documents which rely on the previous behaviour you can
+ set an environment variable "export GROFF_PDFPIC_NOSPACE=1" which will
+ restore the previous behaviour for all runs.
+
+ Note that this change has no effect it you were using .PDFPIC with the
+ postscript driver, only if you used it with the pdf driver.
+
+
Miscellaneous
-------------
diff --git a/tmac/pdfpic.tmac b/tmac/pdfpic.tmac
index 3267ea6..c3859bf 100644
--- a/tmac/pdfpic.tmac
+++ b/tmac/pdfpic.tmac
@@ -132,6 +132,16 @@ sed -e 's/Page *size: *\\([[:digit:].]*\\) *x
*\\([[:digit:].]*\\).*$/\
.
\h'\\n[pdf-offset]u'\
\X'pdf: pdfpic \\$1 -L \\n[pdf-deswid]z \\n[pdf-desht]z'
+. if !r PDFPIC_NOSPACE \{\
+. sy echo ".nr PDFPIC_NOSPACE 0$GROFF_PDFPIC_NOSPACE" > /tmp/x\n[$$]
+. so /tmp/x\n[$$]
+. sy rm /tmp/x\n[$$]
+. \}
+. if \\n[PDFPIC_NOSPACE]==0 \{\
+. br
+. sp \\n[pdf-desht]u
+. \}
+..
..
.
.cp \n[_C]
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 01/01: Make PDFPIC behave the same whether -Tps or -Tpdf used.,
Deri James <=