diff -Naur latex2html-2021.orig/Changes latex2html-2021/Changes --- latex2html-2021.orig/Changes 2021-01-01 22:10:57.000000000 +0700 +++ latex2html-2021/Changes 2021-01-10 23:19:41.000000000 +0700 @@ -112,6 +112,9 @@ # A more detailed log history can be found within the particular files, near # the top. # +# - package nomencl.sty +# - package nameref.sty +# - options -cut_ref_num -add_ref_name # #--------- v2021 # diff -Naur latex2html-2021.orig/docs/l2hfiles.dat latex2html-2021/docs/l2hfiles.dat --- latex2html-2021.orig/docs/l2hfiles.dat 2021-01-01 22:10:57.000000000 +0700 +++ latex2html-2021/docs/l2hfiles.dat 2021-02-04 23:36:27.370189453 +0700 @@ -2,6 +2,7 @@ \item[\gn{.latex2html-init}] initialisation file for \latextohtml{} \item[\gn{\$ACCENT\_IMAGES}] holds the \LaTeX\ style to be used when making images of accented characters which are not present in the character encoding being used \item[\gn{\$ADDRESS}] contains information to be included as a signature at the bottom of each \texttt{HTML} page +\item[\gn{\$ADD\_REF\_NAME}] when set, caption name is shown additionally to caption number in cross references if available \item[\gn{\$ALTERNATIVE\_ICONS}] contains the location of special icons, other than the standard ones \item[\gn{\$ANTI\_ALIAS}] when set, specifies that anti-aliasing be used with generated images of figures and included images \item[\gn{\$ANTI\_ALIAS\_TEXT}] when set (the default), specifies that anti-aliasing be used with generated images of maths and typeset text @@ -24,6 +25,7 @@ \item[\gn{\$CUSTOM\_BUTTONS}] variable available to link to customised buttons in navigation panels \item[\gn{\$CUSTOM\_ICONS}] when set, a copy of each icon actually used is included in the directory along with the \texttt{.html} files and images \item[\gn{\$CUSTOM\_TITLES}] when set, a customised subroutine is used to determine the filename for each \texttt{HTML} page +\item[\gn{\$CUT\_REF\_NUM}] when set, caption number is cut out in cross references \item[\gn{\$DEBUG}] when non-zero, \latextohtml\ shows messages that would otherwise be ignored \item[\gn{\$DESTDIR}] specifies the directory into which all the generated files will be placed \item[\gn{\$DISCARD\_PS}] when set, specifies that the temporary \PS\ files created by \fn{dvips} be discarded immediately after use diff -Naur latex2html-2021.orig/docs/userman.tex latex2html-2021/docs/userman.tex --- latex2html-2021.orig/docs/userman.tex 2021-01-01 22:10:57.000000000 +0700 +++ latex2html-2021/docs/userman.tex 2021-02-04 23:36:27.370189453 +0700 @@ -402,6 +402,29 @@ \strikeout{In order to be shown, section titles must be unique and must not contain inlined graphics.} +\index{cross references!marker style} +\index{cross references!numbering} +\index{add-ref-name}% +\item [ -add\_ref\_name \label{cs_add_ref_name}] +\sameas{\fn{\$ADD\_REF\_NAME}\texttt{ = 1;}}\\ +Usually cross reference text contains only the caption number as a +hyperlink to the corresponding \LaTeX{} label. However, it could be +handy to see the name of the object referenced, if the reference text +would contain both the caption number and the caption name. +With -add\_ref\_name the caption name is shown additionally when available. + +\index{cross references!marker style} +\index{cross references!numbering} +\index{cut-ref-num}% +\item [ -cut\_ref\_num \label{cs_cut_ref_num}] +\sameas{\fn{\$CUT\_REF\_NUM}\texttt{ = 1;}}\\ +Usually cross reference text contains only the caption number as a +hyperlink to the corresponding \LaTeX{} label. With -add\_ref\_name the +caption name can be shown additionally. If the caption number is not +desired, it can be cut out with -cut\_ref\_num. If -cut\_ref\_num is +given and -add\_ref\_name is not, then the cross reference text is +suppressed completely and a cross reference button shown instead. + \index{segmentation!unsegment} \item [ -unsegment\label{cs_unsegment}] diff -Naur latex2html-2021.orig/l2hconf.pin latex2html-2021/l2hconf.pin --- latex2html-2021.orig/l2hconf.pin 2021-01-01 22:10:57.000000000 +0700 +++ latex2html-2021/l2hconf.pin 2021-01-10 23:19:41.000000000 +0700 @@ -574,6 +574,25 @@ $SHOW_SECTION_NUMBERS = 0; +# -add_ref_name +# -cut_ref_num +# Usually cross reference text contains only the caption number as a +# hyperlink to the corresponding LaTeX label. However, it could be +# handy to see the name of the object referenced, if the reference text +# would contain both the caption number and the caption name. +# If $ADD_REF_NAME is 1, (option -add_ref_name), then the caption name +# is shown additionally. +# If $CUT_REF_NUM is 1, (option -cut_ref_num), then the caption number +# is cut out, leaving the optional name only. +# If $CUT_REF_NUM = 0 and $ADD_REF_NAME = 1, both caption number and +# name are shown. +# If $CUT_REF_NUM = 1 and $ADD_REF_NAME = 0, the cross reference text +# is suppressed and a cross reference button shown instead. +# +$ADD_REF_NAME = 0; +$CUT_REF_NUM = 0; + + # -short_index # If this is set then makeidx.perl will construct codified names # for the text of index references. @@ -899,6 +918,7 @@ $idx_title = "Index"; $ref_title = "References"; $bib_title = "Bibliography"; + $nom_title = "Nomenclature"; $abs_title = "Abstract"; $app_title = "Appendix"; $pre_title = "Preface"; diff -Naur latex2html-2021.orig/latex2html.1 latex2html-2021/latex2html.1 --- latex2html-2021.orig/latex2html.1 2021-01-01 22:10:57.000000000 +0700 +++ latex2html-2021/latex2html.1 2021-02-04 23:36:27.370189453 +0700 @@ -237,6 +237,29 @@ In order to be shown, section titles must be unique and must not contain inlined graphics. .TP +.B -add_ref_name +Same as setting: +.I $ADD_REF_NAME = 1; +Usually cross reference text contains only the caption number as a +hyperlink to the corresponding +.B LaTeX +label. However, it could be +handy to see the name of the object referenced, if the reference text +would contain both the caption number and the caption name. +With -add_ref_name the caption name is shown additionally when available. +.TP +.B -cut_ref_num +Same as setting: +.I $CUT_REF_NUM = 1; +Usually cross reference text contains only the caption number as a +hyperlink to the corresponding +.B LaTeX +label. With -add_ref_name the +caption name can be shown additionally. If the caption number is not +desired, it can be cut out with -cut_ref_num. If -cut_ref_num is +given and -add_ref_name is not, then the cross reference text is +suppressed completely and a cross reference button shown instead. +.TP .B -unsegment Same as setting: .I $UNSEGMENT = 1; diff -Naur latex2html-2021.orig/latex2html.pin latex2html-2021/latex2html.pin --- latex2html-2021.orig/latex2html.pin 2021-01-01 22:10:57.000000000 +0700 +++ latex2html-2021/latex2html.pin 2021-02-04 23:36:45.660189814 +0700 @@ -311,6 +311,8 @@ 'local_icons!', \$LOCAL_ICONS, 'scalable_fonts!', \$SCALABLE_FONTS, 'images_only!', \$IMAGES_ONLY, + 'cut_ref_num!', \$CUT_REF_NUM, + 'add_ref_name!', \$ADD_REF_NAME, 'show_section_numbers!',\$SHOW_SECTION_NUMBERS, 'show_init!', \$SHOW_INIT_FILE, 'init_file=s', \$INIT_FILE, @@ -913,11 +915,11 @@ $OUT_NODE = 0 unless $FIXEDDIR; $STYLESHEET = '' if ($STYLESHEET =~ /^\Q$FILE./); } - print "\nUnknown commands: ". join(" ",keys %unknown_commands) + print "\nUnknown commands: " . join(" ", sort keys %unknown_commands) if %unknown_commands; ###MEH -- math support print "\nMath commands outside math: " . - join(" ",keys %commands_outside_math) . + join(" ", sort keys %commands_outside_math) . "\n Output may look weird or may be faulty!\n" if %commands_outside_math; print "\nDone.\n"; @@ -1056,11 +1058,13 @@ # undef any renewed-commands... # so the new defs are read from %new_command - local($cmd,$key,$code); + local($cmd,$key,$code,$dum1,$dum2); foreach $key (sort keys %renew_command) { - $cmd = "do_cmd_$key"; + ($dum1, $dum2) = ($key, ''); + $dum1 = $key unless ($dum1 = &normalize($dum1, $dum2)); + $cmd = "do_cmd_$dum1"; $code = "undef \&$cmd"; eval($code) if (defined &$cmd); - if ($@) { print "\nundef \&do_cmd_$cmd failed"} + if ($@) { print "\nundef \&do_cmd_$dum1 failed" } } } @@ -1218,6 +1222,9 @@ s/^\\newcommand\{\\etalchar\}[^\n\r]*[\n\r]+//s; } &pre_process; + # remove hyperref specific redefinitions + s/^.*?\\(ifx|else|fi|gdef|let|global ?\\let)\b.*?\n//mg + if ($ext eq 'aux'); &substitute_meta_cmds if (%new_command || %new_environment); if ($ext eq "aux") { my $latex_pathname = L2hos->path2latex($file); @@ -1230,7 +1237,7 @@ if ($skip_to) { next unless ($eline =~ s/$O$skip_to$C//) } $skip_to = ''; # skip lines added for pdfTeX/hyperref compatibility - next if ($eline =~ /^\\(ifx|else|fi|global ?\\let|gdef|AtEndDocument|let )/); + next if ($eline =~ /^\\(ifx|else|fi|global ?\\let|gdef|AtEndDocument|let)/); # remove \index and \label commands, else invalid links may result $eline =~ s/\\(index|label)\s*($O\d+$C).*\2//g; if ($eline =~ /\\(old)?contentsline/) { @@ -1242,6 +1249,9 @@ $eline = &translate_environments($_); $AUX_FILE = $save_AUX; undef $_ }; + } elsif ($eline =~ /\\(old)?newlabel/) { + # also get rid of footnotes in labels + $eline =~ s/\\footnote(mark|text)?//g; } elsif ($eline =~ s/^\\\@input//) { &do_cmd__at_input($eline); $eline = ''; @@ -1594,7 +1604,7 @@ # try to find closing delimiter and substitute the complete # statement with $verb_mark or $verbstar_mark or $verblst_mark # s/(]*$id>[\Q$del\E])([^$esc_del\n]*)([\Q$del\E]|$comment_mark(\d+)\n?)/ - s/(]*$id>\Q$del\E)([^$esc_del\n]*?)(\Q$del\E|$comment_mark(\d+)\n?)/ + s/(]*$id>\Q$del\E)([^$esc_del]*?)(\Q$del\E|$comment_mark(\d+)\n?)/ $contents=$2; if ($4) { $verb_rerun = 1; join('', "\\verb$del", $contents, $comments{$4}) @@ -1606,6 +1616,8 @@ join('',$vb_mark,$id,$verb_mark) } /e; + # evtl revert inserted space after '\\' if '\' was our delimiter + s/($vb_mark$id$verb_mark\\) /$1/e if ($del eq "\\"); } $global{'verb_counter'} = $id; # revert changes to fake verb statements @@ -2288,7 +2300,7 @@ # local(%section_info, %toc_section_info, $CURRENT_FILE, %cite_info, %ref_files); local($CURRENT_FILE); # These filenames may be set when translating the corresponding commands. - local($tocfile, $loffile, $lotfile, $footfile, $citefile, $idxfile, + local($tocfile, $loffile, $lotfile, $nomfile, $footfile, $citefile, $idxfile, $figure_captions, $table_captions, $footnotes, $citations, %font_size, %index, %done, $t_title, $t_author, $t_date, $t_address, $t_affil, $changed); local(@authors,@affils,@addresses,@emails,@authorURLs); @@ -2795,7 +2807,7 @@ local($closures,$reopens); local(@save_open_tags) = @$open_tags_R unless ($defenv); local($open_tags_R) = [ @save_open_tags ] unless ($defenv); - local(@saved_tags) if ($env =~ /tabular|longtable/); + local(@saved_tags) if ($env =~ /tabular|longtable|makeimage/); if ($env =~ /tabular|longtable|makeimage|in(line|display)/) { @save_open_tags = @$open_tags_R; $open_tags_R = [ @save_open_tags ]; @@ -4695,7 +4707,7 @@ } sub translate_aux_commands { - s/^(.*)$/&translate_commands($1)/s; + s/^(.*)$/&translate_commands($1)/es; } sub translate_commands { @@ -4860,12 +4872,15 @@ local($tags,$tag_cmd,$tag_open); local($closures,$reopens,@tags); local($tag_close,$tag_open); + local($align_cmd,$align_open); local($size_cmd,$size_open); local($font_cmd,$font_open); local($fontwt_cmd,$fontwt_open); local($color_cmd,$color_open); - if ($decl) { - if ($this_tag =~ /$sizechange_rx/) { + if ($decl) { + if ($this_tag =~ /$alignchange_rx/) { + $align_cmd = $this_tag; + } elsif ($this_tag =~ /$sizechange_rx/) { $size_cmd = $this_tag; } else { if ($this_tag =~ /$fontchange_rx/) { @@ -4882,7 +4897,11 @@ ($tag_close,$tag_open) = ($&,$`) unless ($` =~ /<>/); $closures .= $tag_close; - if ((!$size_cmd)&&($tag_cmd =~ /$sizechange_rx/)) { + if ((!$align_cmd)&&($tag_cmd =~ /$alignchange_rx/)) { + $align_cmd = $tag_cmd; + $align_open = $tag_open; + } + elsif ((!$size_cmd)&&($tag_cmd =~ /$sizechange_rx/)) { $size_cmd = $tag_cmd; $size_open = $tag_open; } @@ -4899,7 +4918,7 @@ $color_open = $tag_open; } elsif ($tag_cmd =~ - /$sizechange_rx|$fontchange_rx|$fontweight_rx|$colorchange_rx/) { + /$alignchange_rx|$sizechange_rx|$fontchange_rx|$fontweight_rx|$colorchange_rx/) { } else { unshift (@tags, $tag_cmd); print STDOUT "\n<<$tag_cmd>" if $VERBOSITY > 2; @@ -4919,6 +4938,12 @@ } push (@$open_tags_R, @tags); $tags .= $pre if ($pre && $post =~ /$block_close_rx/); + if ($align_cmd && !($align_cmd eq $this_tag)) { + # This tag must be checked first when found + push (@$open_tags_R,$align_cmd); + print STDOUT "\n<$align_cmd>" if $VERBOSITY > 2; + $tags .= $align_open; + } if ($font_cmd && !($font_cmd eq $this_tag)) { push (@$open_tags_R,$font_cmd); print STDOUT "\n<$font_cmd>" if $VERBOSITY > 2; @@ -5029,9 +5054,10 @@ , ($closing_tag ? '' : &balance_tags()) ); } -sub do_cmd_centering{&declared_env('center',$_[0],$tex2html_deferred)} -sub do_cmd_raggedright{&declared_env('flushleft',$_[0],$tex2html_deferred)} -sub do_cmd_raggedleft{&declared_env('flushright',$_[0],$tex2html_deferred)} +# SGE: reimplemented via $declarations{$cmd} in &process_command +#sub do_cmd_centering{&declared_env('center',$_[0],$tex2html_deferred)} +#sub do_cmd_raggedright{&declared_env('flushleft',$_[0],$tex2html_deferred)} +#sub do_cmd_raggedleft{&declared_env('flushright',$_[0],$tex2html_deferred)} sub do_env_verse { &declared_env('verse',@_) } sub do_env_quote { &declared_env('quote', @_) } @@ -5047,9 +5073,9 @@ # MRO: modified to use $_[1] # local ($cmd_rx, *ref_contents) = @_; local ($cmd_rx) = @_; - local($ref_before, $cmd , $pc_after); - local($cmd_sub, $cmd_msub, $cmd_trans, $mathentity); - local (@open_font_tags,@open_size_tags); + local ($ref_before, $cmd, $bcmd, $pc_after); + local ($cmd_sub, $cmd_msub, $cmd_wsub, $cmd_trans, $mathentity); + local (@open_font_tags, @open_size_tags); $_[1] = &convert_iso_latin_chars($_[1]) unless (($cmd =~ /(Make)?([Uu]pp|[Ll]ow)ercase/)|| ((!$cmd)&&($_[1] =~ /^\\(Make)?([Uu]pp|[Ll]ow)ercase/s))); @@ -5064,10 +5090,11 @@ #print "\nAFTER:$1.$2:".$4."\n" if ($cmd_rx eq $single_cmd_rx); print STDOUT "$cmd" if ($VERBOSITY > 2); print STDOUT "\nIN: $_[1]\n" if ($VERBOSITY > 6); - # + # keep cmd name before being normalized + $bcmd = $cmd; if ( $cmd = &normalize($cmd,$pc_after) ) { - ($cmd_sub, $cmd_msub, $cmd_trans, $mathentity) = - ("do_cmd_$cmd", "do_math_cmd_$cmd" + ($cmd_sub, $cmd_msub, $cmd_wsub, $cmd_trans, $mathentity) = + ("do_cmd_$cmd", "do_math_cmd_$cmd", "wrap_cmd_$cmd" , $declarations{$cmd}, $mathentities{$cmd}); if ($new_command{$cmd}||$renew_command{$cmd}) { # e.g. some \the$counter @@ -5097,6 +5124,9 @@ } else { $pc_after = &$cmd_sub($pc_after, $open_tags_R); }; + # evtl update letter sensitive rx + $cmd_rx = $single_cmd_rx + if ($cmd eq 'makeatletter' || $cmd eq 'makeatother'); } elsif ((defined &$cmd_msub)&&!$NO_SIMPLE_MATH) { #print "\nMCMD:$cmd_msub : "; # $ref_before may also be modified ... @@ -5109,7 +5139,27 @@ #print "\nCMD-DECL: $inside_tabular : $cmd_trans". join(',',@$open_tags_R); if ($inside_tabular) { push (@ref_processed , "\\$cmd ") + } elsif ($cmd =~ /$alignchange_rx/o) { + # Ensure the proper nesting of alignment block tags + local($pre, $post) = &minimize_open_tags($cmd); + $pc_after = join('', $pre, $pc_after); + if (@$open_tags_R) { + local($decl) = shift(@$open_tags_R); + $declarations{$decl} =~ m|/); push(@$open_tags_R, $cmd) @@ -5126,8 +5176,8 @@ $pc_after = "&$mathentity#$cmd;" . $pc_after; ++$commands_outside_math{$cmd}; } - } elsif ($ignore{$cmd}) { # Ignored command - print "\nignoring \\$cmd" if $VERBOSITY > 5; + } elsif ($ignore{$bcmd}) { # Ignored command + print "\nignoring \\$bcmd" if $VERBOSITY > 5; $pc_after = join('', " ", $pc_after) if ($cmd eq " "); # catches `\ ' $pc_after = join(''," ", $pc_after) if (($cmd eq ',')&&($pc_after =~ /^\-/s)&&($ref_before =~/\-$/s)); @@ -5141,15 +5191,18 @@ $failed = 1; # $ref_before .= "$cmd"; push(@ref_processed,$cmd); # $ref_before .= "$cmd"; - } else { &declare_unknown_cmd($cmd) } + } else { &declare_unknown_cmd($bcmd) } # $ref_before .= "$cmd" if ($failed); } + } elsif (defined &$cmd_wsub) { + # call generated wrapper + ($dum1, $pc_after) = &$cmd_wsub($dum1, $pc_after); } elsif ($cmd eq "\n") { push(@ref_processed," "); # $ref_before .= " "; } else { # Do not add if reading an auxiliary file if (defined $failed) { $failed = 1; - } else { &declare_unknown_cmd($cmd) } + } else { &declare_unknown_cmd($bcmd) } } } else { # &normalize should have already handled it adequately @@ -5164,8 +5217,10 @@ } sub declare_unknown_cmd { - local($this_cmd) = @_; - local($tmp) = "wrap_cmd_$cmd"; + local($cmd) = @_; + local($dum1, $dum2) = ($cmd, ''); + $dum1 = $cmd unless ($dum1 = &normalize($dum1, $dum2)); + local($tmp) = "wrap_cmd_$dum1"; do { ++$unknown_commands{$cmd}; print STDOUT "\n*** Unknown command[1]: \\$cmd *** \n" if ($VERBOSITY > 2); @@ -5989,8 +6044,10 @@ local($thisone); # $thisone = 1 if ($cmd =~ /div|vec/); # for debugging - $tmp = "do_cmd_$cmd"; - local($wtmp) = "wrap_cmd_$cmd"; + local($dum1, $dum2) = ($cmd, ''); + $dum1 = $cmd unless ($dum1 = &normalize($dum1, $dum2)); + $tmp = "do_cmd_$dum1"; + local($wtmp) = "wrap_cmd_$dum1"; if ((defined &$tmp)||(defined &$wtmp)){ # command already exists, so \providecommand does nothing # but may still be needed in images.tex @@ -6018,16 +6075,16 @@ local($padding) = " "; $padding = '' if (($cmd =~ /\W$/)||(!$args)||($args =~ /^\W/)); # Generate a new subroutine - local($codeA) = "sub wrap_cmd_$cmd {" . "\n" + local($codeA) = "sub $wtmp {" . "\n" .'local($cmd, $_) = @_; local ($args, $dummy, $pat) = "";' . $bodyA - . (($thisone)? "\nprint \"\\nwrap $cmd:\".\$args.\"\\n\";" : '') + . (($thisone)? "\nprint \"\\nwrap \", '$cmd', \":\".\$args.\"\\n\";" : '') . "\n".'(&make_deferred_wrapper(1).$cmd.' . "\"$padding\"".'.$args.&make_deferred_wrapper(0),$_)}' . "\n"; print "\nWRAP_CMD: $codeA " if ($thisone); # for debugging eval $codeA; - print STDERR "\n\n*** sub wrap_cmd_$cmd failed: $@\n" if ($@); + print STDERR "\n\n*** sub $wtmp failed: $@\n" if ($@); $raw_arg_cmds{$cmd} = 1; } elsif (($ALLOW_REDEFINE)&&($PREAMBLE < 2)) { @@ -6041,16 +6098,16 @@ local($padding) = " "; $padding = '' if (($cmd =~ /\W$/)||(!$args)||($args =~ /^\W/)); # Generate a new subroutine - local($codeA) = "sub wrap_cmd_$cmd {" . "\n" + local($codeA) = "sub $wtmp {" . "\n" .'local($cmd, $_) = @_; local ($args, $dummy, $pat) = "";' . $bodyA - . (($thisone)? "\nprint \"\\nwrap $cmd:\".\$args.\"\\n\";" : '') + . (($thisone)? "\nprint \"\\nwrap \", '$cmd', \":\".\$args.\"\\n\";" : '') . "\n".'(&make_deferred_wrapper(1).$cmd.' . "\"$padding\"".'.$args.&make_deferred_wrapper(0),$_)}' . "\n"; print "\nWRAP_CMD: $codeA " if ($thisone); # for debugging eval $codeA; - print STDERR "\n\n*** sub wrap_cmd_$cmd failed: $@\n" if ($@); + print STDERR "\n\n*** sub $wtmp failed: $@\n" if ($@); &write_mydb("renew_command", $cmd, $renew_command{$cmd}); } elsif ($renewed) { @@ -9058,6 +9115,19 @@ '"' . "$ref_label#$label" . "\">" . $ref_mark . "<\/A>" }/geo; + # This is for namerefs, section name without section number + s/$cross_ref_mark#([^#]+)#([^>]+)>$name_ref_mark<\/A>(\s*$invis)?/ + do {($label,$id) = ($1,$2); $name = $4; + $ref_label = $external_labels{$label} unless + ($ref_label = $ref_files{$label}); + print "\nXLINK<: $label : $id :$name " if ($VERBOSITY > 3); + $ref_label = '' if ($ref_label eq $CURRENT_FILE); + $ref_mark = &get_name_ref_mark($label,$id); + &extend_ref if ($name); $name = ''; + print "\nXLINK: $label : $ref_label : $ref_mark " if ($VERBOSITY > 3); + '"' . "$ref_label#$label" . "\">" . $ref_mark . "<\/A>" + }/geo; + # This is for pagerefs which cannot have symbolic labels ??? # s/$cross_ref_mark#(\w+)#\w+>/ s/$cross_ref_mark#([^#]+)#[^>]+>/ @@ -9108,12 +9178,49 @@ sub get_ref_mark { local($label,$id) = @_; - ( ( $SHOW_SECTION_NUMBERS && $symbolic_labels{"$label$id"}) || - $latex_labels{"userdefined$label$id"} || - $symbolic_labels{"$label$id"} || - $latex_labels{$label} || - $external_latex_labels{$label} || - $cross_ref_visible_mark ); + local($val,$tmp,$valno,$valnam,$tmpno,$tmpnam); + $val = ( ( $SHOW_SECTION_NUMBERS && $symbolic_labels{"$label$id"}) || + $latex_labels{"userdefined$label$id"} || + $symbolic_labels{"$label$id"} || + $latex_labels{$label} || + $external_latex_labels{$label} || + $cross_ref_visible_mark ); + # Cut out section name, or number, or both, depending on the option given + $tmp = $val; + if ((($tmp =~ s/$next_pair_pr_rx/$valno=$&;$tmpno=$2;''/eo) || + ($tmp =~ s/$next_pair_rx/$valno=$&;$tmpno=$2;''/eo)) && + ($tmp =~ s/^\s*//o) && + (($tmp =~ s/$next_pair_pr_rx/$valnam=$&;$tmpnam=$2;''/eo) || + ($tmp =~ s/$next_pair_rx/$valnam=$&;$tmpnam=$2;''/eo)) && + $tmp eq '') { + $valno = $tmpno = '' if ($CUT_REF_NUM); + $valnam = $tmpnam = '' unless ($ADD_REF_NAME); + $tmp = ' ' if ($tmpno ne '' && $tmpnam ne ''); + $val = join ($tmp, $valno, $valnam); + $val = $cross_ref_visible_mark if ($tmpno eq '' && $tmpnam eq ''); + } + $val; +} + +sub get_name_ref_mark { + # a version of &get_ref_mark without section number, for namerefs + local($label,$id) = @_; + local($val,$tmp,$valno,$valnam); + $val = ( ( $SHOW_SECTION_NUMBERS && $symbolic_labels{"$label$id"}) || + $latex_labels{"userdefined$label$id"} || + $symbolic_labels{"$label$id"} || + $latex_labels{$label} || + $external_latex_labels{$label} || + $cross_ref_visible_mark ); + $tmp = $val; + $val = $valnam if ( + (($tmp =~ s/$next_pair_pr_rx/$valno=$&;''/eo) || + ($tmp =~ s/$next_pair_rx/$valno=$&;''/eo)) && + ($tmp =~ s/^\s*//o) && + (($tmp =~ s/$next_pair_pr_rx/$valnam=$&;''/eo) || + ($tmp =~ s/$next_pair_rx/$valnam=$&;''/eo)) && + $tmp eq ''); + $val; } sub replace_bbl_marks { @@ -9453,6 +9560,10 @@ , %unnumbered_section_commands ); + # This command should mark new section only if requested explicitly + $unnumbered_section_commands{'printnomenclature'} = $level + if ($styles_loaded{'nomencl_intoc'}); + %section_commands = ( %unnumbered_section_commands , %section_commands @@ -10767,6 +10878,7 @@ $idx_title = &translate_commands($idx_title) if ($idx_title =~ /\\/); $ref_title = &translate_commands($ref_title) if ($ref_title =~ /\\/); $bib_title = &translate_commands($bib_title) if ($bib_title =~ /\\/); + $nom_title = &translate_commands($nom_title) if ($nom_title =~ /\\/); $abs_title = &translate_commands($abs_title) if ($abs_title =~ /\\/); $app_title = &translate_commands($app_title) if ($app_title =~ /\\/); $pre_title = &translate_commands($pre_title) if ($pre_title =~ /\\/); @@ -10821,6 +10933,8 @@ # alter the pattern here to debug particular commands $thisone = 1 if ($cmd =~ /let/); + local($dum1, $dum2) = ($cmd, ''); + $dum1 = $cmd unless ($dum1 = &normalize($dum1, $dum2)); if (@args) { print "\n$cmd: ".scalar(@args)." arguments" if ($thisone); # Replace the argument markers with appropriate patterns @@ -10857,21 +10971,21 @@ } # Generate a new subroutine # $code = "sub do_cmd_$cmd {\n".'local($_) = @_;'. join('',@args) .'$_}'; - $code = "sub do_cmd_$cmd {\n" + $code = "sub do_cmd_$dum1 {\n" . 'local($_,$ot) = @_; ' . 'local($open_tags_R) = defined $ot ? $ot : $open_tags_R; ' . 'local($args); ' . "\n" . $body . (($body)? ";\n" : '') - . (($thisone)? "print \"\\n$cmd:\".\$args.\"\\n\";\n" : '') + . (($thisone)? "print \"\\n\", '$cmd', \":\".\$args.\"\\n\";\n" : '') . (($arg)? $arg : '$_') . "}"; print STDOUT "\n$code\n" if ($thisone); # for error-checking eval ($code); # unless ($thisone); - print STDERR "\n\n*** sub do_cmd_$cmd failed: $@\n" if ($@); + print STDERR "\n\n*** sub do_cmd_$dum1 failed: $@\n" if ($@); } else { - $code = "sub do_cmd_$cmd {\n".'$_[0]}'; + $code = "sub do_cmd_$dum1 {\n".'$_[0]}'; print "\n$code\n" if ($thisone); # for error-checking eval ($code); # unless ($thisone); - print STDERR "\n\n*** sub do_cmd_$cmd failed: $@\n" if ($@); + print STDERR "\n\n*** sub do_cmd_$dum1 failed: $@\n" if ($@); } } } @@ -11204,7 +11318,9 @@ # need to check also &{wrap_cmd_... also, if \renewcommand has been used; # thanks Bruce Miller - local($thehead,$whead) = ("do_cmd_the$key","wrap_cmd_the$key"); + local($dum1, $dum2) = ($key, ''); + $dum1 = $key unless ($dum1 = &normalize($dum1, $dum2)); + local($thehead,$whead) = ("do_cmd_the$key","wrap_cmd_the$dum1"); # $thehead = ((defined &$thehead)? # &translate_commands("\\the$key") : ''); $thehead = ((defined &$thehead)||(defined &$whead) @@ -11832,9 +11948,9 @@ # local($savedRS) = $/; $/=''; # $_ =~ /\\item[\b\r]/s; # if ($`) { -# $preitems = $`; $_ = $&.$'; -# $preitems =~ s/]*)?>//g; -# $close_tags .= "\n".$preitems if $preitems; +# $pre_items = $`; $_ = $&.$'; +# $pre_items =~ s/]*)?>//g; +# $close_tags .= "\n".$pre_items if $pre_items; # } # $/ = $savedRS; # @@ -11879,9 +11995,9 @@ $_ =~ /\Q$item_sep\E|
|
  • |$/s; #RRM: ...try putting it before the list-open tag if ($`) { - $preitems = $`; $_ = $&.$'; - $preitems =~ s/]*)?>//gm; - $close_tags .= "\n".$preitems if $preitems; + $pre_items = $`; $_ = $&.$'; + $pre_items =~ s/]*)?>//gm; + $close_tags = '' unless $pre_items; } # remove \n from end of the last item $_ =~ s/\n$//s; @@ -11891,8 +12007,8 @@ $/ = $savedRS; - join('' , $close_tags , "\n<$tag$compact>\n" - , $_ , "" , $reopens); + join('' , "\n<$tag$compact>\n" + , $pre_items , $_ , $close_tags , ""); } @@ -12295,7 +12411,7 @@ if ((defined &do_cmd_refname)||$new_command{'refname'}) { $br_id=++$global{'max_id'}; $title = &translate_environments("$O$br_id$C\\refname$O$br_id$C"); - } else { $title = $ref_name } + } else { $title = $ref_title; } return $title; } @@ -12645,7 +12761,13 @@ # $color = $next unless ($color); # } $declarations{$next} =~ m|/); + my ($pre,$post) = ($`,$&); + if ($post =~ /$block_close_rx|$all_close_rx/ ) { + # Don't close active block tags + push (@$ot, $next); + last; + } + $tags .= $post unless ($pre =~ /^<>/); } if ($size) { $declarations{$size} =~ m|".$str) if ($inside_tabular); +# +# my ($size,$closures,$reopens,@tags); +# +# while (@$ot) { +# my $next = pop @$ot; +# $declarations{$next} =~ m|/); +# print STDOUT "\n" if $VERBOSITY > 2; +# +# if ($next =~ /$fontchange_rx/) { +# # discard it +# } elsif ($next =~ /$fontweight_rx/) { +# # discard it +# } elsif ($next =~ /$sizechange_rx/) { +# $size = $next unless ($size); +# } else { +# unshift (@tags, $next); +# print STDOUT "\n<<$next>" if $VERBOSITY > 2; +# $reopens .= $pre unless ($pre =~ /^<>/); +# } +# } +# push (@$ot, @tags); +# if ($size) { +# $declarations{$size} =~ m|/); +# push (@$ot,$size); +# print STDOUT "\n<$size>" if $VERBOSITY > 2; +# } +# join('', $closures, $reopens, $str); +#} + sub do_cmd_rmfamily{ &do_cmd_rm(@_) } sub do_cmd_textrm { @@ -13243,7 +13406,9 @@ $cmd =~ s/ //g; # skip if a proper implementation already exists - $tmp = "do_cmd_$cmd"; + local($dum1, $dum2) = ($cmd, ''); + $dum1 = $cmd unless ($dum1 = &normalize($dum1, $dum2)); + $tmp = "do_cmd_$dum1"; next if (defined &$tmp); # Build routine body ... @@ -13294,17 +13459,20 @@ # Generate a new subroutine local($padding) = " "; $padding = '' if (($cmd =~ /\W$/)||(!$args)||($args =~ /^\W/)); - $code = "sub wrap_cmd_$cmd {" . "\n" + local($dum1, $dum2) = ($cmd, ''); + $dum1 = $cmd unless ($dum1 = &normalize($dum1, $dum2)); + local($wtmp) = "wrap_cmd_$dum1"; + $code = "sub $wtmp {" . "\n" . 'local($cmd, $_) = @_; local ($args, $dummy, $pat) = "";' . "\n" . $body - . (($thisone)? "print STDERR \"\\n$cmd:\".\$args.\"\\n\";\n" : '') + . (($thisone)? "print STDERR \"\\n\", '$cmd', \":\".\$args.\"\\n\";\n" : '') . '(&make_wrapper(1).$cmd' . ($padding ? '"'.$padding.'"' : '') . '.$args.&make_wrapper(0), $_)}' . "\n"; print "\nWRAP_CMD: $code " if ($thisone); # for debugging eval $code; # unless ($thisone); - print STDERR "\n*** sub wrap_cmd_$cmd failed: $@" if ($@); + print STDERR "\n*** sub $wtmp failed: $@" if ($@); # And make sure the main loop will catch it ... # $raw_arg_cmds{$cmd} = 1; @@ -13378,30 +13546,33 @@ local($padding) = " "; $padding = '' if (($cmd =~ /\W$/)||(!$args)||($args =~ /^\W/)); # Generate 2 new subroutines - $codeA = "sub wrap_cmd_$cmd {" . "\n" + local($dum1, $dum2) = ($cmd, ''); + $dum1 = $cmd unless ($dum1 = &normalize($dum1, $dum2)); + local($wtmp) = "wrap_cmd_$dum1"; + $codeA = "sub $wtmp {" . "\n" .'local($cmd, $_) = @_; local($args, $dummy, $pat) = "";'."\n" . $bodyA - . (($thisone)? "print \"\\nwrap $cmd:\\n\".\$args.\"\\n\";\n" : '') + . (($thisone)? "print \"\\nwrap \", '$cmd', \":\\n\".\$args.\"\\n\";\n" : '') . '(&make_nowrapper(1)."\n".$cmd.'."\"$padding\"" . '.$args.&make_nowrapper(0)," ".$_)}' ."\n"; print "\nWRAP_CMD: $codeA " if ($thisone); # for debugging eval $codeA; - print STDERR "\n\n*** sub wrap_cmd_$cmd failed: $@\n" if ($@); - $codeB = "do_cmd_$cmd"; + print STDERR "\n\n*** sub $wtmp failed: $@\n" if ($@); + $codeB = "do_cmd_$dum1"; do { $bodyB = '"";' if !($bodyB); - $codeB = "sub do_cmd_$cmd {" . "\n" + $codeB = "sub do_cmd_$dum1 {" . "\n" . 'local($_,$ot) = @_;'."\n" . 'local($open_tags_R) = defined $ot ? $ot : $open_tags_R;'."\n" . 'local($cmd,$args,$dummy,$pat)=("'.$cmd.'","","","");'."\n" . $bodyB - . (($thisone)? "print \"\\ndo $cmd:\".\$args.\"\\n\";\n" : '') + . (($thisone)? "print \"\\ndo \", '$cmd', \":\".\$args.\"\\n\";\n" : '') # . '$latex_body.="\\n".&revert_to_raw_tex("'."\\\\$cmd$padding".'$args")."\\n\\n";' . "\$_;}\n"; print STDOUT "\nDO_CMD: $codeB " if ($thisone); # for debugging eval $codeB; - print STDERR "\n\n*** sub do_cmd_$cmd failed: $@\n" if ($@); + print STDERR "\n\n*** sub do_cmd_$dum1 failed: $@\n" if ($@); } unless (defined &$codeB ); # And make sure the main loop will catch it ... @@ -13460,29 +13631,32 @@ local($padding) = " "; $padding = '' if (($cmd =~ /\W$/)||(!$args)||($args =~ /^\W/)); # Generate 2 new subroutines - $codeA = "sub wrap_cmd_$cmd {" . "\n" + local($dum1, $dum2) = ($cmd, ''); + $dum1 = $cmd unless ($dum1 = &normalize($dum1, $dum2)); + local($wtmp) = "wrap_cmd_$dum1"; + $codeA = "sub $wtmp {" . "\n" .'local($cmd, $_) = @_; local ($args, $dummy, $pat) = "";'."\n" . $bodyA #. ($bodyA ? "\n" : '') - . (($thisone)? ";print \"\\nwrap $cmd:\".\$args.\"\\n\";\n" : '') + . (($thisone)? ";print \"\\nwrap \", '$cmd', \":\".\$args.\"\\n\";\n" : '') .'(&make_deferred_wrapper(1).$cmd.'.$padding .'$args.&make_deferred_wrapper(0),$_)}' ."\n"; print STDERR "\nWRAP_CMD: $codeA " if ($thisone); # for debugging eval $codeA; - print STDERR "\n\n*** sub wrap_cmd_$cmd failed: $@\n" if ($@); + print STDERR "\n\n*** sub $wtmp failed: $@\n" if ($@); #RRM: currently these commands only go to LaTeX or access counters. # They could be implemented more generally, as below with do_dcmd_$cmd # requiring replacement to be performed before evaluation. - $codeB = "sub do_dcmd_$cmd {" . "\n" + $codeB = "sub do_dcmd_$dum1 {" . "\n" .'local($cmd, $_) = @_; local ($args, $dummy, $pat) = "";'."\n" . $bodyA . "\n" - . (($thisone)? ";print \"\\ndo_def $cmd:\".\$args.\"\\n\";\n" : '') + . (($thisone)? ";print \"\\ndo_def \", '$cmd', \":\".\$args.\"\\n\";\n" : '') . $bodyB . "}" . "\n"; print "\nDEF_CMD: $codeB " if ($thisone); # for debugging - local($tmp) = "do_cmd_$cmd"; + local($tmp) = "do_cmd_$dum1"; eval $codeB unless (defined &$tmp); - print STDERR "\n\n*** sub do_dcmd_$cmd failed: $@\n" if ($@); + print STDERR "\n\n*** sub do_dcmd_$dum1 failed: $@\n" if ($@); # And make sure the main loop will catch it ... # $raw_arg_cmds{$cmd} = 1; @@ -13531,17 +13705,20 @@ $padding = '' if (($cmd =~ /\W$/)||(!$args)||($args =~ /^\W/)); # Generate a new subroutine my $itype = ($cmd =~ /^f.*box$/ ? 'inline' : 'nomath'); - $code = "sub wrap_cmd_$cmd {" . "\n" + local($dum1, $dum2) = ($cmd, ''); + $dum1 = $cmd unless ($dum1 = &normalize($dum1, $dum2)); + local($wtmp) = "wrap_cmd_$dum1"; + $code = "sub $wtmp {" . "\n" .'local($cmd, $_) = @_; local ($args) = "";' . "\n" . $body . "\n" - . (($thisone)? ";print \"\\ndo $cmd:\".\$args.\"\\n\";\n" : '') + . (($thisone)? ";print \"\\ndo \", '$cmd', \":\".\$args.\"\\n\";\n" : '') .'(&make_'.$itype.'_wrapper(1).$cmd.$padding.$args.' . '&make_'.$itype.'_wrapper(0),$_)}' ."\n"; print "\nWRAP_CMD:$raw_arg_cmds{$cmd}: $code " if ($thisone); # for debugging eval $code; - print STDERR "\n\n*** sub wrap_cmd_$cmd failed: $@\n" if ($@); + print STDERR "\n\n*** sub $wtmp failed: $@\n" if ($@); # And make sure the main loop will catch it ... # $raw_arg_cmds{$cmd} = 1; ++$raw_arg_cmds{$cmd}; @@ -13580,7 +13757,10 @@ ($cmd, $star) = ($1.$2,$4); if ($star eq '*') { $star = 'star';} else { $after = $star.$after; $star = ''; } - $wrapper = "wrap_cmd_$cmd"; $teststar = $wrapper.'star'; + local($dum1, $dum2) = ($cmd, ''); + $dum1 = $cmd unless ($dum1 = &normalize($dum1, $dum2)); + $wrapper = "wrap_cmd_$dum1"; + $teststar = $wrapper.'star'; if ($star && defined &$teststar) { $wrapper = $teststar; $star = '*'; } # MRO: make {\bf**} work elsif($star) { $after = '*'.$after; $star = '' } @@ -13871,7 +14051,7 @@ sub get_footnote_mark { local($mini) = @_; - return($footnote_mark) if ($HTML_VERSION < 3.0 ); + return($footnote_mark) if ($HTML_VERSION < 3.0); local($cmd,$tmp,@tmp,$marker); $cmd = "the". (($mini)? 'mp' : '') . "footnote"; if ($new_command{$cmd}) { @@ -14141,6 +14321,7 @@ sub do_cmd_datename { $date_name . $_[0] } sub do_cmd_refname { $ref_title . $_[0] } sub do_cmd_bibname { $bib_title . $_[0] } +sub do_cmd_nomname { $nom_title . $_[0] } sub do_cmd_figurename { $fig_name . $_[0] } sub do_cmd_listfigurename { $lof_title . $_[0] } sub do_cmd_tablename { $tab_name . $_[0] } @@ -14559,18 +14740,83 @@ # This is used in $FILE.aux sub do_cmd_newlabel { local($_) = @_; - local($label,$val,$tmp); + local($label,$val,$valno,$valnam,$valpag,$tmp,$tmp2,$tmp3); + + # 1st argument is always label $label = &missing_braces unless ( (s/$next_pair_pr_rx/$label = $2;''/eo) ||(s/$next_pair_rx/$label = $2;''/eo)); + $label =~ s/$label_rx/_/g; # Replace non alphanumeric characters + # next argument is a bracketed container $tmp = &missing_braces unless ( (s/$next_pair_pr_rx/$tmp=$2;''/eo) ||(s/$next_pair_rx/$tmp=$2;''/eo)); - $val = &missing_braces unless ( - ($tmp =~ s/$next_pair_pr_rx/$val=$2;''/eo) - ||($tmp =~ s/$next_pair_rx/$val=$2;''/eo)); - $val =~ s/(^\s+|\s+$)//gs; - $label =~ s/$label_rx/_/g; # Replace non alphanumeric characters + # 2nd argument may be either cap number or another bracketed container + $valno = '' unless ( + ($tmp =~ s/$next_pair_pr_rx/$valno=$&;''/eo) + ||($tmp =~ s/$next_pair_rx/$valno=$&;''/eo)); + $valno =~ s/(^\s+|\s+$)//gs; + # 3rd argument is always page number + $valpag = &missing_braces unless ( + ($tmp =~ s/$next_pair_pr_rx/$valpag=$2;''/eo) + ||($tmp =~ s/$next_pair_rx/$valpag=$2;''/eo)); + $valpag =~ s/(^\s+|\s+$)//gs; + + if ($tmp eq '') { + # either article or memoir: try to unwrap and parse 2nd argument + $tmp2 = $valno; + $tmp = &missing_braces unless ( + ($tmp2 =~ s/$next_pair_pr_rx/$tmp=$2;''/eo) + ||($tmp2 =~ s/$next_pair_rx/$tmp=$2;''/eo)); + # 1st part of 2nd argument is either empty or actual new cap number + $tmp2 = '' unless ( + ($tmp =~ s/$next_pair_pr_rx/$tmp2=$&;''/eo) + ||($tmp =~ s/$next_pair_rx/$tmp2=$&;''/eo)); + $tmp2 =~ s/(^\s+|\s+$)//gs; + if ($tmp2 eq '') { + # article: keep old cap number, cap text unavailable + $valnam = ''; + } else { + # memoir: reassign new cap number, cap text following + $valno = $tmp2; + # memoir: 2nd part of 2nd argument is actual cap text + $valnam = '' unless ( + ($tmp =~ s/$next_pair_pr_rx/$valnam=$&;''/eo) + ||($tmp =~ s/$next_pair_rx/$valnam=$&;''/eo)); + $valnam =~ s/(^\s+|\s+$)//gs; + } + } else { + # special case: nameref without hyperref, 4th argument is cap text + $valnam = '' unless ( + ($tmp =~ s/$next_pair_pr_rx/$valnam=$&;''/eo) + ||($tmp =~ s/$next_pair_rx/$valnam=$&;''/eo)); + $valnam =~ s/(^\s+|\s+$)//gs; + # recheck for memoir: try to unwrap and parse 2nd argument + $tmp2 = $valno; + $tmp = &missing_braces unless ( + ($tmp2 =~ s/$next_pair_pr_rx/$tmp=$2;''/eo) + ||($tmp2 =~ s/$next_pair_rx/$tmp=$2;''/eo)); + # actual cap number is here if we have a container with two items + if ((($tmp =~ s/$next_pair_pr_rx/$tmp2=$&;''/eo) || + ($tmp =~ s/$next_pair_rx/$tmp2=$&;''/eo)) && + (($tmp =~ s/$next_pair_pr_rx/$tmp3=$&;''/eo) || + ($tmp =~ s/$next_pair_rx/$tmp3=$&;''/eo)) && + $tmp eq '') + { + $valno = $tmp2; + $valno =~ s/(^\s+|\s+$)//gs; + if ($valnam eq '') + { + $valnam = $tmp3; + $valnam =~ s/(^\s+|\s+$)//gs; + } + } + } + + # Now combine number and text together, separated by one space + $tmp = ''; + $tmp = ' ' if ($valno ne '' && $valnam ne ''); + $val = join ($tmp, $valno, $valnam); $latex_labels{$label} = $val; &do_labels_helper($label); $_; @@ -15959,6 +16205,7 @@ unless $AtBeginDocument_hook; $cross_ref_mark = ''; $external_ref_mark = ''; + $name_ref_mark = ''; $cite_mark = ''; $hash_mark = ''; $protected_hash = ''; @@ -16145,7 +16392,7 @@ # 'raggedleft', '

    ', %declarations = ( -# 'centering', '

    ', + 'centering', '

    ', 'center', '

    ', 'flushleft', '

    ', 'raggedright', '

    ', @@ -16177,6 +16424,7 @@ 'par', '

    ', 'samepage', '', # 'centering', '
    ', + 'centering', '
    ', 'center', '
    ', 'flushleft', '
    ', 'raggedright', '
    ', @@ -16214,7 +16462,7 @@ # These need their own custom code but are treated as sectioning commands %section_headings = ('tableofcontents', 'H2', 'listoffigures', 'H2', 'listoftables', 'H2' - , 'bibliography', 'H2', 'textohtmlindex', 'H2' + , 'bibliography', 'H2', 'nomenclature', 'H2', 'textohtmlindex', 'H2' , %standard_section_headings , %section_headings); @@ -16985,6 +17233,7 @@ $colorchange_rx = "(text)?color\\s*(\#\\w{6})?"; $sizechange_rx = 'tiny|Tiny|scriptsize|footnotesize|small|Small|SMALL' . '|normalsize|large|Large|LARGE|huge|Huge'; + $alignchange_rx = 'centering|raggedright|raggedleft'; # $image_switch_rx = "makeimage"; $image_switch_rx = "makeimage|scshape|sc"; @@ -17378,6 +17627,8 @@ S<[ B<->(B)B ]> S<[ B<->(B)B ]> S<[ B<->(B)B ]> +S<[ B<->(B)B ]> +S<[ B<->(B)B ]> S<[ B<->(B)B ]> S<[ B<->(B)B ]> S<[ B<->(B)B ]> @@ -17723,6 +17974,20 @@ as standalone documents. In this case the cross reference to a section is shown using the default symbol rather than the section number. +=item B<->(B)B + +=item B<->(B)B + +Usually cross reference text contains only the caption number as a +hyperlink to the corresponding B label. However, it could be handy +to see the name of the object referenced, if the reference text would +contain both the caption number and the caption name. +With B<-add_ref_name> the caption name is shown additionally when available. +With B<-cut_ref_num> the caption number is cut out leaving the optional +name only. If B<-cut_ref_num> is given and B<-add_ref_name> is not, +then the cross reference text is suppressed and a cross reference +button shown instead. + =item B<->(B)B For intermediate DVI images produced by latex or dvilualatex: diff -Naur latex2html-2021.orig/styles/american.perl latex2html-2021/styles/american.perl --- latex2html-2021.orig/styles/american.perl 2021-01-01 22:10:57.000000000 +0700 +++ latex2html-2021/styles/american.perl 2021-01-10 23:19:41.000000000 +0700 @@ -22,6 +22,7 @@ $idx_title = "Index"; $ref_title = "References"; $bib_title = "Bibliography"; + $nom_title = "Nomenclature"; $abs_title = "Abstract"; $app_title = "Appendix"; $pre_title = "Preface"; diff -Naur latex2html-2021.orig/styles/czech.perl latex2html-2021/styles/czech.perl --- latex2html-2021.orig/styles/czech.perl 2021-01-01 22:10:57.000000000 +0700 +++ latex2html-2021/styles/czech.perl 2021-01-10 23:19:41.000000000 +0700 @@ -16,8 +16,6 @@ if (defined &addto_languages) { &addto_languages('czech') }; -&do_require_extension ('latin2'); - sub czech_titles { $toc_title = "Obsah"; $lof_title = "Seznam obrázků"; diff -Naur latex2html-2021.orig/styles/english.perl latex2html-2021/styles/english.perl --- latex2html-2021.orig/styles/english.perl 2021-01-01 22:10:57.000000000 +0700 +++ latex2html-2021/styles/english.perl 2021-01-10 23:19:41.000000000 +0700 @@ -36,6 +36,7 @@ $idx_title = "Index"; $ref_title = "References"; $bib_title = "Bibliography"; + $nom_title = "Nomenclature"; $abs_title = "Abstract"; $app_title = "Appendix"; $pre_title = "Preface"; diff -Naur latex2html-2021.orig/styles/germanb.perl latex2html-2021/styles/germanb.perl --- latex2html-2021.orig/styles/germanb.perl 2021-01-01 22:10:57.000000000 +0700 +++ latex2html-2021/styles/germanb.perl 2021-01-10 23:19:41.000000000 +0700 @@ -192,6 +192,7 @@ $idx_title = "Index"; $ref_title = "Literaturverzeichnis"; $bib_title = "Literatur"; + $nom_title = "Symbolverzeichnis"; $abs_title = "Zusammenfassung"; $app_title = "Anhang"; $pre_title = "Vorwort"; diff -Naur latex2html-2021.orig/styles/german.perl latex2html-2021/styles/german.perl --- latex2html-2021.orig/styles/german.perl 2021-01-01 22:10:57.000000000 +0700 +++ latex2html-2021/styles/german.perl 2021-01-10 23:19:41.000000000 +0700 @@ -192,6 +192,7 @@ $idx_title = "Index"; $ref_title = "Literaturverzeichnis"; $bib_title = "Literatur"; + $nom_title = "Symbolverzeichnis"; $abs_title = "Zusammenfassung"; $app_title = "Anhang"; $pre_title = "Vorwort"; diff -Naur latex2html-2021.orig/styles/magyar.perl latex2html-2021/styles/magyar.perl --- latex2html-2021.orig/styles/magyar.perl 2021-01-01 22:10:57.000000000 +0700 +++ latex2html-2021/styles/magyar.perl 2021-01-10 23:19:41.000000000 +0700 @@ -16,8 +16,6 @@ if (defined &addto_languages) { &addto_languages('magyar') }; -&do_require_extension ('latin2'); - sub magyar_titles { $toc_title = 'Tartalomjegyzék'; $lof_title = 'Ábrák jegyzéke'; diff -Naur latex2html-2021.orig/styles/memoir.perl latex2html-2021/styles/memoir.perl --- latex2html-2021.orig/styles/memoir.perl 1970-01-01 07:00:00.000000000 +0700 +++ latex2html-2021/styles/memoir.perl 2021-02-04 23:36:27.370189453 +0700 @@ -0,0 +1,187 @@ +# memoir.perl by Georgy Salnikov 2021/01/29 +# +# Extension to LaTeX2HTML V2021 to support the "memoir" document class +# and some of its class options. Currently support is very limited. +# +# Partly adapted from book.perl +# +# Change Log: +# =========== +# +# $Log: $ + +package main; + +# Suppress option-warning messages: + +sub do_memoir_a4paper{} +sub do_memoir_a5paper{} +sub do_memoir_b5paper{} +sub do_memoir_legalpaper{} +sub do_memoir_letterpaper{} +sub do_memoir_executivepaper{} +sub do_memoir_landscape{} +sub do_memoir_final{} +sub do_memoir_draft{} +sub do_memoir_ms{} +sub do_memoir_oneside{} +sub do_memoir_twoside{} +sub do_memoir_openright{} +sub do_memoir_openleft{} +sub do_memoir_openany{} +sub do_memoir_onecolumn{} +sub do_memoir_twocolumn{} +sub do_memoir_openbib{} +sub do_memoir_extrafontsizes{} + +sub do_memoir_10pt{ $LATEX_FONT_SIZE = '10pt' unless $LATEX_FONT_SIZE; } +sub do_memoir_11pt{ $LATEX_FONT_SIZE = '11pt' unless $LATEX_FONT_SIZE; } +sub do_memoir_12pt{ $LATEX_FONT_SIZE = '12pt' unless $LATEX_FONT_SIZE; } + +sub do_memoir_leqno{ $EQN_TAGS = 'L'; } +sub do_memoir_reqno{ $EQN_TAGS = 'R'; } +sub do_memoir_fleqn{ $FLUSH_EQN = 1; } + +&addto_dependents('chapter','equation'); +&addto_dependents('chapter','footnote'); +&addto_dependents('chapter','figure'); +&addto_dependents('chapter','table'); + +sub do_memoir_article { + &remove_dependency('chapter','equation'); + &remove_dependency('chapter','footnote'); + &remove_dependency('chapter','figure'); + &remove_dependency('chapter','table'); + + delete ($depends_on{'equation'}) if (exists ($depends_on{'equation'})); + delete ($depends_on{'footnote'}) if (exists ($depends_on{'footnote'})); + delete ($depends_on{'figure'}) if (exists ($depends_on{'figure'})); + delete ($depends_on{'table'}) if (exists ($depends_on{'table'})); + + $styles_loaded{'memoir_article'} = 1; +} + +sub do_cmd_thepart { + join('', &do_cmd_Roman("${O}0${C}part${O}0$C"), ".", @_[0]) } + +sub do_cmd_thechapter { + join('', &do_cmd_arabic("${O}0${C}chapter${O}0$C"), ".", @_[0]) } + +sub do_cmd_thesection { +# Memoir seems to always prepend chapter number to sections +# if ($styles_loaded{'memoir_article'}) { +# join('', &do_cmd_arabic("${O}0${C}section${O}0$C"), @_[0]); +# } else { + join('', &translate_commands("\\thechapter"), + &do_cmd_arabic("${O}0${C}section${O}0$C"), @_[0]); +# } +} + +sub do_cmd_thesubsection { + join('', &translate_commands("\\thesection") + ,".", &do_cmd_arabic("${O}0${C}subsection${O}0$C"), @_[0]) } + +sub do_cmd_thesubsubsection { + join('', &translate_commands("\\thesubsection") + ,".", &do_cmd_arabic("${O}0${C}subsubsection${O}0$C"), @_[0]) } + +sub do_cmd_theparagraph { + join('', &translate_commands("\\thesubsubsection") + ,".", &do_cmd_arabic("${O}0${C}paragraph${O}0$C"), @_[0]) } + +sub do_cmd_thesubparagraph { + join('', &translate_commands("\\theparagraph") + ,".", &do_cmd_arabic("${O}0${C}subparagraph${O}0$C"), @_[0]) } + +sub do_cmd_theequation { + local($chap) = ''; + $chap = &translate_commands("\\thechapter") + unless ($styles_loaded{'memoir_article'}); + join('', (($chap =~ /^(0\.)?$/)? '' : $chap) + , &do_cmd_arabic("${O}0${C}equation${O}0$C"), @_[0]) } + +sub do_cmd_thefootnote { + local($chap) = ''; +# Memoir seems not to prepend chapter number to footnotes +# $chap = &translate_commands("\\thechapter") +# unless ($styles_loaded{'memoir_article'}); + join('', (($chap =~ /^(0\.)?$/)? '' : $chap) + , &do_cmd_arabic("${O}0${C}footnote${O}0$C"), @_[0]) } + +sub do_cmd_thefigure { + local($chap) = ''; + $chap = &translate_commands("\\thechapter") + unless ($styles_loaded{'memoir_article'}); + join('', (($chap =~ /^(0\.)?$/)? '' : $chap) + , &do_cmd_arabic("${O}0${C}figure${O}0$C"), @_[0]) } + +sub do_cmd_thetable { + local($chap) = ''; + $chap = &translate_commands("\\thechapter") + unless ($styles_loaded{'memoir_article'}); + join('', (($chap =~ /^(0\.)?$/)? '' : $chap) + , &do_cmd_arabic("${O}0${C}table${O}0$C"), @_[0]) } + +# bibliography title comes from \bibname +sub make_bibliography_title { + local($br_id, $title); + if ((defined &do_cmd_bibname)||$new_command{'bibname'}) { + $br_id=++$global{'max_id'}; + $title = &translate_environments("$O$br_id$C\\bibname$O$br_id$C"); + } else { $title = $bib_title } + return $title; +} + +# Memoir stimulates to use various adjustment commands which are related +# to typography but completely unrelated to HTML. They have to be +# explicitly ignored otherwise ugly numeric arguments may be left as text. +&ignore_commands (<<_IGNORED_CMDS_); +setstocksize # {} # {} +settrims # {} # {} +settrimmedsize # {} # {} # {} +settypeblocksize # {} # {} # {} +setlrmargins # {} # {} # {} +setlrmarginsandblock # {} # {} # {} +setulmargins # {} # {} # {} +setulmarginsandblock # {} # {} # {} +setbinding # {} +setcolsepandrule # {} # {} +setheadfoot # {} # {} +setheaderspaces # {} # {} # {} +setmarginnotes # {} # {} # {} +setfootins # {} # {} +checkthelayout # [] +fixthelayout +fixpdflayout +fixdvipslayout +checkandfixthelayout # [] +typeoutlayout +typeoutstandardlayout +settypeoutlayoutunit # {} +medievalpage # [] +isopage # [] +semiisopage # [] +setpagebl # {} # {} # {} +setpageml # {} # {} # {} +setpagetl # {} # {} # {} +setpagetm # {} # {} # {} +setpagetr # {} # {} # {} +setpagemr # {} # {} # {} +setpagebr # {} # {} # {} +setpagebm # {} # {} # {} +setpagecc # {} # {} # {} +_IGNORED_CMDS_ + +# These are ignored for now but may be implemented later to some extent +&ignore_commands (<<_IGNORED_CMDS_); +settocdepth # {} +maxtocdepth # {} +setsecnumdepth # {} +maxsecnumdepth # {} +addtodef # {} # {} # {} +addtoiargdef # {} # {} # {} +makechapterstyle # {} # {} +chapterstyle # {} +_IGNORED_CMDS_ + +1; # Must be last line diff -Naur latex2html-2021.orig/styles/nameref.perl latex2html-2021/styles/nameref.perl --- latex2html-2021.orig/styles/nameref.perl 1970-01-01 07:00:00.000000000 +0700 +++ latex2html-2021/styles/nameref.perl 2021-01-10 23:19:41.000000000 +0700 @@ -0,0 +1,37 @@ +# -*- perl -*- +# +# $Id: $ +# +# nameref.perl +# Georgy Salnikov 02/01/21 +# +# Extension to LaTeX2HTML V2020 to support the "nameref" package +# +# $Log: $ +# +# Note: +# This package provides formatting references with section name +# but without section number. The support is extremely primitive. + +package main; + +# for debugging only +#print "\nUsing nameref.perl\n"; + +# &process_ref does everything... +sub do_cmd_nameref { + local($_) = @_; + &process_ref($cross_ref_mark, $name_ref_mark); +} + +sub do_cmd_Nameref { + local($arg) = @_; + join('', "'", &do_cmd_nameref($arg), "' on page ", &do_cmd_pageref($arg)); +} + +&process_commands_wrap_deferred (<<_RAW_ARG_DEFERRED_CMDS_); +nameref # {} +Nameref # {} +_RAW_ARG_DEFERRED_CMDS_ + +1; # Must be last line diff -Naur latex2html-2021.orig/styles/nomencl.perl latex2html-2021/styles/nomencl.perl --- latex2html-2021.orig/styles/nomencl.perl 1970-01-01 07:00:00.000000000 +0700 +++ latex2html-2021/styles/nomencl.perl 2021-02-04 23:36:27.370189453 +0700 @@ -0,0 +1,145 @@ +# -*- perl -*- +# +# $Id: $ +# +# nomencl.perl +# Georgy Salnikov 27/12/20 +# +# Extension to LaTeX2HTML V2020 to partly support the "nomencl" package +# +# $Log: $ +# +# Note: +# This module provides reading and translation of the nomenclature (.nls) file +# generated by makeindex from the .nlo file (the latter being created by LaTeX) +# makeindex .nlo -s nomencl.ist -o .nls +# +# The commands \makenomenclature and \nomenclature are taken into account by +# LaTeX and silently ignored by this module as the result only is interpreted. +# +# thenomenclature environment generated by makeindex contains the commands +# \nomgroup, \nomeqref, \nompageref which are also ignored. +# +# Package option [intoc] and the \nomname definition are taken into account +# by \printnomenclature to ensure generation of proper heading and segmenting. +# +# The rest of the nomencl package is not yet implemented. + +package main; + +# for debugging only +#print "\nUsing nomencl.perl\n"; + +# Just mark the existence of the option for the later checking +sub do_nomencl_intoc { + $styles_loaded{'nomencl_intoc'} = 1; +} + +# Explicitly cancel the default option +sub do_nomencl_notintoc { + delete ($styles_loaded{'nomencl_intoc'}) + if (exists ($styles_loaded{'nomencl_intoc'})); +} + +# .nls file is very similar to a \begin{description} environment +sub do_env_thenomenclature { + local($_) = @_; + +# # The following 3 function calls would yield a compact list +# $_ = &list_helper($_, 'DL'); +# $_ = &translate_environments($_); +# $_ = &translate_commands($_); + + # The following generates a list similar to description environment + # Evtl catch nested lists + &protect_useritems($_); + + s/\n?$item_description_rx\s*($labels_rx8)?\s*/"\n<\/DD>\n
    " . + (($9) ? "$1<\/A>" : $1) . "<\/DT>\n
    "/egm; + + $_ = &translate_environments($_); + $_ = &translate_commands($_); + + # just for safety in case the description is empty ... + s/\n?\\item\b\s*([^$letters\\]|)\s*/\n<\/DD>\n
    <\/DT>\n
    $1/gm; + s/^\s+//m; + + # Wrap the whole description with the appropriate opening/closing tags + $_ = '
    '.$_ unless ($_ =~ s/^\s*<\/D(T|D)>\n?//s); + $_ =~ s/\n$//s; + "
    \n$_\n
    \n"; +} + +# Generate nomenclature with heading and optional sectioning +sub do_cmd_printnomenclature { + local($_) = @_; + + local($dum1, $dum2, $after); + ($dum1,$dum2) = &get_next_optional_argument; # discard optional argument + $after = $_; + + # Make the appropriate heading + local($br_id, $title); + if ((defined &do_cmd_nomname) || $new_command{'nomname'}) { + $br_id = ++$global{'max_id'}; + $title = &translate_environments("$O$br_id$C\\nomname$O$br_id$C"); + } else { $title = $nom_title; } + $nomfile = $CURRENT_FILE; # sets $nomfile this globally + + # Ensure also segmenting if intoc requested + $toc_sec_title = $TITLE = $title if ($styles_loaded{'nomencl_intoc'}); + + # Load and interpret .nls file + local($EXTERNAL_FILE) = ''; + unless (&process_ext_file('nls')) { # *** BINDS $_ as a side effect *** + print "\nCannot open $FILE.nls: $!\n"; + &write_warnings("\nThe nomenclature file was not found."); + $_ = "\n

    No Nomenclature!

    \n"; + } + + # Put the result in the right place + local($closures,$reopens) = &preserve_open_tags(); + join('', "
    \n", $closures, + &make_section_heading($title, $section_headings{'nomenclature'}), + $_, $reopens, $after); +} + +## Discard all arguments, the following white space and possible paragraphs. +## Simple ignoration leaves repeated unnecessary

    's. +## Changed to a special ignoration followed by regular expression. +## Left here in commented out form just for reference/debugging. +#sub do_cmd_nomenclature { +# local($_) = @_; +# +# local($dum1, $dum2); +# ($dum1,$dum2) = &get_next_optional_argument; +# $dum1 = &missing_braces unless ( +# (s/$next_pair_pr_rx/$option=$2;''/eo) +# ||(s/$next_pair_rx/$option=$2;''/eo)); +# $dum2 = &missing_braces unless ( +# (s/$next_pair_pr_rx/$option=$2;''/eo) +# ||(s/$next_pair_rx/$option=$2;''/eo)); +# s/^(\s*

    )*\s*/\n/; +# +# $_; +#} + +&ignore_commands (<<_IGNORED_CMDS_); +makenomenclature +nomenclature # [] # {} # {} # s/^(\\s*

    )*\\s*/\\n/; +nomgroup # {} +nomeqref # {} +nompageref # {} +nomrefeq +nomrefpage +nomrefeqpage +nomnorefeq +nomnorefpage +nomnorefeqpage +_IGNORED_CMDS_ + +&process_commands_wrap_deferred (<<_RAW_ARG_DEFERRED_CMDS_); +printnomenclature # [] +_RAW_ARG_DEFERRED_CMDS_ + +1; # Must be last line diff -Naur latex2html-2021.orig/styles/polski.perl latex2html-2021/styles/polski.perl --- latex2html-2021.orig/styles/polski.perl 2021-01-01 22:10:57.000000000 +0700 +++ latex2html-2021/styles/polski.perl 2021-01-10 23:19:41.000000000 +0700 @@ -35,8 +35,6 @@ if (defined &addto_languages) { &addto_languages('polski') }; -&do_require_extension('unicode'); - sub polski_titles { # $toc_title = "Spis rzeczy"; $toc_title = "Spis tre\\'sci"; diff -Naur latex2html-2021.orig/styles/romanian.perl latex2html-2021/styles/romanian.perl --- latex2html-2021.orig/styles/romanian.perl 2021-01-01 22:10:57.000000000 +0700 +++ latex2html-2021/styles/romanian.perl 2021-01-10 23:19:41.000000000 +0700 @@ -16,8 +16,6 @@ if (defined &addto_languages) { &addto_languages('romanian') }; -&do_require_extension ('latin10'); - sub romanian_titles { $toc_title = "Cuprins"; $lof_title = "Listg de figuri"; diff -Naur latex2html-2021.orig/styles/slovak.perl latex2html-2021/styles/slovak.perl --- latex2html-2021.orig/styles/slovak.perl 2021-01-01 22:10:57.000000000 +0700 +++ latex2html-2021/styles/slovak.perl 2021-01-10 23:19:41.000000000 +0700 @@ -16,8 +16,6 @@ if (defined &addto_languages) { &addto_languages('slovak') }; -&do_require_extension ('latin2'); - sub slovak_titles { $toc_title = "Obsah"; $lof_title = "Zoznam obrázkov"; diff -Naur latex2html-2021.orig/versions/cp1251.pl latex2html-2021/versions/cp1251.pl --- latex2html-2021.orig/versions/cp1251.pl 2021-01-01 22:10:57.000000000 +0700 +++ latex2html-2021/versions/cp1251.pl 2021-01-10 23:19:41.000000000 +0700 @@ -448,6 +448,8 @@ $idx_title = " "; $ref_title = " "; $bib_title = ""; + # $nom_title = " "; + $nom_title = ""; $abs_title = ""; $app_title = ""; $pre_title = ""; diff -Naur latex2html-2021.orig/versions/html3_1.pl latex2html-2021/versions/html3_1.pl --- latex2html-2021.orig/versions/html3_1.pl 2021-01-01 22:10:57.000000000 +0700 +++ latex2html-2021/versions/html3_1.pl 2021-02-04 23:36:27.370189453 +0700 @@ -1719,8 +1719,10 @@ $cmd = $&; print "."; print STDERR "$cmd" if ($VERBOSITY > 2); + local($dum1, $dum2) = ($cmd, ''); + $dum1 = $cmd unless ($dum1 = &normalize($dum1, $dum2)); local($mtmp, $ctmp, $wtmp) = - ("do_math_cmd_$cmd","do_cmd_$cmd", "wrap_cmd_$cmd"); + ("do_math_cmd_$dum1","do_cmd_$dum1", "wrap_cmd_$dum1"); if ($cmd =~/color/) { do { local($color_env,$inside_math) = ($color_env,1); diff -Naur latex2html-2021.orig/versions/html4_01.pl latex2html-2021/versions/html4_01.pl --- latex2html-2021.orig/versions/html4_01.pl 2021-01-01 22:10:57.000000000 +0700 +++ latex2html-2021/versions/html4_01.pl 2021-02-04 23:36:27.370189453 +0700 @@ -41,15 +41,16 @@ sub do_env_raggedright { &declared_env('flushleft', @_) } sub do_env_raggedleft { &declared_env('flushright', @_) } -sub do_cmd_centering { - # MRO *opentags has no effect - local($_)= @_; &declared_env('center', $_) } -sub do_cmd_raggedright { - # MRO *opentags has no effect - local($_) = @_; &declared_env('flushleft', $_) } -sub do_cmd_raggedleftt { - # MRO *opentags has no effect - local($_) = @_; &declared_env('flushright', $_) } +# SGE: reimplemented via $declarations{$cmd} in &process_command +#sub do_cmd_centering { +# # MRO *opentags has no effect +# local($_)= @_; &declared_env('center', $_) } +#sub do_cmd_raggedright { +# # MRO *opentags has no effect +# local($_) = @_; &declared_env('flushleft', $_) } +#sub do_cmd_raggedleft { +# # MRO *opentags has no effect +# local($_) = @_; &declared_env('flushright', $_) } sub do_cmd_underline { &styled_text_chunk('U','','text','decoration','underline','',@_)} diff -Naur latex2html-2021.orig/versions/html4_0.pl latex2html-2021/versions/html4_0.pl --- latex2html-2021.orig/versions/html4_0.pl 2021-01-01 22:10:57.000000000 +0700 +++ latex2html-2021/versions/html4_0.pl 2021-02-04 23:36:27.370189453 +0700 @@ -43,15 +43,16 @@ sub do_env_raggedright { &declared_env('flushleft', @_) } sub do_env_raggedleft { &declared_env('flushright', @_) } -sub do_cmd_centering { - # MRO *opentags has no effect - local($_)= @_; &declared_env('center', $_) } -sub do_cmd_raggedright { - # MRO *opentags has no effect - local($_) = @_; &declared_env('flushleft', $_) } -sub do_cmd_raggedleftt { - # MRO *opentags has no effect - local($_) = @_; &declared_env('flushright', $_) } +# SGE: reimplemented via $declarations{$cmd} in &process_command +#sub do_cmd_centering { +# # MRO *opentags has no effect +# local($_)= @_; &declared_env('center', $_) } +#sub do_cmd_raggedright { +# # MRO *opentags has no effect +# local($_) = @_; &declared_env('flushleft', $_) } +#sub do_cmd_raggedleft { +# # MRO *opentags has no effect +# local($_) = @_; &declared_env('flushright', $_) } sub do_cmd_underline { &styled_text_chunk('U','','text','decoration','underline','',@_)} diff -Naur latex2html-2021.orig/versions/html5_0.pl latex2html-2021/versions/html5_0.pl --- latex2html-2021.orig/versions/html5_0.pl 2021-01-01 22:10:57.000000000 +0700 +++ latex2html-2021/versions/html5_0.pl 2021-02-04 23:37:29.980190686 +0700 @@ -16,7 +16,7 @@ $declarations{'tiny'} = ''; $declarations{'Tiny'} = ''; $declarations{'scriptsize'} = ''; -$declarations{'small'} = ''; +$declarations{'small'} = ''; $declarations{'Small'} = ''; $declarations{'SMALL'} = ''; $declarations{'footnotesize'} = ''; diff -Naur latex2html-2021.orig/versions/koi8.pl latex2html-2021/versions/koi8.pl --- latex2html-2021.orig/versions/koi8.pl 2021-01-01 22:10:57.000000000 +0700 +++ latex2html-2021/versions/koi8.pl 2021-01-10 23:19:41.000000000 +0700 @@ -431,6 +431,8 @@ $ref_title = " "; # $ref_title = ""; $bib_title = ""; + # $nom_title = " "; + $nom_title = ""; $abs_title = ""; $app_title = ""; $pre_title = ""; diff -Naur latex2html-2021.orig/versions/math.pl latex2html-2021/versions/math.pl --- latex2html-2021.orig/versions/math.pl 2021-01-01 22:10:57.000000000 +0700 +++ latex2html-2021/versions/math.pl 2021-02-04 23:36:27.370189453 +0700 @@ -1798,8 +1798,10 @@ $cmd = $&; print "."; print STDERR "$cmd" if ($VERBOSITY > 2); + local($dum1, $dum2) = ($cmd, ''); + $dum1 = $cmd unless ($dum1 = &normalize($dum1, $dum2)); local($mtmp, $ctmp, $wtmp) = - ("do_math_cmd_$cmd","do_cmd_$cmd", "wrap_cmd_$cmd"); + ("do_math_cmd_$dum1","do_cmd_$dum1", "wrap_cmd_$dum1"); if ($cmd =~/color/) { do { local($color_env,$inside_math) = ($color_env,1); diff -Naur latex2html-2021.orig/versions/utf8ru.pl latex2html-2021/versions/utf8ru.pl --- latex2html-2021.orig/versions/utf8ru.pl 2021-01-01 22:10:57.000000000 +0700 +++ latex2html-2021/versions/utf8ru.pl 2021-01-10 23:19:41.000000000 +0700 @@ -406,6 +406,8 @@ $ref_title = "Список литературы"; # $ref_title = "Ссылки"; $bib_title = "Литература"; +# $nom_title = "Список обозначений"; + $nom_title = "Обозначения"; $abs_title = "Аннотация"; $app_title = "Приложение"; $pre_title = "Предисловие";