Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update latex2html to 2025+debian1-1 #1

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

59 changes: 59 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,65 @@
# A more detailed log history can be found within the particular files, near
# the top.
#
#
#--------- v2025
#
# - generate a numeric char reference for chars not found in
# the output character encoding.
# - fix \'{\i}
# - switch --entities no longer makes accents like í
# - fix \verb&A&
# - avoid processing eqnarray* as one image,
# make layout consistent with eqnarray
#
#--------- v2024.2
#
# - fix pstoimg operator precedence bug
# https://bugs.debian.org/1085309
# - allow "-dir ." and "-rootdir ."
# - remove extra "showpage" from pstoimg
# https://bugs.debian.org/1078536
# - remove svg from config for pstoimg
# https://bugs.debian.org/1078535
# - new option -use_hilite
# - support minted package
# - new option -unicase_titles
#
#--------- v2024
#
# - "make clean" removes manual.pdf
# https://bugs.debian.org/1046413
#
#--------- v2023.2
#
# - DONT_INCLUDE now affects \usepackage but not \input
# - support \usepackage[xindy]{imakeidx} for sorting accents
# - support babel main language option
# - support hyphenat package
#
#--------- v2023
#
# - update for latest pdftocairo
#
#--------- v2022.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*
#
#--------- v2022
#
# - fix cropped figures
# - revert PreviewBorder to 0.5bp
# - support download attribute for <A> tag
# - remove meta tags for distribution, etc
# - allow input filename with no extension
# echo hello world | latex2html -dir out -mkdir /dev/stdin
#
#--------- v2021.2
#
# - latex2html -long_titles fix duplicate file names
Expand Down
1 change: 1 addition & 0 deletions IndicTeX-HTML/devnagri.perl
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ sub do_env_pre_devnag {
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");
Expand Down
3 changes: 2 additions & 1 deletion IndicTeX-HTML/itrans.perl
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,11 @@ sub itrans_html {
, "\#${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 .= $_
Expand Down
1 change: 1 addition & 0 deletions IndicTeX-HTML/malyalam.perl
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ sub mm_other_environments {
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");
Expand Down
53 changes: 48 additions & 5 deletions config/config.pl
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
# -- this version should be "thread-safe" now
# --- there are no more *-globs . References are used throughout.
# -- UTF8 implemented completely, as an output encoding
# -- use of full entitity names is implemented as an output encoding
# -- use of full entity names is implemented as an output encoding
# -- mechanism available to choose whether to allow 8-bit chars in the
# output, or UTF8 or entity names or images
# -- implemented post-processing search for ,, << >> ligatures
Expand Down Expand Up @@ -247,7 +247,7 @@
# Revision 1.6 1999/06/03 12:15:49 MRO
#
#
# - cleaned up the TMP / TMPDIR / TMP_ mechansim. Should work much the
# - cleaned up the TMP / TMPDIR / TMP_ mechanism. Should work much the
# same now, but the code should be easier to understand.
#
# - cleaned up L2hos, added an INSTALLation FAQ, beautified the test
Expand Down Expand Up @@ -441,8 +441,8 @@ package main;
use vars qw(%prefs %cfg %newcfg);

# This is the central place to modify the release name and date!!!
my $RELEASE = '2021.2';
my $VERSION = 'Released July 1, 2021';
my $RELEASE = '2025';
my $VERSION = 'Released January 1, 2025';

# --------------------------------------------------------------------------
# Open log
Expand Down Expand Up @@ -898,6 +898,16 @@ package main;
}
}

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') {
Expand Down Expand Up @@ -1606,20 +1616,25 @@ package main;
}


$newcfg{'IMAGE_TYPES'} = '';
$newcfg{'IMAGE_TYPES'} = ''; # types for latex2html, subset of svg, png, gif
$newcfg{'PSTOIMG_TYPES'} = ''; # types for pstoimg, subset of png, gif

if($newcfg{'have_pstoimg'}) {
my @imgtypes = ();
my @pstoimgtypes = ();
if($opt{'SVG'}) {
push(@imgtypes,'svg');
}
if($opt{'PNG'}) {
push(@imgtypes,'png');
push(@pstoimgtypes,'png');
}
if($opt{'GIF'}) {
push(@imgtypes,'gif');
push(@pstoimgtypes,'gif');
}
$newcfg{'IMAGE_TYPES'} = join(' ',@imgtypes);
$newcfg{'PSTOIMG_TYPES'} = join(' ',@pstoimgtypes);
}

