diff options
| author | Ralph Amissah <ralph@amissah.com> | 2008-08-14 19:55:27 -0400 | 
|---|---|---|
| committer | Ralph Amissah <ralph@amissah.com> | 2008-08-14 19:55:27 -0400 | 
| commit | 6759751b4a94ee4866c6f150b0245a3da7e98370 (patch) | |
| tree | be76c817bca5ec3d221572d8923a3fa060bf1c91 | |
| parent | html, css and related markup, touch (diff) | |
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
| -rw-r--r-- | CHANGELOG | 13 | ||||
| -rw-r--r-- | conf/sisu/version.yml | 6 | ||||
| -rw-r--r-- | lib/sisu/v0/concordance.rb | 6 | ||||
| -rw-r--r-- | lib/sisu/v0/html.rb | 74 | ||||
| -rw-r--r-- | lib/sisu/v0/html_format.rb | 555 | ||||
| -rw-r--r-- | lib/sisu/v0/html_format_css.rb | 469 | ||||
| -rw-r--r-- | lib/sisu/v0/html_scroll.rb | 16 | ||||
| -rw-r--r-- | lib/sisu/v0/html_segments.rb | 44 | ||||
| -rw-r--r-- | lib/sisu/v0/shared_structure.rb | 6 | 
9 files changed, 576 insertions, 613 deletions
| @@ -9,15 +9,18 @@ Reverse Chronological:  %% STABLE MANIFEST -%% sisu_0.68.1.orig.tar.gz (2008-08-12:32/2) -http://www.jus.uio.no/sisu/pkg/src/sisu_0.68.1.orig.tar.gz -  sisu_0.68.1.orig.tar.gz -  sisu_0.68.1-1.dsc -  sisu_0.68.1-1.diff.gz +%% sisu_0.69.0.orig.tar.gz (2008-08-14:32/4) +http://www.jus.uio.no/sisu/pkg/src/sisu_0.69.0.orig.tar.gz +  sisu_0.69.0.orig.tar.gz +  sisu_0.69.0-1.dsc +  sisu_0.69.0-1.diff.gz    * middle layer, url representation    * html increased use of css, includes segmented html minitoc +    necessary to re-initialise sisu output directory with new css files +    [version number bump] +      sisu -CC  %% sisu_0.68.0.orig.tar.gz (2008-07-22:29/2)  http://www.jus.uio.no/sisu/pkg/src/sisu_0.68.0.orig.tar.gz diff --git a/conf/sisu/version.yml b/conf/sisu/version.yml index 26045409..7e7b8d10 100644 --- a/conf/sisu/version.yml +++ b/conf/sisu/version.yml @@ -1,5 +1,5 @@  ---  -:version: 0.68.1-beta -:date_stamp: 2008w32/2 -:date: "2008-08-12" +:version: 0.69.0-beta +:date_stamp: 2008w32/4 +:date: "2008-08-14"  :project: SiSU diff --git a/lib/sisu/v0/concordance.rb b/lib/sisu/v0/concordance.rb index f62b20ac..3e073900 100644 --- a/lib/sisu/v0/concordance.rb +++ b/lib/sisu/v0/concordance.rb @@ -66,7 +66,7 @@ module SiSU_Concordance    include SiSU_Env    require "#{SiSU_lib}/defaults"    include SiSU_Viz -  require "#{SiSU_lib}/html_format_css" +  require "#{SiSU_lib}/html_format"    include SiSU_HTML_Format    class Source      def initialize(opt) @@ -120,7 +120,7 @@ module SiSU_Concordance  WOK        end        def create -        head_banner=SiSU_HTML_Format_type::Head_toc.new(@md) +        head_banner=SiSU_HTML_Format::Head_toc.new(@md)          <<WOK  <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">  <html> @@ -171,7 +171,7 @@ WOK      class Words        require "#{SiSU_lib}/defaults"        include SiSU_Viz -      require "#{SiSU_lib}/html_format_css" +      require "#{SiSU_lib}/html_format"        include SiSU_HTML_Format        require "#{SiSU_lib}/sysenv"        include SiSU_Screen 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            %{<b><a href="#{@md.fnl[:pre]}#{link}#{@md.fnl[:mid]}#{@md.sfx}#{@md.fnl[:post]}">#{linkname}</a></b>}          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            %{<b><a href="##{link}">#{linkname}</a></b>}          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}</a>}          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}</a>}          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                %{<a href="#{@md.fnl[:pre]}\\2#{@md.fnl[:mid]}#{@md.sfx}#{@md.fnl[:post]}" } +                %{target="_top">\\1 \\2 \\3</a> })            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}</a>} 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=%{  <a href="#{@md.fnl[:pre]}#{@@seg_url}#{@md.fnl[:mid]}#{@md.sfx}#{@md.fnl[:post]}##{link}">      #{linkname}    </a>} -          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}</a>}          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=%{  <a href="#{@md.fnl[:pre]}#{@@seg_url}#{@md.fnl[:mid]}#{@md.sfx}#{@md.fnl[:post]}##{link}">      #{linkname}    </a>} -          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}</a>}          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(/(\*+)/,'<sup><a href="#endnotes">\1</a></sup>')          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(/(\*+)/,%{ <sup><a href="#notes">\\1</a></sup>})            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 diff --git a/lib/sisu/v0/html_format.rb b/lib/sisu/v0/html_format.rb index 8b6fc28a..87988ec1 100644 --- a/lib/sisu/v0/html_format.rb +++ b/lib/sisu/v0/html_format.rb @@ -55,7 +55,7 @@     <ralph@amissah.com>     <ralph.amissah@gmail.com> - ** Description: base formatting template for html generation + ** Description: html formating, css template  =end  module SiSU_HTML_Format @@ -98,7 +98,8 @@ module SiSU_HTML_Format    class Paragraph_id_ocn #used by table version #work area 2003w48      attr_accessor :paranum,:font,:p_num      def initialize(md,paranum) -      @paranum,@vz,@p_num=paranum,SiSU_Env::Get_init.instance.skin,SiSU_HTML_Format::Paragraph_number.new(md,paranum) #font +      @paranum,@vz,@p_num=paranum,SiSU_Env::Get_init.instance.skin,Paragraph_number.new(md,paranum) #font +      #@paranum,@vz,@p_num=paranum,SiSU_Env::Get_init.instance.skin,SiSU_HTML_Format::Paragraph_number.new(md,paranum) #font      end      def txt        %{  <p #{@p_num.id} align="justify">#{@p_num.name} @@ -140,7 +141,6 @@ module SiSU_HTML_Format    end    class Head_information      include SiSU_Viz -    include SiSU_HTML_Format      attr_reader :md,:sfx,:pdf,:rdf,:vz      def initialize(md='')        @md=md @@ -184,6 +184,10 @@ module SiSU_HTML_Format      #{@vz.txt_home}    </a></h1>}      end +    def html_close #moved +    %{</body> +</html>} +    end    end    class Widget < Head_information      def initialize(md) @@ -268,6 +272,8 @@ module SiSU_HTML_Format        end      end    end +  class XML +  end    class Head_toc < Head_information      def initialize(md)        super(md) @@ -397,16 +403,30 @@ WOK    <title>      #{@md.html_title}    </title> -  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> -  #{@rdf.rdftoc} -  #{@rdf.metatag_html} -  #{@vz.font_css_table_file} +<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> +#{@rdf.rdftoc} +#{@rdf.metatag_html} +#{@css.html}  </head>  #{@vz.color_body} -  <a name="top" id="top"></a> -  <a name="up" id="up"></a> -  <a name="start" id="start"></a> -  #{@vz.js_top}} +<a name="top" id="top"></a> +<a name="up" id="up"></a> +<a name="start" id="start"></a> +#{@vz.js_top}} +    end +    def concordance +      if @md.concord_make +      %{#{@vz.margin_css} +  <h4 class="toc"> +    <a href="./#{@md.fn[:concordance]}" #{@vz.js_concordance}> +      <i>Concordance</i> +    </a> +  </h4> +#{@vz.table_close}} +      else +      %{#{@vz.margin_css} +#{@vz.table_close}} +      end      end      def links_guide_vertical_open #???        url=(defined? @vz.url_hp) && @vz.url_hp =~/^http:\/\/\S+$/ ? @vz.url_hp : @vz.url_home @@ -539,15 +559,12 @@ WOK  #{@vz.table_close}}      end      def metadata -      %{#{@vz.margin_txt_3} -#{@vz.paragraph_font_small} -  <a href="#@metalink" #{@vz.js_metalink}> -    <i>MetaData</i> -    <font size="1" color="#777777"> -          -    </font> -  </a> -  </font> +      %{#{@vz.margin_css} +  <h4 class="toc"> +    <a href="#@metalink" #{@vz.js_metalink}> +      <i>MetaData</i> +    </a> +  </h4>  #{@vz.table_close}}      end      def seg_metadata @@ -602,48 +619,8 @@ WOK  <a name="credits"></a>}      end    end -  def html_close -    %{</body> -</html>} -  end -  class Head_scroll < Head_toc -    def initialize(md) -      super(md) -    end -    def toc_owner_details -      %{#{@vz.margin_txt_3} -#{@vz.paragraph_font_small} -  <a href="#owner.details"> -    Owner Details -    <font size="1" color="#777777"> -          -    </font> -  </a> -  </font> -#{@vz.table_close}} -    end -    def table -      %{<table summary="scroll table" width=#{@vz.table_width_1} border="0" bgcolor="white" cellpadding="0"> -<tr><th width=#{@@indent['level_1']} align="right"> -</th> -<td valign="top"> -#{@vz.paragraph_txt}} -    end -    def table1 -      %{<table summary="scroll table1" width=#{@vz.table_width_1} border="0" cellpadding=#{@vz.table_cellpad_box} #{@vz.color_color_table1} align="justify"> -<tr><td valign="top"> -#{@vz.paragraph_txt}} -    end -    def table2 -      %{<table summary="scroll table2" width=#{@vz.table_width_1} border="0" cellpadding=#{@vz.table_cellpad_box} #{@vz.color_color_table2} align="justify"> -<tr><td valign="top"> -#{@vz.paragraph_txt}} -    end -    def title_endnote -    end -  end    class Head_seg < Head_information -    def initialize(md) +    def initialize(md) #(md='')        super(md)      end      def head @@ -817,6 +794,21 @@ WOK  #{@vz.table_close}}      end      def title_endnote(title,subtitle,creator,table_top_control) +#      %{#{@vz.banner_instrument_cover_band_seg} +#  <h1 class="banner"> +#    #{title} +#  </h1> +#  <h1 class="subbanner"> +#   #{subtitle} +#  </h1> +#  <h1 class="subbanner"> +#    #{creator} +#  </h1> +#  <h4 class="banner"> +#    Endnotes +#  </h4> +##{@vz.table_close} +#<h1>Endnotes</h1>}      end      def navigation_table        %{<table summary="navigation segment table" width=#{@vz.table_width_1} border="0" bgcolor="white" cellpadding="0"> @@ -918,6 +910,135 @@ WOK  %{<p class="center" id="endnotes">  </p>} #revisit      end +    def head +      %{#{doc_type} +<head> +  <title> +    #{@seg_name_html[@seg_name_html_tracker]} - +    #{@md.html_title} +  </title> +<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> +#{@rdf.rdfseg} +#{@rdf.metatag_html} +#{@css.html} +</head> +#{@vz.color_body} +<a name="top" id="top"></a> +<a name="up" id="up"></a> +<a name="start" id="start"></a> +#{@vz.js_top}} +    end +    def toc_metadata +      @metalink=%{./#{@md.fn[:meatadata]}} +      toc_metadata +    end +    def title_banner(title,subtitle,creator) +      %{<p class="tiny"> +    #{title} +  </p> +  <p class="tiny"> +    #{subtitle} +  </p> +  <p class="tiny"> +    #{creator} +  </p> +  <p class="tiny"> +    copy @ +    <a href="#{@vz.url_home}"> +      #{@vz.txt_home} +    </a> +  </p>} +    end +  end +  class Head_scroll < Head_toc +    def initialize(md) #(md='') +      super(md) +    end +    def toc_owner_details +      %{#{@vz.margin_txt_3} +#{@vz.paragraph_font_small} +  <a href="#owner.details"> +    Owner Details +    <font size="1" color="#777777"> +          +    </font> +  </a> +  </font> +#{@vz.table_close}} +    end +    def table +      %{<table summary="scroll table" width=#{@vz.table_width_1} border="0" bgcolor="white" cellpadding="0"> +<tr><th width=#{@@indent['level_1']} align="right"> +</th> +<td valign="top"> +#{@vz.paragraph_txt}} +    end +    def table1 +      %{<table summary="scroll table1" width=#{@vz.table_width_1} border="0" cellpadding=#{@vz.table_cellpad_box} #{@vz.color_color_table1} align="justify"> +<tr><td valign="top"> +#{@vz.paragraph_txt}} +    end +    def table2 +      %{<table summary="scroll table2" width=#{@vz.table_width_1} border="0" cellpadding=#{@vz.table_cellpad_box} #{@vz.color_color_table2} align="justify"> +<tr><td valign="top"> +#{@vz.paragraph_txt}} +    end +##     def toc_endnote +##       %{#{@vz.margin_txt_3} +## #{@vz.paragraph_font_small} +##   <a href="#endnotes"> +##     Endnotes +##   </a> +## #{@vz.table_close}} +##     end +#    def toc_endnote +#      %{#{@vz.margin_css} +#  <h4 class="toc"> +#    <a href="#endnotes"> +#      Endnotes +#    </a> +#  </h4> +##{@vz.table_close}} +#    end +    def title_endnote +#      %{#{@vz.margin_txt_0} +#  #{@vz.paragraph_txt} +#  <a name="endnotes" id="endnotes"></a> +##{@vz.margin_num} +#    +##{@vz.table_close}} +    end +#    def tail +#      %{<br /> +##{@vz.margin_txt_0} +#<table summary="scroll tail" bgcolor="#777777"> +#<tr><td width="20%"> +##{@vz.banner_band} +#</td> +#<td width="60%"> +#<center>#@tocband_scroll</center> +#</td></tr> +#</table> +#<br /> +##{@vz.paragraph_txt} +#  <center> +#    #{@vz.credits_splash} +#    #{@vz.credits_sisu} +#  </center> +##{@vz.margin_num} +##{@vz.table_close} +#<a name="bottom id="finish"></a> +#<a name="down" id="down"></a> +#<a name="end" id="end"></a> +#<a name="finish" id="finish"></a> +#<a name="stop" id="stop"></a> +#<a name="credits" id="credits"></a> +#<font color="white" size="0"> +#  #{@md.title*10} +#</font> +#</body> +#</html>} +#    end    end    class Format_text_object      @vz=SiSU_Env::Get_init.instance.skin @@ -941,7 +1062,8 @@ WOK        #end        if txt[2]=~/\d+/          @paranum=txt[2][/(\d+)/m,1] # unless paranum =~/#/ -        @p_num=SiSU_HTML_Format::Paragraph_number.new(@md,@paranum) +        @p_num=Paragraph_number.new(@md,@paranum) +        #@p_num=SiSU_HTML_Format::Paragraph_number.new(@md,@paranum)          @para_id=Paragraph_id_ocn.new(@md,@paranum) #used by table version        end        @headname='' @@ -1048,7 +1170,314 @@ WOK        %{<p class="centerbold">#@one</p>\n}      end    end -  class XML +  class Format_scroll < Format_text_object +    def initialize(md='',*txt) +      super(md,*txt) +      @vz=SiSU_Env::Get_init.instance.skin +    end +    def endnote_body +      %{ +<div class="substance"> +  <label class="ocn"> </label> +  <p class="endnote"> +  #@one +  </p> +</div> +} +    end +    def header_normal +      %{ +<div class="substance"> +  #{@p_num.ocn_display} +  <#@tag class="#@class" #{@p_num.id}>#{@p_num.name} +    #@headname +    #@parablock +  </#@tag> +</div> +} +    end +    def heading_body +      @tag,@class='p','norm' +      header_normal +    end +    def heading_body1 +      @tag,@class='h1','norm' +      header_normal +    end +    def heading_body2 +      @tag,@class='h2','norm' +      header_normal +    end +    def heading_body3 +      @tag,@class='h3','norm' +      header_normal +    end +    def heading_body4 +      @tag,@class='h4','norm' +      header_normal +    end +    def heading_body5 +      @tag,@class='h5','norm' +      header_normal +    end +    def heading_body6 +      @tag,@class='h6','norm' +      header_normal +    end +  end +  class Format_seg < Format_text_object +    def initialize(md='',*txt) +      super(md,*txt) +    end +    def navigation_toc_lev1_advert +      %{#{@banner.home_button}\n +<center> +#@one +#@two +</a></center><p />} +    end +    def navigation_toc_lev1 +      %{#{@banner.nav_toc}} +    end +    def navigation_toc_lev2                                                      #change bold use css +      %{<p /> +<table summary="navigation segment level 2"> +<tr><td width ="20"> +</td> +<td> +  <font size="3" #{@vz.font_face}> +    <b>#@one</b> +  </font> +  </p> +#{@vz.table_close}} +    end +    def navigation_toc_lev3                                                      #change bold use css +      %{<p /> +<table summary="navigation segment level 3"> +<tr><td width ="20"> +</td> +<td> +  <font size="3" #{@vz.font_face}> +    <b>#@one</b> +  </font> +  </p> +#{@vz.table_close}} +    end +    def navigation_toc_lev4 +      %{<table summary="navigation segment level 4"> +<tr><td width ="80"> +</td> +<td> +<p> +  #@one +</p> +#{@vz.table_close}} +    end +    def navigation_toc_lev5 +    end +    def navigation_toc_lev6 +    end +    def endnote_body_seg_tail #FIX +      %{ +<div class="endnote"> +  <p class="endnote"> +    #@one +  </p> +</div> +} +    end +    def endnote_body_seg_tail_indent +      %{ +<div class="endnote"> +  <p class="endnote_indent"> +    #@one +  </p> +</div> +} +    end +    def endnote_seg_body(fn='')  #FIX                                                #url construction keep within single line... BUG WATCH 200408 +      fn='doc' if fn.empty? #you may wish to reconsider, sends to 'doc' where no segment info +      %{ +<div class="endnote"> +  <p class="endnote"> +    #@one#{@md.fnl[:pre]}#{fn}#{@md.fnl[:mid]}#{@md.sfx}#{@md.fnl[:post]}#@two#@three +  </p> +</div> +} +    end +    def title_header +      %{ +<div class="substance"> +  #@two +<#@tag class="#@class"> +    #@one +  </#@tag> +</div> +} +    end +    def title_header1 +      @tag,@class='h1','banner' +      title_header +    end +    def title_header2 +      @tag,@class='h2','banner' +      title_header +    end +    def title_header3 +      @tag,@class='h3','banner' +      title_header +    end +    def title_header4 +      %{ +<div class="substance"> +  <label class="ocn"> </label> +  <h4 class="banner"> +    #@one +  </h4> +</div> +} +    end +    def subtoc_lev +      one=if @one \ +      and @one =~/<\/?i>|<a\s+name="\S+?">/mi +        @one.gsub(/<\/?i>|<a\s+name="\S+?">/mi,'') #removes name markers from subtoc, go directly to substantive text +      else @one +      end +      note='' +      if one =~/((?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]}).+?(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})\s*)/m #this is a clumsy fix, revisit and address upstream +        note=$1 +        note.gsub!(/[\n\s]+/m,' ') +        one.gsub!(/(?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]}).+?(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})\s*/m,' ') +        one.gsub!(/<a[\n\s]+name="-\d+"[\n\s]+href="#_\d+"> <sup>\d+<\/sup> /m,'') +      end +      %{<#@tag class="#@class"> +    <a href="##@two"> +      <i>#{one}</i> +    </a> #{note} +  </#@tag>} +    end +    def subtoc_lev5 +      @tag,@class='h5','subtoc' +      subtoc_lev if @one +    end +    def subtoc_lev6 +      @tag,@class='h6','subtoc' +      subtoc_lev if @one +    end +    #% para sisu +    def header4 +      %{ +<div class="substance"> +#{@p_num.ocn_display} +  <h1 class="norm" #{@p_num.id}>#{@p_num.name} +    #@format +    #@parablock +  </h1> +</div> +} +    end +    def header_sub +      @parablock.gsub!(/(?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]}).+?(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})\s*/m,' ') +      %{ +<div class="substance"> +    #{@p_num.ocn_display} +  <#@tag class="#@class" #{@p_num.id}>#{@p_num.name} #{@headname} +    #{@parablock} +  </#@tag> +</div> +} +    end +    def header5 +      @tag,@class='p','bold' +      header_sub +    end +    def header6 +      @tag,@class='p','bold' +      header_sub +    end +    def navigation_header4 +      %{<table summary="navigation segment header 4" width=100% bgcolor="#08163f" border="0"> +<tr><td align="center"> +<p class="bold"> +  #@parablock +</p> +#{@vz.table_close}} +    end +    def navigation_header5 +      %{<p class="bold"> +  #@parablock +</p>} +    end +    def navigation_header6 +      %{<p class="bold"> +  #@parablock +</p>} +    end +    def navigation_center +      "<center>#@parablock</center>" +    end +  end +  class Format_toc < Format_text_object +    def initialize(md='',*txt) +      super(md,*txt) +    end +    def links_guide +      #@three distinguishes between _top and external, can be used e.g. for different colour scheme +      %{  <li class="doc"> +    <a href="#@link" target="_top"> +      #@linkname +    </a> +  </li> +} +    end +    def lev(tag,attrib) +  %{<#{tag} class="#{attrib}"> +    #@one +  </#{tag}> +} +    end +    def lev1 +      lev('h1','toc') +    end +    def lev2 +      lev('h2','toc') +    end +    def lev3 +      lev('h3','toc') +    end +    def lev4 +      lev('h4','toc') +    end +    def lev5 +      lev('h5','toc') +    end +    def lev6 +      lev('h6','toc') +    end +    def lev0 #docinfo +      lev('h0','toc') +    end +    def mini_lev1 +      lev('h1','minitoc') +    end +    def mini_lev2 +      lev('h2','minitoc') +    end +    def mini_lev3 +      lev('h3','minitoc') +    end +    def mini_lev4 +      lev('h4','minitoc') +    end +    def mini_lev5 +      lev('h5','minitoc') +    end +    def mini_lev6 +      lev('h6','minitoc') +    end +    def mini_lev0 #docinfo +      lev('h0','minitoc') +    end    end  end  __END__ diff --git a/lib/sisu/v0/html_format_css.rb b/lib/sisu/v0/html_format_css.rb deleted file mode 100644 index 1573d107..00000000 --- a/lib/sisu/v0/html_format_css.rb +++ /dev/null @@ -1,469 +0,0 @@ -# coding: utf-8 -=begin - - * Name: SiSU - - * Description: a framework for document structuring, publishing and search - - * Author: Ralph Amissah - - * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -   2007, 2008 Ralph Amissah All Rights Reserved. - - * License: GPL 3 or later: - -   SiSU, a framework for document structuring, publishing and search - -   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -   2007, 2008 Ralph Amissah - -   This program is free software: you can redistribute it and/or modify it -   under the terms of the GNU General Public License as published by the Free -   Software Foundation, either version 3 of the License, or (at your option) -   any later version. - -   This program is distributed in the hope that it will be useful, but WITHOUT -   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for -   more details. - -   You should have received a copy of the GNU General Public License along with -   this program. If not, see <http://www.gnu.org/licenses/>. - -   If you have Internet connection, the latest version of the GPL should be -   available at these locations: -   <http://www.fsf.org/licensing/licenses/gpl.html> -   <http://www.gnu.org/licenses/gpl.html> - -   <http://www.jus.uio.no/sisu/gpl.fsf/toc.html> -   <http://www.jus.uio.no/sisu/gpl.fsf/doc.html> -   <http://www.jus.uio.no/sisu/gpl.fsf/plain.txt> - - * SiSU uses: -   * Standard SiSU markup syntax, -   * Standard SiSU meta-markup syntax, and the -   * Standard SiSU object citation numbering and system - - * Hompages: -   <http://www.jus.uio.no/sisu> -   <http://www.sisudoc.org> - - * Download: -   <http://www.jus.uio.no/sisu/SiSU/download.html> - - * Ralph Amissah -   <ralph@amissah.com> -   <ralph.amissah@gmail.com> - - ** Description: html formating, css template - -=end -module SiSU_HTML_Format_type -  require "#{SiSU_lib}/html_format" -  include SiSU_Viz -  include SiSU_HTML_Format -  class Head_toc < SiSU_HTML_Format::Head_toc -    def initialize(md='') -      super(md) -    end -    def head -      %{#{doc_type} -<head> -  <title> -    #{@md.html_title} -  </title> -<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> -#{@rdf.rdftoc} -#{@rdf.metatag_html} -#{@css.html} -</head> -#{@vz.color_body} -<a name="top" id="top"></a> -<a name="up" id="up"></a> -<a name="start" id="start"></a> -#{@vz.js_top}} -    end -    def concordance -      if @md.concord_make -      %{#{@vz.margin_css} -  <h4 class="toc"> -    <a href="./#{@md.fn[:concordance]}" #{@vz.js_concordance}> -      <i>Concordance</i> -    </a> -  </h4> -#{@vz.table_close}} -      else -      %{#{@vz.margin_css} -#{@vz.table_close}} -      end -    end -    def metadata -      %{#{@vz.margin_css} -  <h4 class="toc"> -    <a href="#@metalink" #{@vz.js_metalink}> -      <i>MetaData</i> -    </a> -  </h4> -#{@vz.table_close}} -    end -  end -  class Head_seg < SiSU_HTML_Format::Head_seg -    def initialize(md='') -      super(md) -    end -    def head -      %{#{doc_type} -<head> -  <title> -    #{@seg_name_html[@seg_name_html_tracker]} - -    #{@md.html_title} -  </title> -<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> -#{@rdf.rdfseg} -#{@rdf.metatag_html} -#{@css.html} -</head> -#{@vz.color_body} -<a name="top" id="top"></a> -<a name="up" id="up"></a> -<a name="start" id="start"></a> -#{@vz.js_top}} -    end -    def toc_metadata -      @metalink=%{./#{@md.fn[:meatadata]}} -      toc_metadata -    end -    def title_banner(title,subtitle,creator) -      %{<p class="tiny"> -    #{title} -  </p> -  <p class="tiny"> -    #{subtitle} -  </p> -  <p class="tiny"> -    #{creator} -  </p> -  <p class="tiny"> -    copy @ -    <a href="#{@vz.url_home}"> -      #{@vz.txt_home} -    </a> -  </p>} -    end -  end -  class Head_scroll < SiSU_HTML_Format::Head_scroll -    def initialize(md='') -      super(md) -    end -  end -  class Format_scroll < SiSU_HTML_Format::Format_text_object -    def initialize(md='',*txt) -      super(md,*txt) -      @vz=SiSU_Env::Get_init.instance.skin -    end -    def endnote_body -      %{ -<div class="substance"> -  <label class="ocn"> </label> -  <p class="endnote"> -  #@one -  </p> -</div> -} -    end -    def header_normal -      %{ -<div class="substance"> -  #{@p_num.ocn_display} -  <#@tag class="#@class" #{@p_num.id}>#{@p_num.name} -    #@headname -    #@parablock -  </#@tag> -</div> -} -    end -    def heading_body -      @tag,@class='p','norm' -      header_normal -    end -    def heading_body1 -      @tag,@class='h1','norm' -      header_normal -    end -    def heading_body2 -      @tag,@class='h2','norm' -      header_normal -    end -    def heading_body3 -      @tag,@class='h3','norm' -      header_normal -    end -    def heading_body4 -      @tag,@class='h4','norm' -      header_normal -    end -    def heading_body5 -      @tag,@class='h5','norm' -      header_normal -    end -    def heading_body6 -      @tag,@class='h6','norm' -      header_normal -    end -  end -  class Format_seg < SiSU_HTML_Format::Format_text_object -    def initialize(md='',*txt) -      super(md,*txt) -    end -    def navigation_toc_lev1_advert -      %{#{@banner.home_button}\n -<center> -#@one -#@two -</a></center><p />} -    end -    def navigation_toc_lev1 -      %{#{@banner.nav_toc}} -    end -    def navigation_toc_lev2                                                      #change bold use css -      %{<p /> -<table summary="navigation segment level 2"> -<tr><td width ="20"> -</td> -<td> -  <font size="3" #{@vz.font_face}> -    <b>#@one</b> -  </font> -  </p> -#{@vz.table_close}} -    end -    def navigation_toc_lev3                                                      #change bold use css -      %{<p /> -<table summary="navigation segment level 3"> -<tr><td width ="20"> -</td> -<td> -  <font size="3" #{@vz.font_face}> -    <b>#@one</b> -  </font> -  </p> -#{@vz.table_close}} -    end -    def navigation_toc_lev4 -      %{<table summary="navigation segment level 4"> -<tr><td width ="80"> -</td> -<td> -<p> -  #@one -</p> -#{@vz.table_close}} -    end -    def navigation_toc_lev5 -    end -    def navigation_toc_lev6 -    end -    def endnote_body_seg_tail #FIX -      %{ -<div class="endnote"> -  <p class="endnote"> -    #@one -  </p> -</div> -} -    end -    def endnote_body_seg_tail_indent -      %{ -<div class="endnote"> -  <p class="endnote_indent"> -    #@one -  </p> -</div> -} -    end -    def endnote_seg_body(fn='')  #FIX                                                #url construction keep within single line... BUG WATCH 200408 -      fn='doc' if fn.empty? #you may wish to reconsider, sends to 'doc' where no segment info -      %{ -<div class="endnote"> -  <p class="endnote"> -    #@one#{@md.fnl[:pre]}#{fn}#{@md.fnl[:mid]}#{@md.sfx}#{@md.fnl[:post]}#@two#@three -  </p> -</div> -} -    end -    def title_header -      %{ -<div class="substance"> -  #@two -<#@tag class="#@class"> -    #@one -  </#@tag> -</div> -} -    end -    def title_header1 -      @tag,@class='h1','banner' -      title_header -    end -    def title_header2 -      @tag,@class='h2','banner' -      title_header -    end -    def title_header3 -      @tag,@class='h3','banner' -      title_header -    end -    def title_header4 -      %{ -<div class="substance"> -  <label class="ocn"> </label> -  <h4 class="banner"> -    #@one -  </h4> -</div> -} -    end -    def subtoc_lev -      one=if @one \ -      and @one =~/<\/?i>|<a\s+name="\S+?">/mi -        @one.gsub(/<\/?i>|<a\s+name="\S+?">/mi,'') #removes name markers from subtoc, go directly to substantive text -      else @one -      end -      note='' -      if one =~/((?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]}).+?(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})\s*)/m #this is a clumsy fix, revisit and address upstream -        note=$1 -        note.gsub!(/[\n\s]+/m,' ') -        one.gsub!(/(?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]}).+?(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})\s*/m,' ') -        one.gsub!(/<a[\n\s]+name="-\d+"[\n\s]+href="#_\d+"> <sup>\d+<\/sup> /m,'') -      end -      %{<#@tag class="#@class"> -    <a href="##@two"> -      <i>#{one}</i> -    </a> #{note} -  </#@tag>} -    end -    def subtoc_lev5 -      @tag,@class='h5','subtoc' -      subtoc_lev if @one -    end -    def subtoc_lev6 -      @tag,@class='h6','subtoc' -      subtoc_lev if @one -    end -    #% para sisu -    def header4 -      %{ -<div class="substance"> -#{@p_num.ocn_display} -  <h1 class="norm" #{@p_num.id}>#{@p_num.name} -    #@format -    #@parablock -  </h1> -</div> -} -    end -    def header_sub -      @parablock.gsub!(/(?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]}).+?(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})\s*/m,' ') -      %{ -<div class="substance"> -    #{@p_num.ocn_display} -  <#@tag class="#@class" #{@p_num.id}>#{@p_num.name} #{@headname} -    #{@parablock} -  </#@tag> -</div> -} -    end -    def header5 -      @tag,@class='p','bold' -      header_sub -    end -    def header6 -      @tag,@class='p','bold' -      header_sub -    end -    def navigation_header4 -      %{<table summary="navigation segment header 4" width=100% bgcolor="#08163f" border="0"> -<tr><td align="center"> -<p class="bold"> -  #@parablock -</p> -#{@vz.table_close}} -    end -    def navigation_header5 -      %{<p class="bold"> -  #@parablock -</p>} -    end -    def navigation_header6 -      %{<p class="bold"> -  #@parablock -</p>} -    end -    def navigation_center -      "<center>#@parablock</center>" -    end -  end -  class Format_toc < SiSU_HTML_Format::Format_text_object -    def initialize(md='',*txt) -      super(md,*txt) -    end -    def links_guide -      #@three distinguishes between _top and external, can be used e.g. for different colour scheme -      %{  <li class="doc"> -    <a href="#@link" target="_top"> -      #@linkname -    </a> -  </li> -} -    end -    def lev(tag,attrib) -  %{<#{tag} class="#{attrib}"> -    #@one -  </#{tag}> -} -    end -    def lev1 -      lev('h1','toc') -    end -    def lev2 -      lev('h2','toc') -    end -    def lev3 -      lev('h3','toc') -    end -    def lev4 -      lev('h4','toc') -    end -    def lev5 -      lev('h5','toc') -    end -    def lev6 -      lev('h6','toc') -    end -    def lev0 #docinfo -      lev('h0','toc') -    end -    def mini_lev1 -      lev('h1','minitoc') -    end -    def mini_lev2 -      lev('h2','minitoc') -    end -    def mini_lev3 -      lev('h3','minitoc') -    end -    def mini_lev4 -      lev('h4','minitoc') -    end -    def mini_lev5 -      lev('h5','minitoc') -    end -    def mini_lev6 -      lev('h6','minitoc') -    end -    def mini_lev0 #docinfo -      lev('h0','minitoc') -    end -  end -end -__END__ diff --git a/lib/sisu/v0/html_scroll.rb b/lib/sisu/v0/html_scroll.rb index 0bbac4fa..8b1e041c 100644 --- a/lib/sisu/v0/html_scroll.rb +++ b/lib/sisu/v0/html_scroll.rb @@ -102,12 +102,12 @@ module SiSU_HTML_scroll            end            if para =~/.+?#{Mx[:id_o]}~\d+;(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/              paranum=para[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/,1] -            @p_num=SiSU_HTML_Format_type::Paragraph_number.new(@md,paranum) +            @p_num=SiSU_HTML_Format::Paragraph_number.new(@md,paranum)            end            @sto=SiSU_HTML::Source::Split_text_object.new(@md,para).html_scroll            m=/#{Mx[:id_o]}~\d+;(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/            if para =~m -            format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,@sto.text) if @sto.format =~/i[1-9]|null/ #watch +            format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,@sto.text) if @sto.format =~/i[1-9]|null/ #watch              case @sto.format              when /^1:\S*?/; para=@sto.scroll_lev_para_ocn.heading_body1              when /^2:\S*?/; para=@sto.scroll_lev_para_ocn.heading_body2 @@ -138,20 +138,20 @@ module SiSU_HTML_scroll              end            elsif para =~/^#{Mx[:lv_o]}[1-9]:/ \            and para !~/#{Mx[:id_o]}~\d+;(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_c]}#@dp:#@dp#{Mx[:id_c]}$/ -            format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,para) +            format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,para)              para=format_txt_obj.bold_header            elsif para =~/Endnotes?/ \            and para !~/#{Mx[:id_o]}~\d+;(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ -            format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,'<br /><a name="notes">Note</a>') +            format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,'<br /><a name="notes">Note</a>')              para=format_txt_obj.bold_para            elsif para =~/Owner Details/ \            and para !~/#{Mx[:id_o]}~\d+;(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ -            format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,'<br /><a name="owner.details">Owner Details</a>') +            format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,'<br /><a name="owner.details">Owner Details</a>')              @scr[:owner_details]=format_txt_obj.bold_para              para=''            elsif para =~/(.*)#{Mx[:id_o]}~0;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}(.*)/ #watch              one,two=$1,$2 -            format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,one,two) +            format_seg=SiSU_HTML_Format::Format_seg.new(@md,one,two)              para=format_seg.no_paranum            end            if para =~/<a name="n\d+">/ \ @@ -160,7 +160,7 @@ module SiSU_HTML_scroll            end            if para =~/<:center>/ #rules changed now a <p class="center" problems may arise 2005w11 !              one,two=/(.*)<:center>(.*)/.match(para).captures -            format_scroll=SiSU_HTML_Format_type::Format_scroll.new(@md,one,two) +            format_scroll=SiSU_HTML_Format::Format_scroll.new(@md,one,two)            end            para.gsub!(/^#{Rx[:mx_fa_clean]}/,' '); para.gsub!(/^<:\S?>/,'')            para.gsub!(/#{Rx[:mx_fa_clean]}/,' '); para.gsub!(/<:\S?>/,' '); para.gsub!(/<!.+!>/,' ') @@ -174,7 +174,7 @@ module SiSU_HTML_scroll      end      def tails        scr_tail=[] -      format_head_scroll=SiSU_HTML_Format_type::Head_toc.new(@md) +      format_head_scroll=SiSU_HTML_Format::Head_toc.new(@md)        ads=SiSU_HTML_promo::Ad.new(@md)        scr_tail << format_head_scroll.scroll_tail << ads.div.close << ads.display << format_head_scroll.html_close        scr_tail diff --git a/lib/sisu/v0/html_segments.rb b/lib/sisu/v0/html_segments.rb index 5b7ede63..c3617b24 100644 --- a/lib/sisu/v0/html_segments.rb +++ b/lib/sisu/v0/html_segments.rb @@ -197,7 +197,7 @@ module SiSU_HTML_seg        data      end      def header_art(para) -      format_head_seg=SiSU_HTML_Format_type::Head_seg.new(@md) +      format_head_seg=SiSU_HTML_Format::Head_seg.new(@md)        if para =~/^#{Mx[:lv_o]}[1-6]:/ #2004w27/5          if @@tracker < @@seg_total-1; @@seg[:dot_nav]=format_head_seg.dot_control_pre_next          else                          @@seg[:dot_nav]=format_head_seg.dot_control_pre @@ -208,7 +208,7 @@ module SiSU_HTML_seg      end      def head(para)        clean=/<!.*?!>|#{Mx[:gr_o]}:.*?#{Mx[:gr_c]}|<:.*?>|#{Mx[:id_o]}~\d+;(?:[ohum]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ -      format_head_seg=SiSU_HTML_Format_type::Head_seg.new(@md) +      format_head_seg=SiSU_HTML_Format::Head_seg.new(@md)        if @@tracker < @@seg_total-1          if @@tracker == 0; @@segtocband=format_head_seg.toc_next2 #if format_head_seg.toc_next2          else               @@segtocband=format_head_seg.toc_pre_next2 #if format_head_seg.toc_pre_next2 @@ -220,13 +220,13 @@ module SiSU_HTML_seg          @dc_creator=%{<b>#{@md.dc_creator}</b>\n} if @md.dc_creator.to_s =~/\S/          @@seg[:tocband_banner] << format_head_seg.navigation_band(@@segtocband,@@seg[:dot_nav])          @@seg[:tocband_bannerless] << format_head_seg.navigation_band_bottom(@@segtocband,@@seg[:dot_nav]) -        @@seg[:headers] << format_head_seg.seg_head_escript if SiSU_HTML_Format_type::Head_seg.method_defined? :seg_head_escript #debug PHP move up in text #bug +        @@seg[:headers] << format_head_seg.seg_head_escript if SiSU_HTML_Format::Head_seg.method_defined? :seg_head_escript #debug PHP move up in text #bug          @@seg[:headers] << format_head_seg.title_banner(@md.title,@md.subtitle,@dc_creator).gsub(clean,'')          paranum=if @@header1[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/]; $1          else ''          end -        @p_num=SiSU_HTML_Format_type::Paragraph_number.new(@md,paranum) -        format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,@@header1,@p_num.ocn_display) +        @p_num=SiSU_HTML_Format::Paragraph_number.new(@md,paranum) +        format_seg=SiSU_HTML_Format::Format_seg.new(@md,@@header1,@p_num.ocn_display)          @@seg[:headers] << format_seg.title_header1.gsub(clean,'')          @@header1.gsub!(/ <a name="-[\d*+]+" href="#_[\d*+]+"> <sup>[\d*+]+<\/sup> <\/a>/,'')        end @@ -235,8 +235,8 @@ module SiSU_HTML_seg          paranum=if header2[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/]; $1          else ''          end -        @p_num=SiSU_HTML_Format_type::Paragraph_number.new(@md,paranum) -        format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,header2,@p_num.ocn_display) +        @p_num=SiSU_HTML_Format::Paragraph_number.new(@md,paranum) +        format_seg=SiSU_HTML_Format::Format_seg.new(@md,header2,@p_num.ocn_display)          @@seg[:headers] << format_seg.title_header2.gsub(clean,'')          @@header2.gsub!(/ <a name="-[\d*+]+" href="#_[\d*+]+"> <sup>[\d*+]+<\/sup> <\/a>/,'')        end @@ -245,8 +245,8 @@ module SiSU_HTML_seg          paranum=if header3[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/]; $1          else ''          end -        @p_num=SiSU_HTML_Format_type::Paragraph_number.new(@md,paranum) -        format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,header3,@p_num.ocn_display) +        @p_num=SiSU_HTML_Format::Paragraph_number.new(@md,paranum) +        format_seg=SiSU_HTML_Format::Format_seg.new(@md,header3,@p_num.ocn_display)          @@seg[:headers] << format_seg.title_header3.gsub(clean,'')          @@header3.gsub!(/ <a name="-[\d*+]+" href="#_[\d*+]+"> <sup>[\d*+]+<\/sup> <\/a>/,'')        end @@ -255,8 +255,8 @@ module SiSU_HTML_seg          paranum=if header4[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/]; $1          else ''          end -        @p_num=SiSU_HTML_Format_type::Paragraph_number.new(@md,paranum) -        format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,header4,@p_num.ocn_display) +        @p_num=SiSU_HTML_Format::Paragraph_number.new(@md,paranum) +        format_seg=SiSU_HTML_Format::Format_seg.new(@md,header4,@p_num.ocn_display)          @@seg[:headers] << format_seg.title_header4.gsub(clean,'')        end        @@seg[:header_endnotes]=format_head_seg.title_endnote(@md.title,@md.subtitle,@dc_creator,@@seg[:dot_nav]) @@ -264,12 +264,12 @@ module SiSU_HTML_seg      end      def markup(para)        @debug=[] -      format_head_seg=SiSU_HTML_Format_type::Head_seg.new(@md) +      format_head_seg=SiSU_HTML_Format::Head_seg.new(@md)        if para !~/^#{Rx[:meta]}/          m=para[/.+?#{Mx[:id_o]}~(\d+);(?:[ohm]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/]          if m            paranum=m[1].to_s -          @p_num=SiSU_HTML_Format_type::Paragraph_number.new(@md,paranum) +          @p_num=SiSU_HTML_Format::Paragraph_number.new(@md,paranum)          end          if para =~/#{Mx[:gr_o]}(?:code|alt|verse|group)#{Mx[:gr_c]}/m \          or @@flag_alt==true @@ -293,13 +293,13 @@ module SiSU_HTML_seg          if para !~/^#{Mx[:lv_o]}[1-9]:|#{Rx[:meta]}/            if para =~/(.*)#{Mx[:id_o]}~0;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}(.*)/              one,two=$1,$2 -            format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,one,two) +            format_seg=SiSU_HTML_Format::Format_seg.new(@md,one,two)              para=format_seg.no_paranum            end          end          if para[/#{Mx[:id_o]}~(\d+;(?:[ohmu]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp)#{Mx[:id_c]}$/]            @sto=SiSU_HTML::Source::Split_text_object.new(@md,para).html_seg -          format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,@sto.text) if @sto.format =~/i[1-9]|null/ #watch +          format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,@sto.text) if @sto.format =~/i[1-9]|null/ #watch            para=case @sto.format # work area 2003w29 ||@|def lev_segname_para_ocn|            when /^4:/; @sto.seg_lev_para_ocn.header4 # work on see Split_text_object            when /^5:/; @sto.seg_lev_para_ocn.header5 @@ -341,13 +341,13 @@ module SiSU_HTML_seg          if para !~/#{@vz.margin_txt_w1}|#{@vz.margin_txt_w2}/            if para[/(.*)#{Mx[:id_o]}~0;(?:u|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}(.*)/] #% watch u & m?              one,two=$1,$2 -            format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,one,two) +            format_seg=SiSU_HTML_Format::Format_seg.new(@md,one,two)  #FIX --> not that undefined, rather is not needed, should not be visited, and remove              #para=format_seg.seg_no_paranum                                   #% undefined            end            para.gsub!(/\s*(-\{{2}~\d+|<:e[:_]\d+>).*/,'')                   #potentially dagerous - removes all paragraphs with <!e_!> #?? workpoint            if para =~/<a name="_\d+" href="#-\d+"> <sup>/                #endnote- note- -            format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,para) +            format_seg=SiSU_HTML_Format::Format_seg.new(@md,para)              para=format_seg.no_paranum            end          end @@ -363,7 +363,7 @@ module SiSU_HTML_seg        end      end      def tail -      format_head_seg=SiSU_HTML_Format_type::Head_seg.new(@md) +      format_head_seg=SiSU_HTML_Format::Head_seg.new(@md)        if @md.flag_auto_endnotes          @@seg[:tail] << format_head_seg.endnote_mark          @@seg[:tail] << @@seg_endnotes[@@get_hash_fn] #endnotes deposited at end of individual segments ||@|EXTRACTION OF ENDNOTES| @@ -437,11 +437,11 @@ module SiSU_HTML_seg            case para # series changed 2002w42            when /^#{Mx[:lv_o]}5:\S*?#{Mx[:lv_c]}\s*(.+)?#{Mx[:id_o]}~(\d+);(?:h|[56]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ #remove [u]? req by pg texts, revist              one,two=$1,$2 -            format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,one,two) +            format_seg=SiSU_HTML_Format::Format_seg.new(@md,one,two)              para=format_seg.subtoc_lev5            when /^#{Mx[:lv_o]}6:\S*?#{Mx[:lv_c]}\s*(.+)?#{Mx[:id_o]}~(\d+);(?:h|[56]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/              one,two=$1,$2 -            format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,one,two) +            format_seg=SiSU_HTML_Format::Format_seg.new(@md,one,two)              para=format_seg.subtoc_lev6            end            @@seg_subtoc_array << para @@ -466,7 +466,7 @@ module SiSU_HTML_seg                e_n=note_match_seg[/(?:#{Mx[:en_a_o]}[\d*+]+|#{Mx[:en_b_o]}[*+]\d+)\s+(.+?)(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/m,1]                try=e_n.split(/<br \/>/)                try.each do |e| -                format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,e) +                format_seg=SiSU_HTML_Format::Format_seg.new(@md,e)                  note_match=if e =~/#{Mx[:pa_o]}i[1-9]#{Mx[:pa_c]}/                    format_seg.endnote_body_seg_tail_indent                  else format_seg.endnote_body_seg_tail @@ -478,7 +478,7 @@ module SiSU_HTML_seg                m=/(?:#{Mx[:en_a_o]}[\d*+]+|#{Mx[:en_b_o]}[*+]\d+)\s+(.+?href=")(#-[\d*+]+".+)(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/mi                one=note_match_seg[m,1] #note~ [a name]                two=note_match_seg[m,2] #note- -              format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,one,two) +              format_seg=SiSU_HTML_Format::Format_seg.new(@md,one,two)                note_match_all_seg=format_seg.endnote_seg_body(@@fn) #BUG WATCH 200408                @@seg[:endnote_all] << note_match_all_seg              end diff --git a/lib/sisu/v0/shared_structure.rb b/lib/sisu/v0/shared_structure.rb index 506b5097..5a3993c6 100644 --- a/lib/sisu/v0/shared_structure.rb +++ b/lib/sisu/v0/shared_structure.rb @@ -62,7 +62,7 @@  module SiSU_Structure    class Split_text_object      include SiSU_Viz -    #include SiSU_HTML_Format_type +    #include SiSU_HTML_Format      @@dp=nil      attr_reader :format,:text,:ocn,:scroll_lev_para_ocn,:seg_lev_para_ocn,:lev_para_ocn      def initialize(md,para) @@ -104,14 +104,14 @@ module SiSU_Structure      def html_seg        lev_segname_para_ocn        @seg_lev_para_ocn=if @para[/.+#{Mx[:id_o]}~\d+;(?:[ohmu]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/] -        SiSU_HTML_Format_type::Format_seg.new(@md,@format,@text,@ocn) +        SiSU_HTML_Format::Format_seg.new(@md,@format,@text,@ocn)        end        self      end      def html_scroll        lev_segname_para_ocn        @scroll_lev_para_ocn=if @para[/.+#{Mx[:id_o]}~\d+;(?:[ohmu]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/] -        SiSU_HTML_Format_type::Format_scroll.new(@md,@format,@text,@ocn) +        SiSU_HTML_Format::Format_scroll.new(@md,@format,@text,@ocn)        end        self      end | 
