From cd0e55b3d89d978d37e90b0b4d6a97d97760ca85 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 28 Aug 2013 18:15:48 -0400 Subject: v4 v5: odf:odt, footnotes, fix --- lib/sisu/v4/odf.rb | 8 ++++---- lib/sisu/v5/odf.rb | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v4/odf.rb b/lib/sisu/v4/odf.rb index acc44ab3..adaaea87 100644 --- a/lib/sisu/v4/odf.rb +++ b/lib/sisu/v4/odf.rb @@ -119,7 +119,6 @@ module SiSU_ODF begin pre @data=markup(@dal_array) - post publish ensure unless @md.opt.cmd =~/[MV]/ #check maintenance flag @@ -173,6 +172,7 @@ module SiSU_ODF SiSU_ODF_Format::Tags.new.set_bookmark_tag(dob) end def heading(dob,p_num) + dob=footnote(dob) m=/#{$1}/ breakpage='' if @md.fns \ @@ -351,6 +351,7 @@ module SiSU_ODF dob end def normal(dob,p_num) #P1 - P3 + dob=footnote(dob) dob.obj=dob.obj.gsub(/#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/, '\1'). #http ftp matches escaped, no decoration gsub(/#{Mx[:url_o]}([a-zA-Z0-9._-]+\@\S+?\.[a-zA-Z0-9._-]+)#{Mx[:url_c]}/, @@ -431,6 +432,7 @@ module SiSU_ODF dob.obj.split(/#{Mx[:br_line]}|#{Mx[:br_nl]}/).each_with_index do |parablock,i| set_ref=(i==0) ? "#{p_num[:set_ref]}#{set_bookmark_tag(dob)}" : '' parablock=group_clean(parablock) + parablock=footnote(parablock) parray << %{#{set_ref}#{parablock}} if parablock =~/\S+/ end dob.obj=parray.join \ @@ -506,6 +508,7 @@ module SiSU_ODF end def table(dob,p_num) # if dob.is ==:table + dob=footnote(dob) #check table=SiSU_ODF_Format::Table.new(@md,dob,p_num) dob=table.table end @@ -542,7 +545,6 @@ module SiSU_ODF #p_num=SiSU_ODF_Format::ParagraphNumber.new(dob.ocn).set_ref_and_display end end - dob=footnote(dob) if dob.is==:heading @@odf[:body] << heading(dob,p_num).obj << @br*2 if SiSU_Env::ProcessingSettings.new(md).build.toc? @@ -731,8 +733,6 @@ WOK x=x.gsub(/\n+/m,'') unless @md.opt.cmd=~/M/ @@odf[:head] << x end - def post - end def publish content=[] br_pg=' ' diff --git a/lib/sisu/v5/odf.rb b/lib/sisu/v5/odf.rb index 21243e6f..f52d98e1 100644 --- a/lib/sisu/v5/odf.rb +++ b/lib/sisu/v5/odf.rb @@ -119,7 +119,6 @@ module SiSU_ODF begin pre @data=markup(@dal_array) - post publish ensure unless @md.opt.cmd =~/[MV]/ #check maintenance flag @@ -173,6 +172,7 @@ module SiSU_ODF SiSU_ODF_Format::Tags.new.set_bookmark_tag(dob) end def heading(dob,p_num) + dob=footnote(dob) m=/#{$1}/ breakpage='' if @md.fns \ @@ -351,6 +351,7 @@ module SiSU_ODF dob end def normal(dob,p_num) #P1 - P3 + dob=footnote(dob) dob.obj=dob.obj.gsub(/#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/, '\1'). #http ftp matches escaped, no decoration gsub(/#{Mx[:url_o]}([a-zA-Z0-9._-]+\@\S+?\.[a-zA-Z0-9._-]+)#{Mx[:url_c]}/, @@ -431,6 +432,7 @@ module SiSU_ODF dob.obj.split(/#{Mx[:br_line]}|#{Mx[:br_nl]}/).each_with_index do |parablock,i| set_ref=(i==0) ? "#{p_num[:set_ref]}#{set_bookmark_tag(dob)}" : '' parablock=group_clean(parablock) + parablock=footnote(parablock) parray << %{#{set_ref}#{parablock}} if parablock =~/\S+/ end dob.obj=parray.join \ @@ -506,6 +508,7 @@ module SiSU_ODF end def table(dob,p_num) # if dob.is ==:table + dob=footnote(dob) #check table=SiSU_ODF_Format::Table.new(@md,dob,p_num) dob=table.table end @@ -542,7 +545,6 @@ module SiSU_ODF #p_num=SiSU_ODF_Format::ParagraphNumber.new(dob.ocn).set_ref_and_display end end - dob=footnote(dob) if dob.is==:heading @@odf[:body] << heading(dob,p_num).obj << @br*2 if SiSU_Env::ProcessingSettings.new(md).build.toc? @@ -731,8 +733,6 @@ WOK x=x.gsub(/\n+/m,'') unless @md.opt.cmd=~/M/ @@odf[:head] << x end - def post - end def publish content=[] br_pg=' ' -- cgit v1.2.3