Skip to content
Permalink
Browse files

-image_type svg

  • Loading branch information...
Dan Gildea
Dan Gildea committed Jun 26, 2018
1 parent 1556639 commit 9abb512c432c63bec5e83f37f877be43e95e558b
Showing with 185 additions and 52 deletions.
  1. +3 −1 README.md
  2. +19 −0 config/config.pl
  3. +22 −0 configure
  4. +4 −3 l2hconf.pin
  5. +4 −1 latex2html.1
  6. +122 −44 latex2html.pin
  7. +7 −0 prefs.pm
  8. +3 −2 styles/getimagesize.perl
  9. +1 −1 styles/more_amsmath.perl
@@ -84,7 +84,9 @@ translation it is asked to perform as follows:
As above plus
* latex (pdflatex is used by default)
* gs (Ghostscript version 4.03 or later),
* The netpbm library
* The netpbm library
* If you want to produce SVG images, pdftocairo
(available through the poppler-utils package).
* If you want to process documents written for dvi-producing latex
(as opposed to pdflatex), you need either dvips or dvipng.
These are available through the texlive distribution.
@@ -785,6 +785,7 @@ package main;
$opt{'IMAGES'} = &is_true(&get_name('IMAGES'));
$opt{'GIF'} = &is_true(&get_name('GIF'));
$opt{'PNG'} = &is_true(&get_name('PNG'));
$opt{'SVG'} = &is_true(&get_name('SVG'));

unless($opt{'GIF'} || $opt{'PNG'}) {
$opt{'IMAGES'} = 0;
@@ -1059,6 +1060,21 @@ package main;
}
}

# --------------------------------------------------------------------------
# pdftocairo
# --------------------------------------------------------------------------

$newcfg{'PDFTOCAIRO'} = '';

if($opt{'IMAGES'}) {
my $pdftocairo = &find_prog(&get_name('PDFTOCAIRO',1));
if($pdftocairo) {
$newcfg{'PDFTOCAIRO'} = $pdftocairo;
} else {
$opt{'SVG'} = 0;
}
}

$newcfg{'PDFCROP'} = '';

if($opt{'IMAGES'}) {
@@ -1572,6 +1588,9 @@ package main;

if($newcfg{'have_pstoimg'}) {
my @imgtypes = ();
if($opt{'SVG'}) {
push(@imgtypes,'svg');
}
if($opt{'PNG'}) {
push(@imgtypes,'png');
}
@@ -51,6 +51,8 @@ ac_help="$ac_help
--enable-gif add support of GIF images"
ac_help="$ac_help
--enable-png add support of PNG images"
ac_help="$ac_help
--enable-svg add support of SVG images"
ac_help="$ac_help
--enable-pipes use pipes to connect portable bitmap programs"
ac_help="$ac_help
@@ -65,6 +67,8 @@ ac_help="$ac_help
--with-dvips=PATH path/name of the dvips executable"
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-pdfcrop=PATH path/name of the pdfcrop executable"
ac_help="$ac_help
@@ -791,6 +795,14 @@ else
enable_png=''
fi

# Check whether --enable-svg or --disable-svg was given.
if test "${enable_svg+set}" = set; then
enableval="$enable_svg"
:
else
enable_svg=''
fi

# Check whether --enable-pipes or --disable-pipes was given.
if test "${enable_pipes+set}" = set; then
enableval="$enable_pipes"
@@ -848,6 +860,14 @@ else
with_dvipng=${DVIPNG:-}
fi

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

# Check whether --with-pdfcrop or --without-pdfcrop was given.
if test "${with_pdfcrop+set}" = set; then
withval="$with_pdfcrop"
@@ -1217,6 +1237,7 @@ $PERL $srcdir/config/config.pl \
REVERSE=$enable_reverse \
GIF=$enable_gif \
PNG=$enable_png \
SVG=$enable_svg \
PIPES=$enable_pipes \
ABSPATHS=$enable_paths \
PREFIX=$prefix \
@@ -1228,6 +1249,7 @@ $PERL $srcdir/config/config.pl \
GS=$with_gs \
DVIPS=$with_dvips \
DVIPNG=$with_dvipng \
PDFTOCAIRO=$with_pdftocairo \
PDFCROP=$with_pdfcrop \
LATEX=$with_latex \
PDFLATEX=$with_pdflatex \
@@ -26,6 +26,7 @@ $LUALATEX = '@LUALATEX@'; # LuaLaTeX
$DVILUALATEX = '@DVILUALATEX@'; # dviLuaLaTeX
$DVIPS = '@DVIPS@'; # dvips
$DVIPNG = '@DVIPNG@'; # dvipng
$PDFTOCAIRO = '@PDFTOCAIRO@'; # pdf to svg converter
$PDFCROP = '@PDFCROP@'; # pdfcrop
$GS = '@GS@'; # GhostScript

@@ -1092,8 +1093,8 @@ sub meta_information {
### Icons ################################################################

# Icon names and real icon files.

foreach $typ (@IMAGE_TYPES) {
# gif icons are also availble. no svg icons available.
foreach $typ ('png') {
%{"icons_$typ"} = (
'cross_ref_visible_mark' ,"crossref.$typ",
'anchor_mark' , '', # ,' ',
@@ -1120,7 +1121,7 @@ foreach $typ (@IMAGE_TYPES) {
)
};
if (!%icons) {
%icons = %{"icons_$IMAGE_TYPE"};
%icons = %{"icons_png"};
}

if (!%iconsizes) {
@@ -982,7 +982,10 @@ script.
.TP
.B $IMAGE_TYPE = '<image-type>';
Set in latex2html.config, the currently supported <image-type>s are:
gif and png.
svg, png and gif. Vector formats such as svg look better at high resolution,
while bitmap formats such as png or gif are generally
faster to download and to render.

.TP
.B $DVIPS = 'dvips';
Read from latex2html.config by install-test, its value is checked to

0 comments on commit 9abb512

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