summaryrefslogtreecommitdiff
path: root/macros/pdftex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-02-06 03:01:38 +0000
committerNorbert Preining <norbert@preining.info>2020-02-06 03:01:38 +0000
commite684f0597e24a1d09af301d82b340b2df7cf2080 (patch)
tree118b66e9989a7cc19ca57030e231919c120aebb2 /macros/pdftex
parent4b795f65d52cde0d136c0175ce20101946378b54 (diff)
CTAN sync 202002060301
Diffstat (limited to 'macros/pdftex')
-rw-r--r--macros/pdftex/mptopdf/doc/context/scripts/mkii/mptopdf.man4
-rw-r--r--macros/pdftex/mptopdf/scripts/context/perl/mptopdf.pl30
2 files changed, 14 insertions, 20 deletions
diff --git a/macros/pdftex/mptopdf/doc/context/scripts/mkii/mptopdf.man b/macros/pdftex/mptopdf/doc/context/scripts/mkii/mptopdf.man
index 56be818067..545c16fa00 100644
--- a/macros/pdftex/mptopdf/doc/context/scripts/mkii/mptopdf.man
+++ b/macros/pdftex/mptopdf/doc/context/scripts/mkii/mptopdf.man
@@ -1,6 +1,6 @@
-.TH "mptopdf" "1" "01-01-2019" "version 1.4.1" "convert MetaPost figures to PDF"
+.TH "mptopdf" "1" "01-01-2020" "version 1.4.1" "convert MetaPost figures to PDF"
.SH NAME
-.B mptopdf
+ mptopdf - convert MetaPost figures to PDF
.SH SYNOPSIS
.B mptopdf [
.I OPTIONS ...
diff --git a/macros/pdftex/mptopdf/scripts/context/perl/mptopdf.pl b/macros/pdftex/mptopdf/scripts/context/perl/mptopdf.pl
index 165d4d2179..5fe53c98f4 100644
--- a/macros/pdftex/mptopdf/scripts/context/perl/mptopdf.pl
+++ b/macros/pdftex/mptopdf/scripts/context/perl/mptopdf.pl
@@ -3,6 +3,12 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $
# MikTeX users can set environment variable TEXSYSTEM to "miktex".
+# There have been suggestions to patch this script for dealing with different
+# output templates (a relative new metapost feature) but these have given
+# unwanted side effects. One can always wrap this script in another script
+# to deal with whatever patterns needed. We won't touch what has worked for
+# ages. (December 2019)
+
#D \module
#D [ file=mptopdf.pl,
#D version=2010.05.28, % 2000.05.29
@@ -118,14 +124,9 @@ if (($pattern eq '')||($Help)) {
@files = glob "$pattern" ;
}
-# this patch was send via debian but is not tested by me
-
foreach my $file (@files) {
$_ = $file ;
- # if (s/\.(\d+|mps)$// && -e $file) {
- if (s/\.(\d+|mps|ps)$// && -e $file) {
- my $suffix = $1 ;
- my $pdf = basename($_).".pdf" ;
+ if (s/\.(\d+|mps)$// && -e $file) {
if ($miktex) {
$command = "pdftex -undump=mptopdf" ;
} else {
@@ -141,22 +142,15 @@ foreach my $file (@files) {
print "\n$program : error while processing tex file\n" ;
exit 1 ;
}
- # my $pdfsrc = basename($_).".pdf";
- # rename ($pdfsrc, "$_-$1.pdf") ;
- # if (-e $pdfsrc) {
- # CopyFile ($pdfsrc, "$_-$1.pdf") ;
- if ($suffix =~ m/\.\d+$/) {
- rename ($pdf, "$_-$suffix.pdf") ;
- if (-e $pdf) {
- CopyFile ($pdf, "$_-$suffix.pdf") ;
- }
- $pdf = "$_-$suffix.pdf" ;
+ my $pdfsrc = basename($_).".pdf";
+ rename ($pdfsrc, "$_-$1.pdf") ;
+ if (-e $pdfsrc) {
+ CopyFile ($pdfsrc, "$_-$1.pdf") ;
}
if ($done) {
$report .= " +" ;
}
- # $report .= " $_-$1.pdf" ;
- $report .= " $pdf" ;
+ $report .= " $_-$1.pdf" ;
++$done ;
}
}