# --------------------------------------------------------------------------
Expand Down Expand Up @@ -1876,6 +1891,34 @@ package main;
}
}

# --------------------------------------------------------------------------
# SRCHILITE
# --------------------------------------------------------------------------
# used in listings.perl and minted.perl for colorized listings

$newcfg{'SRCHILITE'} = '';

if(1) {
my $srchilite = &find_prog(&get_name('SRCHILITE',1));
if($srchilite) {
$newcfg{'SRCHILITE'} = $srchilite;
}
}

# --------------------------------------------------------------------------
# SRCHILITE
# --------------------------------------------------------------------------
# used in listings.perl and minted.perl for colorized listings

$newcfg{'SRCHILITE'} = '';

if(1) {
my $srchilite = &find_prog(&get_name('SRCHILITE',1));
if($srchilite) {
$newcfg{'SRCHILITE'} = $srchilite;
}
}

# --------------------------------------------------------------------------
# Pipes
# --------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion config/install.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
}
Expand Down
21 changes: 16 additions & 5 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,17 @@ ac_help="$ac_help
ac_help="$ac_help
--with-pnmpad=PATH path/name of the pnmpad executable"
ac_help="$ac_help
--with-pnmrotate=PATH path/name of the pnmrotate executable"
--with-pnmrotate=PATH path/name of the pnmrotate executable"
ac_help="$ac_help
--with-pnmscale=PATH path/name of the pnmscale executable"
--with-pnmscale=PATH path/name of the pnmscale executable"
ac_help="$ac_help
--with-pbmmake=PATH path/name of the pbmmake executable"
ac_help="$ac_help
--with-ppmtogif=PATH path/name of the ppmtogif executable"
ac_help="$ac_help
--with-pnmtopng=PATH path/name of the pnmtopng executable"
ac_help="$ac_help
--with-tifftopnm=PATH path/name of the tifftopnm executable"
--with-tifftopnm=PATH path/name of the tifftopnm executable"
ac_help="$ac_help
--with-anytopnm=PATH path/name of the anytopnm executable"
ac_help="$ac_help
Expand All @@ -130,11 +130,13 @@ ac_help="$ac_help
ac_help="$ac_help
--with-xwdtopnm=PATH path/name of the xwdtopnm executable"
ac_help="$ac_help
--with-ppmtojpeg=PATH path/name of the ppmtojpeg executable"
--with-ppmtojpeg=PATH path/name of the ppmtojpeg executable"
ac_help="$ac_help
--with-giftool=PATH path/name of the giftool executable"
ac_help="$ac_help
--with-giftrans=PATH path/name of the giftrans executable"
ac_help="$ac_help
--with-srchilite=PATH path/name of pygmentize or source-highlight"

# Initialize some variables set by options.
# The variables have the same names as the options, with
Expand Down Expand Up @@ -1134,6 +1136,14 @@ else
with_giftrans=${GIFTRANS:-}
fi

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



if test -n "$PERL"; then
Expand Down Expand Up @@ -1296,7 +1306,8 @@ $PERL $srcdir/config/config.pl \
XWDTOPNM=$with_xwdtopnm \
PPMTOJPEG=$with_ppmtojpeg \
GIFTOOL=$with_giftool \
GIFTRANS=$with_giftrans
GIFTRANS=$with_giftrans \
SRCHILITE=$with_srchilite

if test "$?" != "0"; then
exit 1
Expand Down
2 changes: 1 addition & 1 deletion debian/README.foilhtml.Debian
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ well-tested, and I may certainly missing some evil side-effects of
my changes.

Except for some obligatory cosmetic nonsense you don't want to use,
this essentially replaces all occurences of rotatedfoilhead{} in the
this essentially replaces all occurrences of rotatedfoilhead{} in the
various sectioning macros by foilhead{} - foilhead{} as defined in
the standard FoilTeX package already knows about landscape mode and
does the right thing.
Expand Down
9 changes: 6 additions & 3 deletions debian/TODO
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
* two errors while generating images
* autopkgtest for texexpand

* tests/ contains man more sampe files, test them too?

* two errors while generating images
* split out the documentation to a separate latex2html-doc package

* enable autopkgtests with linkchecker when linkchecker is
installable again
* look into "repacksuffice" for the watch file, documented in uscan(1)

Loading
Loading