groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 01/01: Fixes for gropdf


From: Deri James
Subject: [groff] 01/01: Fixes for gropdf
Date: Thu, 4 May 2017 17:46:58 -0400 (EDT)

deri pushed a commit to branch master
in repository groff.

commit 5d052395efcfd260ce0a42481fbf87c810184ee3
Author: Deri James <address@hidden>
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  <address@hidden>
+
+       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  <address@hidden>
 
        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(address@hidden);
 
                    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;
 }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]