Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package latex2html for openSUSE:Factory checked in at 2022-07-21 11:33:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/latex2html (Old) and /work/SRC/openSUSE:Factory/.latex2html.new.1523 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "latex2html" Thu Jul 21 11:33:02 2022 rev:44 rq:989993 version:2022.2 Changes: -------- --- /work/SRC/openSUSE:Factory/latex2html/latex2html.changes 2022-04-23 19:45:08.474924470 +0200 +++ /work/SRC/openSUSE:Factory/.latex2html.new.1523/latex2html.changes 2022-07-21 11:33:30.450954502 +0200 @@ -1,0 +2,14 @@ +Fri Jul 15 19:21:53 UTC 2022 - Dirk M??ller <dmuel...@suse.com> + +- update to 2022.2: + * spacing of eqnarray and align + * check for preview.sty in config.pl + * check for failure of pdflatex run + * newline after footnote should give space + * fix ref to label inside float + * add sidewaysfigure, sidewaystable + * fix eqnarray* +- drop latex2html-binmode.diff. + latex2html-dest-dir.diff, latex2html-perl-bindir.diff + +------------------------------------------------------------------- Old: ---- latex2html-2022.tar.gz latex2html-binmode.diff latex2html-dest-dir.diff latex2html-perl-bindir.diff New: ---- latex2html-2022.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ latex2html.spec ++++++ --- /var/tmp/diff_new_pack.ux2LS0/_old 2022-07-21 11:33:30.998955041 +0200 +++ /var/tmp/diff_new_pack.ux2LS0/_new 2022-07-21 11:33:31.002955046 +0200 @@ -19,7 +19,7 @@ %define share_dir %{_datadir}/latex2html %define _texmfmaindir %{_datadir}/texmf Name: latex2html -Version: 2022 +Version: 2022.2 Release: 0 Summary: LaTeX to HTML Converter License: GPL-2.0-or-later @@ -28,12 +28,6 @@ Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz # PATCH-FIX-OPENSUSE latex2html-share-dir.diff -- Fix latex2html share dir location, use /usr/share not /usr/share/lib Patch0: latex2html-share-dir.diff -# PATCH-FIX-UPSTREAM latex2html-perl-bindir.diff -- Fix shbang to use /usr/bin not /usr/local/bin -Patch1: latex2html-perl-bindir.diff -# PATCH-FEATURE-UPSTREAM latex2html-dest-dir.diff -- Support DESTDIR variable while installing -Patch2: latex2html-dest-dir.diff -# PATCH-FIX-UPSTREAM latex2html-binmode.diff -- Open files in binary mode, required for UTF-8 files -Patch3: latex2html-binmode.diff BuildRequires: fdupes BuildRequires: ghostscript-fonts-std BuildRequires: ghostscript-x11 @@ -74,9 +68,6 @@ %prep %setup -q %patch0 -%patch1 -%patch2 -%patch3 %build # Not autotools based configure ++++++ latex2html-2022.tar.gz -> latex2html-2022.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/Changes new/latex2html-2022.2/Changes --- old/latex2html-2022/Changes 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/Changes 2022-07-01 16:49:32.000000000 +0200 @@ -112,6 +112,14 @@ # A more detailed log history can be found within the particular files, near # the top. # +# - spacing of eqnarray and align +# - check for preview.sty in config.pl +# - check for failure of pdflatex run +# - newline after footnote should give space +# - fix ref to label inside float +# - add sidewaysfigure, sidewaystable +# - fix eqnarray* +# #--------- v2022 # # - fix cropped figures diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/IndicTeX-HTML/devnagri.perl new/latex2html-2022.2/IndicTeX-HTML/devnagri.perl --- old/latex2html-2022/IndicTeX-HTML/devnagri.perl 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/IndicTeX-HTML/devnagri.perl 2022-07-01 16:49:32.000000000 +0200 @@ -331,6 +331,7 @@ sub do_env_pre_tr_devnagri { local($_) = @_; open(DNTR,">dntr.tmp") || print "\n *** cannot open dntr.tmp ***" ; + binmode DNTR; print DNTR "\$\$", &revert_to_raw_tex($_), "\$\$"; close DNTR; &syswait("patc -p $PRE_FILTERS${dd}dng.pat dntr.tmp dntr.tmp1"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/IndicTeX-HTML/itrans.perl new/latex2html-2022.2/IndicTeX-HTML/itrans.perl --- old/latex2html-2022/IndicTeX-HTML/itrans.perl 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/IndicTeX-HTML/itrans.perl 2022-07-01 16:49:32.000000000 +0200 @@ -336,10 +336,11 @@ , "\#${indic}ifm=".$itrans_info{$indic.'ifm'} , "\#$indic", $itext , "\#end$indic\n" ); open(ITRANS, ">itrans.itx"); + binmode ITRANS;; print ITRANS "$_"; close(ITRANS); &syswait("$ITRANS <itrans.itx >itrans.htm"); - open(ITRANS, "<itrans.htm"); $itext = ''; + open(ITRANS, "<itrans.htm"); binmode ITRANS; $itext = ''; while (<ITRANS>) { next if (/^(\%|$)/); $itext .= $_ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/IndicTeX-HTML/malyalam.perl new/latex2html-2022.2/IndicTeX-HTML/malyalam.perl --- old/latex2html-2022/IndicTeX-HTML/malyalam.perl 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/IndicTeX-HTML/malyalam.perl 2022-07-01 16:49:32.000000000 +0200 @@ -221,6 +221,7 @@ sub do_env_pre_mmtr { local($_) = @_; open(MMTR,">mmtr.tmp") || print "\n *** cannot open mmtr.tmp ***" ; + binmode MMTR; print MMTR "\$\$", &revert_to_raw_tex($_), "\$\$"; close MMTR; &syswait("$PATC -p $MMDIR${dd}mm.pat mmtr.tmp mmtr.tmp1"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/config/config.pl new/latex2html-2022.2/config/config.pl --- old/latex2html-2022/config/config.pl 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/config/config.pl 2022-07-01 16:49:32.000000000 +0200 @@ -441,8 +441,8 @@ use vars qw(%prefs %cfg %newcfg); # This is the central place to modify the release name and date!!! -my $RELEASE = '2022'; -my $VERSION = 'Released January 1, 2022'; +my $RELEASE = '2022.2'; +my $VERSION = 'Released July 1, 2022'; # -------------------------------------------------------------------------- # Open log @@ -898,6 +898,16 @@ } } +if ($kpsewhich) { + &checking('for preview.sty'); + my ($stat,$out,$err) = &get_out_err("$kpsewhich preview.sty"); + if($stat == 0) { # ok + &result("ok"); + } else { + &logit("NONE\nWarning: preview.sty not found.\n svg images will not work.\n dvipng will not work\n"); + } +} + &checking('for TeX include path'); my $texpath = $opt{TEXPATH} || $prefs{TEXPATH} || ''; if($texpath eq 'no') { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/config/install.pl new/latex2html-2022.2/config/install.pl --- old/latex2html-2022/config/install.pl 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/config/install.pl 2022-07-01 16:49:32.000000000 +0200 @@ -295,8 +295,10 @@ split(/\s+/,$cfg{'IMAGE_TYPES'}) : qw(gif); my $iconrx = join('|', @icon_types); +my $destdir=$ENV{"DESTDIR"}; my $dest1 = "$cfg{'SHLIBDIR'}${dd}icons"; -if((-d $dest1 && !-w _) || (-d $cfg{'SHLIBDIR'} && !-w _)) { +print STDERR "((( $destdir, $dest1 )))\n"; +if((-d "$destdir$dest1" && !-w _) || (-d "$destdir$cfg{'SHLIBDIR'}" && !-w _)) { print STDERR "Error: Cannot install icons in '$dest1': No write permission.\n"; $dest1 = ''; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/cweb2html/cweb2html new/latex2html-2022.2/cweb2html/cweb2html --- old/latex2html-2022/cweb2html/cweb2html 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/cweb2html/cweb2html 2022-07-01 16:49:32.000000000 +0200 @@ -258,7 +258,7 @@ open(INPUT,"<$filename") || die "$PRGFILE: error: Could not open $filename\n"; - + binmode INPUT; while (<INPUT>) { $string{'STRING'} .= $_; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/cweb2html/htcweb.perl new/latex2html-2022.2/cweb2html/htcweb.perl --- old/latex2html-2022/cweb2html/htcweb.perl 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/cweb2html/htcweb.perl 2022-07-01 16:49:32.000000000 +0200 @@ -941,6 +941,7 @@ print "\nReading <$_[0]>..." if $DEBUG; open(INPUT,"<$_[0]"); + binmode INPUT; while (<INPUT>) { $string{'STRING'} .= $_; } @@ -948,6 +949,7 @@ print "\nReading <$_[1]>..." if $DEBUG; open(INPUT,"<$_[1]"); + binmode INPUT; while (<INPUT>) { $string{'STRING'} .= $_; } @@ -1028,6 +1030,7 @@ } } open(INPUT,"<$file") || die "Could not open $file\n"; + binmode INPUT; while (<INPUT>) { $string{'STRING'} .= $_}; $_ = delete $string{'STRING'}; # Blow it away and return the result diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/cweb2html/makemake.pl new/latex2html-2022.2/cweb2html/makemake.pl --- old/latex2html-2022/cweb2html/makemake.pl 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/cweb2html/makemake.pl 2022-07-01 16:49:32.000000000 +0200 @@ -1,4 +1,4 @@ -#!/usr/local/bin/perl +#!/usr/bin/perl ################################################################################ # Copyright 1998-1999 by Jens Lippmann (lippm...@rbg.informatik.tu-darmstadt.de) @@ -27,8 +27,10 @@ die "Cannot rename to $source.bak, $!\n"; open(OUT,">$source") || die "Cannot open $source, $!\n"; + binmode OUT; open(IN,"<$source.bak"); + binmode IN; while (<IN>) { $string{'STRING'} .= $_; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/docs/manual.tex new/latex2html-2022.2/docs/manual.tex --- old/latex2html-2022/docs/manual.tex 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/docs/manual.tex 2022-07-01 16:49:32.000000000 +0200 @@ -171,7 +171,7 @@ % \begin{latexonly} -This document accompanies \latextohtml{} version 2022. +This document accompanies \latextohtml{} version 2022.2. \paragraph{History} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/latex2html.pin new/latex2html-2022.2/latex2html.pin --- old/latex2html-2022/latex2html.pin 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/latex2html.pin 2022-07-01 16:49:32.000000000 +0200 @@ -1106,6 +1106,7 @@ unless($ignore); return undef; } + binmode CATFILE; local($/) = undef; # slurp in whole file my $contents = <CATFILE>; close(CATFILE); @@ -1368,6 +1369,7 @@ $auto_styles =~ s/\|$//; if(open(STYLES, "<$TMP_${dd}styles")) { + binmode STYLES; while(<STYLES>) { if(s/^\s*(\S+)\s*(.*)$/$style = $1; $options = $2;/eo) { &do_require_package($style); @@ -1794,6 +1796,7 @@ unless(open(SINPUT,"<$file")) { die "\nError: Cannot read '$file': $!\n"; } + binmode SINPUT; local(@file_string); print STDOUT "$file" if ($VERBOSITY >1); while (<SINPUT>) { @@ -1878,6 +1881,7 @@ &wrap_shorthand_environments; print STDOUT "\n *** End-of-partition ***" if ($VERBOSITY > 1); if(open(OUT, ">$TMP_$dd$PARTITION_PREFIX$count")) { + binmode OUT; print OUT $_; close(OUT); } else { @@ -1898,6 +1902,7 @@ local($file) = @_; local(%string); if(open(INPUT,"<$file")) { + binmode INPUT; local(@file_string); while (<INPUT>) { push(@file_string, $_ ); @@ -2355,6 +2360,7 @@ open(OUTPUT, ">$CURRENT_FILE") || die "Cannot write '$CURRENT_FILE': $!\n"; + binmode OUTPUT; if ($XBIT_HACK) { # use Apache's XBit hack chmod 0744, $CURRENT_FILE; &check_htaccess; @@ -2876,7 +2882,6 @@ print STDOUT "\nOUT-A {$env $br_id}\n$contents\n" if ($VERBOSITY > 4); #JCL(jcl-env) - insert the $O$br_id$C stuff to handle environment grouping if (!($contents eq '')) { - $after =~ s/^\n//o if ($defenv); $this_env = join("", $before, $closures , $contents , ($defenv ? '': &balance_tags()) @@ -3809,6 +3814,7 @@ print "\nWriting image.pre file ...\n"; open(ENV,">.$dd${PREFIX}images.pre") || die "\nCannot write '${PREFIX}images.pre': $!\n"; + binmode ENV; print ENV &make_latex($latex_body); print ENV "\n"; close ENV; @@ -3828,6 +3834,7 @@ # save pre-processor commands in a file: preproc open(CMDS,">.$dd${PREFIX}preproc") || die "\nCannot write '${PREFIX}preproc': $!\n"; + binmode CMDS; print CMDS $preprocessor_cmds ; close CMDS; @@ -3838,6 +3845,7 @@ print "\nWriting image file ...\n"; open(ENV,">.$dd${PREFIX}images.tex") || die "\nCannot write '${PREFIX}images.tex': $!\n"; + binmode ENV; print ENV &make_latex($latex_body); print ENV "\n"; close ENV; @@ -4166,7 +4174,8 @@ # $pt_per_ex contains the length of 1 ex measured in points, # and is used to scale the image to the curent html font size } - $LaTeXERROR = 1 if (/^No pages of output./); + $LaTeXERROR = 1 if (/^No pages of output./ || + /no output PDF file produced/); } if ($LaTeXERROR) { @@ -4988,7 +4997,8 @@ ($pre,$post) = ($`,$&); if ($USING_STYLES) { $env_style{$decl} = " " unless ($env_style{$decl}); - $pre =~ s/>$/$env_id>/ if ($env_id); + # don't append unresolved $env_id's + $pre =~ s/>$/$env_id>/ if ($env_id =~ /^\s+(CLASS|ID)/); } local($closing_tag) = 1 if ($pre =~ /^<>$/); $pre = $post = '' if $closing_tag; @@ -7276,8 +7286,8 @@ \newdimen\lthtmlCropMarkHeight \newdimen\lthtmlCropMarkDepth \long\def\lthtmlTightVBoxA#1{\def\lthtmllabel{#1} - \setbox\lthtmlPageBox\vbox\bgroup\hbox\bgroup\catcode`\_=8 }% -\long\def\lthtmlTightVBoxZ{\egroup\egroup + \setbox\lthtmlPageBox\vbox\bgroup\catcode`\_=8 }% +\long\def\lthtmlTightVBoxZ{\egroup \lthtmlCropMarkHeight=\ht\lthtmlPageBox \advance \lthtmlCropMarkHeight 6pt \lthtmlCropMarkDepth=\dp\lthtmlPageBox \lthtmltypeout{^^J:\lthtmllabel:lthtmlCropMarkHeight:=\the\lthtmlCropMarkHeight}% @@ -7527,8 +7537,10 @@ print "\nError: Cannot write '$FILE.css': $!\n"; return; } + binmode STYLESHEET; if ( -f $EXTERNAL_STYLESHEET ) { if(open(EXT_STYLES, "<$EXTERNAL_STYLESHEET")) { + binmode EXT_STYLES; while (<EXT_STYLES>) { print STYLESHEET $_; } close(EXT_STYLES); } else { @@ -7587,7 +7599,9 @@ /* mathematics styles */ DIV.displaymath { text-align:center; margin-top:1em; margin-bottom:1em; } /* math displays: margins for \\abovedisplayskip \\belowdisplayskip */ -TD.eqno { width:0; } /* equation-number cells */ +TD.eqno { width:0; } /* equation-number cells */ +TD.lfill { text-align:left; width:50%; } +TD.rfill { text-align:right; width:50%; } TABLE.PAD TD { padding:3px; } TABLE.BORDER TD { border:1px solid black; } TABLE.equation { width:100%; } /* place eq nos at right/left edge */ @@ -7859,7 +7873,7 @@ &slurp_input($this_file); open(OUTFILE, ">$this_file") || die "\nError: Cannot write file '$this_file': $!\n"; - + binmode OUTFILE; if (($INDEX) && ($SHORT_INDEX) && ($SEGMENT eq 1)) { &make_index_segment($title,$file); } @@ -7919,7 +7933,7 @@ # s/(<A HREF=\"[^\"]+\")(>\s*\b?([^<]+|<([^>\/]+|\/[^>A]+)>\s*)*<\/A>)\s*\b?<A( ID=\"[^\"]+\")>\ <\/A>/$1$5$2/gom; # clean up empty table cells - s/(<TD[^>]*>)\s*(<\/TD>)/<TD>$2/gom; + # s/(<TD[^>]*>)\s*(<\/TD>)/$1$2/gom; # clean up list items (only desirable in the bibliography ?) # s/\n<P>(<DT[^>]*>)/\n<P><\/P>\n$1/gom; @@ -8224,6 +8238,7 @@ return(); } if(open(INIT, "<$init_file")) { + binmode INIT; foreach $info_line (<INIT>) { $info_line =~ s/[<>"&]/'&'.$html_special_entities{$&}.';'/eg; $init_contents .= $info_line; @@ -8986,6 +9001,7 @@ sub post_process_footnotes { &slurp_input($footfile); open(OUT, ">$footfile") || die "Cannot write file '$footfile': $!\n"; + binmode OUT; &replace_markers; &post_post_process if (defined &post_post_process); &adjust_encoding; @@ -9007,6 +9023,7 @@ print "\nError: Cannot write '$filename': $!\n"; return; } + binmode FILE; print FILE $_; close(FILE); } @@ -9511,6 +9528,7 @@ my $script = $SCRIPT || $0; open(PIPE, "$perldoc -t $script |") || die "Fatal: can't open pipe: $!"; + binmode PIPE; while (<PIPE>) { if (/^\s*$/) { next; @@ -10637,6 +10655,7 @@ print "\nError: Cannot write '$urlimg': $!\n"; return; } + binmode IMAGE_MAP; ### HWS Pass server map unchanged from user print IMAGE_MAP "<HTML>\n<BODY>\n<A HREF=\"$map\">\n"; print IMAGE_MAP "<IMG\n SRC=\"$url\" ISMAP $ausemp $altst> </A>"; @@ -10654,6 +10673,8 @@ ($to_prefix, $suffix) = split(/\./, $to); if ($EXTN =~ /$suffix$/) { if (open(FROM, "<$from") && open(HTMP, ">HTML_tmp")) { + binmode FROM; + binmode HTMP; while (<FROM>) { s/$from_prefix\.$IMAGE_TYPE/$to_prefix.$IMAGE_TYPE/g; print HTMP; @@ -10678,6 +10699,7 @@ &replace_markers; &add_dir_to_href if ($DESTDIR); if(open(CAPTIONS, ">${PREFIX}$type.pl")) { + binmode CAPTIONS; print CAPTIONS $_; close (CAPTIONS); } else { @@ -12171,6 +12193,7 @@ } sub do_env_figurestar { &do_env_figure(@_) } +sub do_env_sidewaysfigure { &do_env_figure(@_) } sub do_env_table { local($_) = @_; @@ -12178,6 +12201,7 @@ local ( $border, $attribs ); &get_next_optional_argument; + ($_,$anchors) = &extract_labels($_); # extract labels # Try to establish the alignment if (/^(\[[^\]]*])?\s*\\begin\s*<<\d*>>(\w*)<<\d*>>|\\(\w*)line/) { $halign = $2.$3; @@ -12198,7 +12222,6 @@ ($HTML_VERSION > 2.0 && ( /\\begin\s*($O\d+$C)\s*((super)?tabular|longtable)\s*\1/))) { $_ = &translate_environments($_); - ($_,$anchors) = &extract_labels($_); # extract labels do { local($contents) = $_; &extract_captions($cap_env); $_ = $contents; } if (/\\caption/); @@ -12208,7 +12231,6 @@ while ($_ =~ s/(^\s*<BR>\s*|\s*<BR>\s*$)//g){}; } else { # Make an image of the whole environment. - ($_,$anchors) = &extract_labels($_); # extract labels do { local($contents) = $_; &extract_captions($cap_env); $_ = $contents; } if (/\\caption/); @@ -12268,6 +12290,7 @@ } sub do_env_tablestar { &do_env_table(@_) } +sub do_env_sidewaystable { &do_env_table(@_) } # RRM: A makeimage environment generates a picture of its entire contents, # UNLESS it is empty. @@ -17102,6 +17125,7 @@ if (-f $access_file) { print STDOUT " ... found"; open(HTACCESS, "<$access_file"); + binmode HTACCESS; while (<HTACCESS>) { if (/^\s*XBitHack\s*on\s*$/) { print STDOUT " with XBitHack on"; @@ -17517,14 +17541,12 @@ &make_counters_rx; } -#JCL(jcl-del) - this could eat one optional newline, too. -# But this might result in large lines... anyway, it *should* be -# handled. A possible solution would be to convert adjacent newlines -# into \par's in preprocessing. +# These characters end a command name, and, when they end a command name, +# they are are not included as whitespace in the output. sub make_cmd_spc_rx { - $cmd_spc = " \\t"; - $cmd_spc_rx = "[ \\t]*"; # zero or more - $cmd_spcs_rx = "[ \\t]+"; # one or more + $cmd_spc = " \\t\n"; + $cmd_spc_rx = "[ \\t\n]*"; # zero or more + $cmd_spcs_rx = "[ \\t\n]+"; # one or more } sub make_single_cmd_rx { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/styles/color.perl new/latex2html-2022.2/styles/color.perl --- old/latex2html-2022/styles/color.perl 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/styles/color.perl 2022-07-01 16:49:32.000000000 +0200 @@ -153,6 +153,7 @@ if (-f $file) { if (open(COLORFILE,"<$file")) { print STDOUT "\n(reading colors from $file" if $DEBUG; + binmode COLORFILE; while (<COLORFILE>) { s/^\s*(\d+)\s+(\d+)\s+(\d+)\s+(\w+(\s\w+)*)\s*/ ($r,$g,$b,$name)=($1,$2,$3,$4); @@ -183,6 +184,7 @@ if (-f $file) { if (open(COLORFILE,"<$file")) { print STDOUT "\n(reading colors from $file"; + binmode COLORFILE; @colors = (<COLORFILE>); foreach (@colors) { next if (/^\s*$/); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/styles/frames.perl new/latex2html-2022.2/styles/frames.perl --- old/latex2html-2022/styles/frames.perl 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/styles/frames.perl 2022-07-01 16:49:32.000000000 +0200 @@ -1126,6 +1126,7 @@ ); &text_cleanup; open(FILE,">$filename") || print "Cannot open $filename $!\n"; + binmode FILE; print FILE $_; close(FILE); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/styles/getimagesize.perl new/latex2html-2022.2/styles/getimagesize.perl --- old/latex2html-2022/styles/getimagesize.perl 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/styles/getimagesize.perl 2022-07-01 16:49:32.000000000 +0200 @@ -12,6 +12,7 @@ my $type = lc($1); $type = $IMAGE_TYPE unless $type =~ /(gif|png|jpe?g)/; if (open(IMAGE, "<$imagefile")) { + binmode IMAGE; my ($buffer,$magic,$dummy,$width,$height) = ('','','',0,0); binmode(IMAGE); # not harmful un UNIX # if ($IMAGE_TYPE =~ /gif/) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/styles/graphics-support.perl new/latex2html-2022.2/styles/graphics-support.perl --- old/latex2html-2022/styles/graphics-support.perl 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/styles/graphics-support.perl 2022-07-01 16:49:32.000000000 +0200 @@ -534,6 +534,7 @@ my($file)=@_; my(@bb,$f); if(($f=find_file($file,$GRAPHICS_PATH,['.eps','.ps','.bb'])) && open(PS,$f)){ + binmode PS; while(<PS>){ if(/^%%BoundingBox:\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s*$/){ @bb=($1,$2,$3,$4); last; }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/styles/html.perl new/latex2html-2022.2/styles/html.perl --- old/latex2html-2022/styles/html.perl 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/styles/html.perl 2022-07-01 16:49:32.000000000 +0200 @@ -305,6 +305,7 @@ if ($pretag) { # code due to Alan Williams <al...@cs.man.ac.uk> open(LABELS, "<$labelfile"); + binmode LABELS; print "\nLoading external labels from $labelfile, with prefix $pretag" if ($VERBOSITY > 1); local($translated_stream, $instream); @@ -412,6 +413,7 @@ if ($pretag) { # code due to Alan Williams <al...@cs.man.ac.uk> open(LABELS, "<$labelfile"); + binmode LABELS; print "\nLoading external labels from $labelfile, with prefix $pretag" if ($VERBOSITY > 1); local($translated_stream, $instream); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/styles/more_amsmath.perl new/latex2html-2022.2/styles/more_amsmath.perl --- old/latex2html-2022/styles/more_amsmath.perl 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/styles/more_amsmath.perl 2022-07-01 16:49:32.000000000 +0200 @@ -148,6 +148,8 @@ $mlalign = " style=\"text-align:left;\">"; $mralign = " style=\"text-align:right;\">"; $mvalign = " "; # class equation specifies style=\"vertical-align:baseline;\" +$slcell = $smncell."class=\"LEFT\">"; +$srcell = $smncell."class=\"RIGHT\">"; $smlcell = $smncell.$mlalign; $smccell = $smncell.$mcalign; $smrcell = $smncell.$mralign; @@ -157,6 +159,8 @@ $lseqno = "$eqno_class style=\"text-align:left;\">\n"; $rseqno = "$eqno_class style=\"text-align:right\">\n"; +$lsfill = " class=\"lfill\">"; +$rsfill = " class=\"rfill\">"; # do these indirectly, so that they only over-ride the existing @@ -671,9 +675,9 @@ $env_id = ''; local($valign, $scell, $eqno) = ($mvalign,'',''); - local($srow, $ecell, $slcell, $srcell) = ( + local($srow, $ecell) = ( $smrow.$valign.$emtag , $emcell - , $smncell.$mlalign, $smncell.$mralign ); + ); local($return) = &start_math_display ( $sarray ); @@ -681,15 +685,11 @@ $_ = &revert_array_envs($_); $_ = &protect_array_envs($_); - if ($EQN_TAGS =~ /L/) { - # equation number on left - ($srow, $scell, $ecell) = ( $smrow.$valign.$emtag.$smcell - , $smncell , $emcell); - } else { - # equation number on right - ($srow, $scell, $ecell) = ( - $smrow.$valign.$emtag , $smncell, $emcell ); - } + # leftmost and rightmost columns expand to fill available space, + # so that the main group of columns is centered. + # one of the two contains the equation numbers. + ($srow, $scell, $ecell) = ( $smrow.$valign.$emtag.$smcell + , $smncell , $emcell); local($xcols) = '0'; @@ -713,8 +713,8 @@ if ($EQN_TAGS =~ /L/) { # $return .= $srow.$mcalign.$eqno.$ecell - $return .= $srow.$lseqno.$eqno.$ecell - } else { $return .= $srow } + $return .= $srow.$lsfill.$eqno.$ecell + } else { $return .= $srow.$lsfill.$ecell } local($scell) = $srcell; # so 1st cell is right-aligned... @@ -748,9 +748,10 @@ } else { $return .= join('', $mspace , $ecell); } # $return .= $smncell.$mcalign.$eqno.$ecell - $return .= $smncell.$rseqno.$eqno.$ecell + $return .= $smncell.$rfill; + $return .= $eqno unless ($EQN_TAGS =~ /L/); # eqn-num on right - $return .= $erow; + $return .= $ecell.$erow; next; } @@ -778,9 +779,10 @@ } # $return .= $smncell.$mcalign.$eqno.$ecell - $return .= $smncell.$rseqno.$eqno.$ecell + $return .= $smncell.$rsfill; + $return .= $eqno unless ($EQN_TAGS =~ /L/); # eqn-num on right - $return .= $erow; + $return .= $ecell.$erow; } $_ = &end_math_display($return , $earray ); } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/styles/webtex.perl new/latex2html-2022.2/styles/webtex.perl --- old/latex2html-2022/styles/webtex.perl 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/styles/webtex.perl 2022-07-01 16:49:32.000000000 +0200 @@ -227,6 +227,7 @@ &webeq_failed($out_tag); $out_tag = ''; } else { open(TAG, "<$out_tag"); + binmode TAG; $app_tag = join('',<TAG>); close(TAG); # replace webeq fall-back image by LaTeX2HTML's own, or none at all diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/tests/epsfig.tex new/latex2html-2022.2/tests/epsfig.tex --- old/latex2html-2022/tests/epsfig.tex 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/tests/epsfig.tex 2022-07-01 16:49:32.000000000 +0200 @@ -17,7 +17,7 @@ \end{center} \caption{Test.} \end{figure} -No cropping with makeimage: +Test with makeimage: \begin{figure}[hbt] \begin{makeimage} \begin{picture}(7,1.0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/tests/eq_line_spacing.tex new/latex2html-2022.2/tests/eq_line_spacing.tex --- old/latex2html-2022/tests/eq_line_spacing.tex 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/tests/eq_line_spacing.tex 2022-07-01 16:49:32.000000000 +0200 @@ -1,6 +1,9 @@ \documentclass[12pt]{amsart} \usepackage{amssymb} \usepackage{latexsym} +\usepackage{array} +\usepackage{caption} + \title{The trap for \LaTeX\ convertors} \author{Sergej V. Znamenskij} \begin {document} @@ -59,4 +62,71 @@ \end{displaymath} followed by more text. +% Then compare the PDF and HTML results with the attention on: +% +% 1) spaces between footnote marks and the text following them +% +% 2) clickability of the reference from Section 1 to Table in Section 2 +% +% 3) some illegal HTML tags generated inside Table (near DIV class="CENTER"). + +\section{Footnote quirks} + +Usually there is a space between the footnote mark and the subsequent text. +But if the text just after a footnote mark starts from the next line, +the space can be lost. + +Here we should have a space after footnote +mark.\footnote{This is note1} This text follows footnote 1. + +Here we intentionally should have no space between the footnote +mark and the dot\footnote{This is note2}. This text follows footnote 2. + +Here we should have a space after footnote +mark.\footnote{This is note3} +But the stock latex2html-2022 removes it. + +{Here we should not have a space after the +switch to large text with a newline.\large +Large text.} + +{Here we should not have a space after the +switch to large text with a space.\large Large text.} + +{Here we should have a new paragraph after the +switch to large text with two newlines.\large + +Large text.} + +{Here we should not have a space after the +switch to large text with a newlines and a space.\large + Large text.} + +Now see Table \ref{tablecap} in the next section. Try to press this hyperlink. +This can fail because stock latex2html-2022 sometimes loses labels +defined inside floating table environments. + +\newpage + +\section{Table quirks} + +Here the stock latex2html-2022 can put an illegal HTML tag +into the generated table near DIV class=CENTER. + +\begin{table} +\begin{centering} +\begin{tabular}{|>{\centering}m{6em}|c|>{\centering}m{4em}|c|} + \hline + heading 1 & heading 2 & heading 3 & heading 4\\ + \hline + cell 1 & cell 2 & cell 3 & cell 4\\ + \hline +\end{tabular} +\par\end{centering} +\caption{\label{tablecap}This was our test table} +\end{table} + + + + \end {document} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/tests/formulas.tex new/latex2html-2022.2/tests/formulas.tex --- old/latex2html-2022/tests/formulas.tex 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/tests/formulas.tex 2022-07-01 16:49:32.000000000 +0200 @@ -17,3 +17,31 @@ \end{eqnarray} Testing single variables: $a$, $b$, $c$. + +Test of Figure environment: +\begin{figure} +\[ a = \int \exp{x} \,\mathrm{d}x \] +\end{figure} + +Test using eqnarray: +\begin{eqnarray} +a_1 &=& -2 r \cos( 2 \pi f_c T_s ) \\ +a_2 &=& r^2, +\end{eqnarray} + +Test using eqnarray*: +\begin{eqnarray*} +b_0 &=& (1 - r^2) / 2 \\ +b_1 &=& 0 \\ +b_2 &=& -b_0, +\end{eqnarray*} +First as an equation: +\begin{equation} +\tilde{y}(x,t) = C^{+} e^{j (\omega t - k x)} + C^{-} e^{j (\omega t + k x)}, +\label{eq:yxt} +\end{equation} +Then using displaymath: +\begin{displaymath} + \tilde{y}(x,t) = C^{+} e^{j (\omega t - k x)} + C^{-} e^{j (\omega t + k x)}, +\end{displaymath} +followed by more text. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/tests/rrm-col.tex new/latex2html-2022.2/tests/rrm-col.tex --- old/latex2html-2022/tests/rrm-col.tex 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/tests/rrm-col.tex 2022-07-01 16:49:32.000000000 +0200 @@ -1,5 +1,5 @@ \documentclass{article} -\usepackage[dvips,dvipsnames]{color} +\usepackage[dvipsnames]{color} \usepackage{colordvi} \usepackage{html} \bodytext{ TEXT = white diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/texexpand.pin new/latex2html-2022.2/texexpand.pin --- old/latex2html-2022/texexpand.pin 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/texexpand.pin 2022-07-01 16:49:32.000000000 +0200 @@ -555,6 +555,7 @@ if($opt{save_styles}) { open(STYLES,">$opt{save_styles}") || die "$prompt Error: Cannot open style file '$opt{save_styles}': $!\n"; + binmode STYLES; } my $out_file = $opt{output}||$opt{out}; if($out_file) { @@ -564,6 +565,7 @@ else { open(OUT,">&STDOUT"); } + binmode OUT; &process_file($infile); # the workhorse... @@ -682,6 +684,7 @@ $includelevel++; open(IN,"<$infile") || die "$prompt Cannot open $infile\n"; + binmode IN; print STDERR "$prompt %--- Processing $infile" if ($debug > 1); # if we don't include this file marker LaTeX2HTML won't split diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/versions/frame.pl new/latex2html-2022.2/versions/frame.pl --- old/latex2html-2022/versions/frame.pl 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/versions/frame.pl 2022-07-01 16:49:32.000000000 +0200 @@ -1202,6 +1202,7 @@ ); &text_cleanup; open(FILE,">$filename") || print "Cannot open $filename $!\n"; + binmode FILE; print FILE $_; close(FILE); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/versions/html5_0.pl new/latex2html-2022.2/versions/html5_0.pl --- old/latex2html-2022/versions/html5_0.pl 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/versions/html5_0.pl 2022-07-01 16:49:32.000000000 +0200 @@ -1467,8 +1467,6 @@ local($sbig,$ebig,$falign) = ('','','CENTER'); ($sbig,$ebig) = ('<BIG>','</BIG>') if (($DISP_SCALE_FACTOR)&&($DISP_SCALE_FACTOR >= 1.2 )); - local($valign) = join('', ' VALIGN="', - ($NETSCAPE_HTML)? "BASELINE" : "MIDDLE", '"'); $failed = 1; # simplifies the next call ($labels, $comment, $_) = &process_math_env($math_mode,$_); $failed = 0 unless ($no_eqn_numbers); @@ -1494,23 +1492,19 @@ local($sarray, $srow, $slcell, $elcell, $srcell, $ercell, $erow, $earray); ($sarray, $elcell, $srcell, $erow, $earray, $sempty) = ( "\n<TABLE$env_id$lang CLASS=\"equation\"" - , "</TD>\n<TD ALIGN=\"CENTER\" NOWRAP>" - , "</TD>\n<TD ALIGN=\"LEFT\" NOWRAP>" + , "</TD>\n<TD style=\"text-align:center\">" + , "</TD>\n<TD style=\"text-align:left;\">" , "</TD></TR>", "\n</TABLE>", "</TD>\n<TD>" ); $env_id = ''; - $sarray .= (($no_eqn_numbers) ? ">" : " WIDTH=\"100%\">" ); - local($seqno) = join('',"\n<TD$eqno_class WIDTH=10 ALIGN=\"" - , (($EQN_TAGS =~ /L/)? 'LEFT': 'RIGHT') - , "\">\n"); - if ($EQN_TAGS =~ /L/) { # number on left - ($srow, $slcell, $ercell) = ( - "\n<TR$valign>" . $seqno - , "</TD>\n<TD NOWRAP ALIGN=", ''); - } else { # equation number on right - ($srow, $slcell, $ercell) = ("\n<TR$valign>" - , "<TD NOWRAP ALIGN=" - , '</TD>'. $seqno ); - } + $sarray .= (($no_eqn_numbers) ? ">" : " >" ); + + # leftmost and rightmost columns expand to fill available space, + # so that the main group of columns is centered. + # one of the two contains the equation numbers. + ($srow, $slcell, $ercell) = ( + "\n<TR><TD class=\"lfill\">" + , "</TD><TD style=\"text-align:" + , "</TD><TD class=\"rfill\">"); $_ = &protect_array_envs($_); @@ -1580,19 +1574,19 @@ if (($NO_SIMPLE_MATH)||($doimage)||($failed)) { $thismath = (($thismath ne '')? &process_math_in_latex( "indisplay" , '', '', $doimage.$thismath ):''); - $return .= join('',"\"RIGHT\">",$thismath) if ($thismath ne ''); + $return .= join('',"RIGHT\">",$thismath) if ($thismath ne ''); } elsif ($thismath ne '') { $savemath = $thismath; $thismath = &simple_math_env($thismath); if ($failed) { $thismath = &process_math_in_latex( "indisplay",'','',$savemath); - $return .= join('',"\"RIGHT\">",$thismath) + $return .= join('',"RIGHT\">",$thismath) } elsif ($thismath ne '') { - $return .= join('',"\"RIGHT\">$sbig",$thismath,"$ebig") + $return .= join('',"RIGHT\">$sbig",$thismath,"$ebig") } } - $return .= "\"RIGHT\">\ " if ($thismath eq ''); + $return .= "RIGHT\">\ " if ($thismath eq ''); # center column, set using \textstyle $thismath = shift(@cols); $failed = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/latex2html-2022/versions/techexpl.pl new/latex2html-2022.2/versions/techexpl.pl --- old/latex2html-2022/versions/techexpl.pl 2022-01-01 23:31:18.000000000 +0100 +++ new/latex2html-2022.2/versions/techexpl.pl 2022-07-01 16:49:32.000000000 +0200 @@ -212,6 +212,7 @@ sub TE_check_file_contents { local ($ifile) = @_; open(TEINC, "<$ifile"); + binmode TEINC; my($macrosOK,$macrosNUM,$numlines,$invalid) = (0,0,0,0); my $TE_special_macros_rx = join('|',@TE_special_macros); my $TE_defined_accents_rx = join('|',@TE_defined_accents);