From 6759751b4a94ee4866c6f150b0245a3da7e98370 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 14 Aug 2008 19:55:27 -0400 Subject: html format, consolidate html_format file, prune later; version number bumped version number bump: is necessary to re-initialize using new css for html presentation sisu -CC --- lib/sisu/v0/html.rb | 74 ++++++++++++++++++++++++++--------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'lib/sisu/v0/html.rb') diff --git a/lib/sisu/v0/html.rb b/lib/sisu/v0/html.rb index 5f0d0de9..e882627c 100644 --- a/lib/sisu/v0/html.rb +++ b/lib/sisu/v0/html.rb @@ -65,8 +65,8 @@ module SiSU_HTML require "#{SiSU_lib}/defaults" include SiSU_Viz require "#{SiSU_lib}/html_table" - require "#{SiSU_lib}/html_format_css" - include SiSU_HTML_Format_type + require "#{SiSU_lib}/html_format" + include SiSU_HTML_Format require "#{SiSU_lib}/html_segments" require "#{SiSU_lib}/html_scroll" include SiSU_HTML_seg @@ -190,7 +190,7 @@ module SiSU_HTML end def toc @links_guide_toc=[] - format_head_toc=SiSU_HTML_Format_type::Head_toc.new(@md) + format_head_toc=SiSU_HTML_Format::Head_toc.new(@md) guide_type='horzontal' #values: horizontal or vertical @links_guide_toc << format_head_toc.links_guide_open(guide_type) if defined? @md.lnk \ @@ -201,24 +201,24 @@ module SiSU_HTML else '_top' end s_lnk_url,s_lnk_lnk=l[:url],l[:say] - lev_para_ocn=SiSU_HTML_Format_type::Format_toc.new(@md,s_lnk_url,s_lnk_lnk,target) + lev_para_ocn=SiSU_HTML_Format::Format_toc.new(@md,s_lnk_url,s_lnk_lnk,target) @links_guide_toc << lev_para_ocn.links_guide if s_lnk_lnk end end end - format_head_toc=SiSU_HTML_Format_type::Head_toc.new(@md) + format_head_toc=SiSU_HTML_Format::Head_toc.new(@md) @links_guide_toc << format_head_toc.links_guide_close #(guide_type) @links_guide_toc end end class Endnotes - include SiSU_HTML_Format_type + include SiSU_HTML_Format def initialize(data,md) @data,@md=data,md end def scroll @scr_endnotes=[] - format_head_scroll=SiSU_HTML_Format_type::Head_scroll.new(@md) + format_head_scroll=SiSU_HTML_Format::Head_scroll.new(@md) @scr_endnotes << format_head_scroll.title_endnote @data.each do |para| pg=para.dup @@ -236,7 +236,7 @@ module SiSU_HTML endnote_array << pg.scan(/#{Mx[:en_b_o]}[\d+]+(.+?)#{Mx[:en_b_c]}/m) end endnote_array.flatten.each do |note| - format_scroll=SiSU_HTML_Format_type::Format_scroll.new(@md,note) + format_scroll=SiSU_HTML_Format::Format_scroll.new(@md,note) @scr_endnotes << format_scroll.endnote_body end end @@ -314,24 +314,24 @@ WOK end def level_doc_owner_details if @md.stmp =~/\w\w/ - format_head_scroll=SiSU_HTML_Format_type::Head_scroll.new(@md) + format_head_scroll=SiSU_HTML_Format::Head_scroll.new(@md) @@toc[:scr] << format_head_scroll.toc_owner_details end end def level_endnotes if @md.flag_endnotes - format_head_scroll=SiSU_HTML_Format_type::Head_scroll.new(@md) + format_head_scroll=SiSU_HTML_Format::Head_scroll.new(@md) @@toc[:scr] << format_head_scroll.toc_endnote end end def level_metadata - format_head_toc=SiSU_HTML_Format_type::Head_toc.new(@md) + format_head_toc=SiSU_HTML_Format::Head_toc.new(@md) @@toc[:scr] << format_head_toc.metadata @@toc[:seg] << format_head_toc.seg_metadata @@toc[:seg_mini] << format_head_toc.mini_seg_metadata end def level_word_index - format_head_toc=SiSU_HTML_Format_type::Head_toc.new(@d0c) + format_head_toc=SiSU_HTML_Format::Head_toc.new(@d0c) @@toc[:scr] << format_head_toc.concordance @@toc[:seg] << format_head_toc.concordance @@toc[:seg_mini] << format_head_toc.mini_concordance @@ -345,7 +345,7 @@ WOK linkname,link=$1.strip,$2 if $& if link \ and link !~/#/ #% keep eye on link - p_num=SiSU_HTML_Format_type::Paragraph_number.new(@md,link) + p_num=SiSU_HTML_Format::Paragraph_number.new(@md,link) end title=unless para =~/Document Information/; linkname else @@ -353,7 +353,7 @@ WOK %{#{linkname}} end toc={} - format_toc=SiSU_HTML_Format_type::Format_toc.new(@md,title) + format_toc=SiSU_HTML_Format::Format_toc.new(@md,title) toc[:seg]=if para =~/^#{Mx[:lv_o]}\d:meta^#{Mx[:lv_c]}\s*Document Information/ format_toc.lev0 else format_toc.lev1 @@ -376,7 +376,7 @@ WOK end %{#{linkname}} end - format_toc=SiSU_HTML_Format_type::Format_toc.new(@md,title) + format_toc=SiSU_HTML_Format::Format_toc.new(@md,title) toc[:scr]=if para =~/^#{Mx[:lv_o]}\d:meta^#{Mx[:lv_c]}\s*Document Information/ format_toc.lev0 else format_toc.lev1 @@ -392,9 +392,9 @@ WOK linkname,link=$1.strip,$2 if $& if link \ and link !~/#/ - p_num=SiSU_HTML_Format_type::Paragraph_number.new(@md,link) + p_num=SiSU_HTML_Format::Paragraph_number.new(@md,link) end - format_toc=SiSU_HTML_Format_type::Format_toc.new(@md,linkname) + format_toc=SiSU_HTML_Format::Format_toc.new(@md,linkname) toc={} toc[:seg]=format_toc.lev2 toc[:seg_mini]=format_toc.mini_lev2 @@ -404,7 +404,7 @@ WOK title=linkname else title=%{#{p_num.goto}#{linkname}} end - format_toc=SiSU_HTML_Format_type::Format_toc.new(@md,title) + format_toc=SiSU_HTML_Format::Format_toc.new(@md,title) toc[:scr]=format_toc.lev2 toc end @@ -416,9 +416,9 @@ WOK linkname,link=$1.strip,$2 if $& if link \ and link !~/#/ - p_num=SiSU_HTML_Format_type::Paragraph_number.new(@md,link) + p_num=SiSU_HTML_Format::Paragraph_number.new(@md,link) end - format_toc=SiSU_HTML_Format_type::Format_toc.new(@md,linkname) + format_toc=SiSU_HTML_Format::Format_toc.new(@md,linkname) toc={} toc[:seg]=format_toc.lev3 toc[:seg_mini]=format_toc.mini_lev3 @@ -428,7 +428,7 @@ WOK title=linkname else title=%{#{p_num.goto}#{linkname}} end - format_toc=SiSU_HTML_Format_type::Format_toc.new(@md,title) + format_toc=SiSU_HTML_Format::Format_toc.new(@md,title) toc[:scr]=format_toc.lev3 toc end @@ -439,7 +439,7 @@ WOK para.gsub!(@pat_strip_heading_name,'\1') para[@pat_heading] linkname,link=$1.strip,$2 if $& - p_num=SiSU_HTML_Format_type::Paragraph_number.new(@md,link) if link + p_num=SiSU_HTML_Format::Paragraph_number.new(@md,link) if link end para.gsub!(/#{Mx[:id_o]}~0;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/,'') if para =~/^#{Mx[:lv_o]}4:/ @@ -457,8 +457,8 @@ WOK %{\\1 \\2 \\3 }) end - p_num=SiSU_HTML_Format_type::Paragraph_number.new(@md,link) if link - format_toc=SiSU_HTML_Format_type::Format_toc.new(@md,seg_link) + p_num=SiSU_HTML_Format::Paragraph_number.new(@md,link) if link + format_toc=SiSU_HTML_Format::Format_toc.new(@md,seg_link) toc={} toc[:seg]=format_toc.lev4 toc[:seg_mini]=format_toc.mini_lev4 @@ -468,7 +468,7 @@ WOK title=linkname else title=%{#{p_num.goto}#{linkname}} if p_num end - format_toc=SiSU_HTML_Format_type::Format_toc.new(@md,title) + format_toc=SiSU_HTML_Format::Format_toc.new(@md,title) toc[:scr]=format_toc.lev4 toc end @@ -482,7 +482,7 @@ WOK linkname,link=$1.strip,$2 if $& if link \ and link !~/#/ - p_num=SiSU_HTML_Format_type::Paragraph_number.new(@md,link) + p_num=SiSU_HTML_Format::Paragraph_number.new(@md,link) end toc={} if para =~/#{Mx[:id_o]}~0;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ @@ -493,12 +493,12 @@ WOK lnk_n_txt=%{ #{linkname} } - format_toc=SiSU_HTML_Format_type::Format_toc.new(@md,lnk_n_txt) + format_toc=SiSU_HTML_Format::Format_toc.new(@md,lnk_n_txt) toc[:seg]=format_toc.lev5 toc[:seg_mini]=format_toc.mini_lev5 title=%{#{p_num.goto}#{linkname}} end - format_toc=SiSU_HTML_Format_type::Format_toc.new(@md,title) + format_toc=SiSU_HTML_Format::Format_toc.new(@md,title) toc[:scr]=format_toc.lev5 toc end @@ -511,7 +511,7 @@ WOK linkname,link=$1.strip,$2 if $& if link \ and link !~/#/ - p_num=SiSU_HTML_Format_type::Paragraph_number.new(@md,link) + p_num=SiSU_HTML_Format::Paragraph_number.new(@md,link) end toc={} if para =~/#{Mx[:id_o]}~0;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ @@ -522,12 +522,12 @@ WOK lnk_n_txt=%{ #{linkname} } - format_toc=SiSU_HTML_Format_type::Format_toc.new(@md,lnk_n_txt) + format_toc=SiSU_HTML_Format::Format_toc.new(@md,lnk_n_txt) toc[:seg]=format_toc.lev6 toc[:seg_mini]=format_toc.mini_lev6 title=%{#{p_num.goto}#{linkname}} end - format_toc=SiSU_HTML_Format_type::Format_toc.new(@md,title) + format_toc=SiSU_HTML_Format::Format_toc.new(@md,title) toc[:scr]=format_toc.lev6 toc end @@ -564,14 +564,14 @@ WOK toc_shared=[] @segtoc=[] SiSU_Screen::Ansi.new(@md.cmd,'Scroll & Segtoc').txt_grey unless @md.cmd =~/q/ - format_head_toc=SiSU_HTML_Format_type::Head_toc.new(@md) + format_head_toc=SiSU_HTML_Format::Head_toc.new(@md) dochead=format_head_toc.head dochead.gsub!(/toc\.(html)/,'doc.\1') #kludge ads=SiSU_HTML_promo::Ad.new(@md) toc_shared << dochead << ads.div.major @segtoc << format_head_toc.head << ads.div.major - toc_shared << format_head_toc.toc_head_escript if SiSU_HTML_Format_type::Head_toc.method_defined? :toc_head_escript - @segtoc << format_head_toc.toc_head_escript if SiSU_HTML_Format_type::Head_toc.method_defined? :toc_head_escript + toc_shared << format_head_toc.toc_head_escript if SiSU_HTML_Format::Head_toc.method_defined? :toc_head_escript + @segtoc << format_head_toc.toc_head_escript if SiSU_HTML_Format::Head_toc.method_defined? :toc_head_escript toc_shared << format_head_toc.scroll_head_navigation_band if @md.dc_rights rights=format_head_toc.rights @@ -588,20 +588,20 @@ WOK tmp_head=nil doc_title_endnote=@md.title.gsub(/(\*+)/,'\1') tmp_head=doc_title_endnote + "\n" - format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,tmp_head) + format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,tmp_head) toc_shared << format_txt_obj.center_bold @segtoc << format_txt_obj.center_bold if not @md.subtitle.nil? \ and not @md.subtitle.empty? tmp_head=@md.subtitle + "\n" - format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,tmp_head) + format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,tmp_head) toc_shared << format_txt_obj.center_bold @segtoc << format_txt_obj.center_bold end if @md.dc_creator creator_endnote=@md.dc_creator.gsub(/(\*+)/,%{ \\1}) tmp_head=creator_endnote + "\n" - format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,tmp_head) + format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,tmp_head) toc_shared << format_txt_obj.center_bold @segtoc << format_txt_obj.center_bold end -- cgit v1.2.3