aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--data/doc/sisu/CHANGELOG_v42
-rw-r--r--data/doc/sisu/CHANGELOG_v52
-rw-r--r--lib/sisu/v4/odf.rb8
-rw-r--r--lib/sisu/v5/odf.rb8
4 files changed, 12 insertions, 8 deletions
diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4
index 078bc2bb..c4d71251 100644
--- a/data/doc/sisu/CHANGELOG_v4
+++ b/data/doc/sisu/CHANGELOG_v4
@@ -39,6 +39,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.2.1.orig.tar.xz
* pdf (latex) tables, bugfix
+* odf:odt, footnotes, fix
+
%% 4.2.0.orig.tar.xz (2013-08-25:33/7)
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.2.0
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.2.0-1
diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5
index 650a7044..b4117ebd 100644
--- a/data/doc/sisu/CHANGELOG_v5
+++ b/data/doc/sisu/CHANGELOG_v5
@@ -39,6 +39,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.0.14.orig.tar.xz
* pdf (latex) tables, bugfix
+* odf:odt, footnotes, fix
+
%% 5.0.13.orig.tar.xz (2013-08-25:33/7)
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.0.13
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.0.13-1
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]}/,
'<text:a xlink:type="simple" xlink:href="\1">\1</text:a>'). #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 << %{<text:p text:style-name="P_group">#{set_ref}#{parablock}</text:p>} 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='<text:p text:style-name="P_normal_page_new"> </text:p>'
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]}/,
'<text:a xlink:type="simple" xlink:href="\1">\1</text:a>'). #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 << %{<text:p text:style-name="P_group">#{set_ref}#{parablock}</text:p>} 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='<text:p text:style-name="P_normal_page_new"> </text:p>'