Am Sun, 30 May 2021 08:56:17 +0200 schrieb Kornel Benko <kor...@lyx.org>:
> > I took a look at sub getConverter($$) but I'm not sure my Perl skills > > are good enough to create a non-hackish patch. Kornel, are you > > interested? > > > > Scott > > I will have a look. > and here the patch. Kornel
diff --git a/lib/scripts/prefTest.pm b/lib/scripts/prefTest.pm index e98ac4ad2f..8e25b7986b 100644 --- a/lib/scripts/prefTest.pm +++ b/lib/scripts/prefTest.pm @@ -85,21 +85,28 @@ sub getConverter($$) { my ($l, $add) = @_; chomp($l); my ($from, $to, $cmd, $par); ($l, $from) = getNext($l); - return undef if ($from !~ /(tex|dvi)$/); + return undef if ($from !~ /(ps|tex|dvi)$/); ($l, $to) = getNext($l); return undef if ($to !~ /^((dvi3?|pdf[23456]?)(log)?)$/); - my ($checkfor, $substitute); + my ($checkfor, $substitute, $extrapar); if ($from =~ /tex/) { $checkfor = qr/\s+\-shell\-(escape|restricted)/; $substitute = "-shell-escape"; + $extrapar = qr/^latex/; + } + elsif ($from =~ /ps$/) { + $checkfor = qr/\s+\-dALLOWPSTRANSPARENCY/; + $substitute = "-dALLOWPSTRANSPARENCY"; + $extrapar = qr/hyperref-driver=dvips/; } else { $checkfor = qr/\s+-i\s+dvipdfmx-unsafe.cfg/; $substitute = "-i dvipdfmx-unsafe.cfg"; + $extrapar = qr/^hyperref-driver=dvipdfm/; } ($l, $cmd) = getNext($l); if ($add) { if ($cmd !~ $checkfor) { if ($cmd =~ /^(\S+)\s*(.*)$/) { @@ -110,11 +117,11 @@ sub getConverter($$) } else { $cmd =~ s/$checkfor//; } ($l, $par) = getNext($l); - return undef if ($par !~ /^(latex|hyperref-driver=dvipdfm)/); + return undef if ($par !~ $extrapar); my $key = "\"$from\" \"$to\""; if ($add) { return([$key, [$cmd, $par]]); } else {
pgpkybCsF_b0n.pgp
Description: Digitale Signatur von OpenPGP
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel