deri pushed a commit to branch master
in repository groff.
commit 5d052395efcfd260ce0a42481fbf87c810184ee3
Author: Deri James <[email protected]>
Date: Thu May 4 22:45:31 2017 +0100
Fixes for gropdf
* src/devices/gropdf/gropdf.pl: Escape '(' and ')' if
used in a bookmark, and ignore relative move 'h' if
followed by absolute move 'H' in groff intermediate output.
---
ChangeLog | 8 ++++++++
src/devices/gropdf/gropdf.pl | 8 ++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ba059c8..1341518 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2017-05-04 Deri James <[email protected]>
+
+ Fixes for gropdf
+
+ * src/devices/gropdf/gropdf.pl: Escape '(' and ')' if
+ used in a bookmark, and ignore relative move 'h' if
+ followed by absolute move 'H' in groff intermediate output.
+
2017-04-29 Ingo Schwarze <[email protected]>
groff_char(7): improve description of ASCII characters
diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index cbfe329..a3bba58 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -791,7 +791,11 @@ sub do_x
my $t=$1;
$t=~s/\\\) /\\\\\) /g;
$t=~s/\\e/\\\\/g;
- my @xwds=split(' ',"<< $t >>");
+ $t=~m/(^.*\/Title \()(.*)(\).*)/;
+ my ($pre,$title,$post)=($1,$2,$3);
+ $title=~s/(?<!\\)\(/\\\(/g;
+ $title=~s/(?<!\\)\)/\\\)/g;
+ my @xwds=split(' ',"<< $pre$title$post >>");
my $out=ParsePDFValue(\@xwds);
my $this=[$out,[]];
@@ -3077,11 +3081,11 @@ sub do_V
{
$xpos=substr($ahead[0],1)/$unitwidth;
+ $nomove=$pendmv=0;
@ahead=();
}
-# $nomove=$pendmv=0;
$poschg=1;
}
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit