Skip to content
Permalink
Browse files

make ps2pdf command configurable

for use with latex->dvi->dvips->ps->ps2pdf->pdf->pdftocairo->svg
  • Loading branch information
Dan Gildea
Dan Gildea committed Dec 27, 2019
1 parent ad42fa6 commit bb99a155ff5932079928857777c62e0d20ec1ba6
Showing with 33 additions and 1 deletion.
  1. +17 −0 config/config.pl
  2. +11 −0 configure
  3. +1 −0 l2hconf.pin
  4. +1 −1 latex2html.pin
  5. +3 −0 prefs.pm
@@ -1079,6 +1079,23 @@ package main;
}
}

# --------------------------------------------------------------------------
# ps2pdf
# --------------------------------------------------------------------------

$newcfg{'PS2PDF'} = '';

if($opt{'IMAGES'}) {
my $ps2pdf = &find_prog(&get_name('PS2PDF',1));
if($ps2pdf) {
$newcfg{'PS2PDF'} = $ps2pdf;
}
}

# --------------------------------------------------------------------------
# pdfcrop
# --------------------------------------------------------------------------

$newcfg{'PDFCROP'} = '';

if($opt{'IMAGES'}) {
@@ -69,6 +69,8 @@ ac_help="$ac_help
--with-dvipng=PATH path/name of the dvipng executable"
ac_help="$ac_help
--with-pdftocairo=PATH path/name of the pdftocairo executable"
ac_help="$ac_help
--with-ps2pdf=PATH path/name of the ps2pdf executable"
ac_help="$ac_help
--with-pdfcrop=PATH path/name of the pdfcrop executable"
ac_help="$ac_help
@@ -868,6 +870,14 @@ else
with_pdftocairo=${PDFTOCAIRO:-}
fi

# Check whether --with-ps2pdf or --without-ps2pdf was given.
if test "${with_ps2pdf+set}" = set; then
withval="$with_ps2pdf"
:
else
with_ps2pdf=${PS2PDF:-}
fi

# Check whether --with-pdfcrop or --without-pdfcrop was given.
if test "${with_pdfcrop+set}" = set; then
withval="$with_pdfcrop"
@@ -1251,6 +1261,7 @@ $PERL $srcdir/config/config.pl \
DVIPS=$with_dvips \
DVIPNG=$with_dvipng \
PDFTOCAIRO=$with_pdftocairo \
PS2PDF=$with_ps2pdf \
PDFCROP=$with_pdfcrop \
LATEX=$with_latex \
PDFLATEX=$with_pdflatex \
@@ -27,6 +27,7 @@ $DVILUALATEX = '@DVILUALATEX@'; # dviLuaLaTeX
$DVIPS = '@DVIPS@'; # dvips
$DVIPNG = '@DVIPNG@'; # dvipng
$PDFTOCAIRO = '@PDFTOCAIRO@'; # pdf to svg converter
$PS2PDF = '@PS2PDF@'; # ps to pdf converter
$PDFCROP = '@PDFCROP@'; # pdfcrop
$GS = '@GS@'; # GhostScript

@@ -3899,7 +3899,7 @@ sub call_dvips {
$dvips_call = "$DVIPS -S1 -i $DVIPSOPT -o$TMPDIR$dd${IMAGE_PREFIX} .${dd}${PREFIX}images.dvi";
}
} else {
$dvips_call = "$DVIPS .${dd}${PREFIX}images.dvi; ps2pdf .${dd}${PREFIX}images.ps";
$dvips_call = "$DVIPS .${dd}${PREFIX}images.dvi && $PS2PDF .${dd}${PREFIX}images.ps";
print $dvips_call, "\n";
}
}
@@ -259,6 +259,9 @@ $prefs{'DVIPNG'} = 'dvipng';
# The pdftocairo executable.
$prefs{'PDFTOCAIRO'} = 'pdftocairo';

# The ps2pdf executable.
$prefs{'PS2PDF'} = 'ps2pdf';

# the pdfcrop executable needed for cropping PDF images
$prefs{'PDFCROP'} = 'pdfcrop';

0 comments on commit bb99a15

Please sign in to comment.
You can’t perform that action at this time.