[l2h] icons should obey -image-type
Hans Werner Strube
strube@physik3.gwdg.de
Thu, 11 Apr 2002 15:33:39 +0200 (MET DST)
> From strube Thu Apr 11 10:29:07 2002
...
> Well, then it might be reasonable to define two separate arrays
> %icons_gif and %icons_png in l2hconfig.pm and then, in latex2html after
> the "if ($INIT_FILE) {...}" block, assign one of them to %icons based on
> the actual $IMAGE_TYPE (possibly set by -image_type or in $INIT_FILE),
> provided %icons is still undefined.
(Of course I meant "hashes" instead of "arrays" and, in the subject line,
-image_type instead of -image_type.)
Here is my corresponding patch now, seems to work well and is hopefully
sufficiently general:
*** l2hconf.pin.ORI Tue Oct 12 07:15:03 1999
--- l2hconf.pin Thu Apr 11 15:03:30 2002
***************
*** 1031,1062 ****
### Icons ################################################################
# Icon names and real icon files.
!
! %icons = (
! 'cross_ref_visible_mark' ,"crossref.$IMAGE_TYPE",
'anchor_mark' , '', # ,' ',
'anchor_invisible_mark' , '', # ,' ',
! 'up_visible_mark' ,"up.$IMAGE_TYPE",
! 'next_visible_mark' ,"nx_grp.$IMAGE_TYPE",
! 'previous_visible_mark' ,"pv_grp.$IMAGE_TYPE",
! 'next_page_visible_mark' ,"next.$IMAGE_TYPE",
! 'previous_page_visible_mark' ,"prev.$IMAGE_TYPE",
! 'contents_visible_mark' ,"contents.$IMAGE_TYPE",
! 'index_visible_mark' ,"index.$IMAGE_TYPE",
! # 'image_visible_mark' ,"image.$IMAGE_TYPE",
! 'footnote_mark' ,"footnote.$IMAGE_TYPE",
! 'up_inactive_visible_mark' ,"up_g.$IMAGE_TYPE",
! 'next_inactive_visible_mark' ,"nx_grp_g.$IMAGE_TYPE",
! 'previous_inactive_visible_mark' ,"pv_grp_g.$IMAGE_TYPE",
! 'next_page_inactive_visible_mark' ,"next_g.$IMAGE_TYPE",
! 'previous_page_inactive_visible_mark' ,"prev_g.$IMAGE_TYPE",
! 'change_begin_visible_mark',"ch_begin.$IMAGE_TYPE",
! 'change_begin_right_visible_mark',"ch_beg_r.$IMAGE_TYPE",
! 'change_end_visible_mark',"ch_end.$IMAGE_TYPE",
! 'change_end_right_visible_mark',"ch_end_r.$IMAGE_TYPE",
! 'change_delete_visible_mark',"ch_delet.$IMAGE_TYPE",
! 'change_delete_right_visible_mark',"ch_del_r.$IMAGE_TYPE"
);
%iconsizes =
(
--- 1031,1063 ----
### Icons ################################################################
# Icon names and real icon files.
! for $typ (@IMAGE_TYPES) {
! %{"icons_${typ}"} = (
! 'cross_ref_visible_mark' ,"crossref.${typ}",
'anchor_mark' , '', # ,' ',
'anchor_invisible_mark' , '', # ,' ',
! 'up_visible_mark' ,"up.${typ}",
! 'next_visible_mark' ,"nx_grp.${typ}",
! 'previous_visible_mark' ,"pv_grp.${typ}",
! 'next_page_visible_mark' ,"next.${typ}",
! 'previous_page_visible_mark' ,"prev.${typ}",
! 'contents_visible_mark' ,"contents.${typ}",
! 'index_visible_mark' ,"index.${typ}",
! # 'image_visible_mark' ,"image.${typ}",
! 'footnote_mark' ,"footnote.${typ}",
! 'up_inactive_visible_mark' ,"up_g.${typ}",
! 'next_inactive_visible_mark' ,"nx_grp_g.${typ}",
! 'previous_inactive_visible_mark' ,"pv_grp_g.${typ}",
! 'next_page_inactive_visible_mark' ,"next_g.${typ}",
! 'previous_page_inactive_visible_mark' ,"prev_g.${typ}",
! 'change_begin_visible_mark',"ch_begin.${typ}",
! 'change_begin_right_visible_mark',"ch_beg_r.${typ}",
! 'change_end_visible_mark',"ch_end.${typ}",
! 'change_end_right_visible_mark',"ch_end_r.${typ}",
! 'change_delete_visible_mark',"ch_delet.${typ}",
! 'change_delete_right_visible_mark',"ch_del_r.${typ}"
);
+ }
%iconsizes =
(
*** latex2html.pin.ORI Sun Mar 31 07:15:01 2002
--- latex2html.pin Thu Apr 11 12:36:46 2002
***************
*** 429,434 ****
--- 429,439 ----
die "Error: Could not find file (-init_file): $INIT_FILE\n";
}
}
+
+ if ( ! %icons ) {
+ %icons = %{"icons_${IMAGE_TYPE}"};
+ }
+
foreach($EXTERNAL_UP_LINK, $EXTERNAL_DOWN_LINK, $EXTERNAL_PREV_LINK,
$EXTERNAL_INDEX, $EXTERNAL_BIBLIO, $EXTERNAL_CONTENTS) {
$_ ||= ''; # initialize