aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-09-26 15:59:49 +0100
committerRalph Amissah <ralph@amissah.com>2007-09-26 15:59:49 +0100
commit9f52af3dea138d68be8aca871e3ea7bea0a4998a (patch)
tree27d7665ec4cc3d26a718bb0b5ef72c3535554318
parentdal, make metaverse heading :A (represented internally as 1~) easily distingu... (diff)
segmented html fix for batch processing placement of heading :A-:C footnotes in first segment
-rw-r--r--lib/sisu/v0/html_segments.rb29
1 files changed, 18 insertions, 11 deletions
diff --git a/lib/sisu/v0/html_segments.rb b/lib/sisu/v0/html_segments.rb
index 7c97925e..fe2966df 100644
--- a/lib/sisu/v0/html_segments.rb
+++ b/lib/sisu/v0/html_segments.rb
@@ -70,6 +70,7 @@ module SiSU_HTML_seg
@@tablehead,@@number_of_cols=0,0
@@flag_group=false
@@dp,@@segtocband=nil,nil
+ @@fns_previous=''
attr_reader :seg_name_html,:seg_name_html_tracker
def initialize(data='',md='')
@data,@md=data,md
@@ -396,18 +397,24 @@ module SiSU_HTML_seg
@@seg_endnotes[@@fn]=[]
@@seg_endnotes[@@fn] << @@seg_endnotes_array
@@seg_endnotes_array=[] if para=~/^4~/
+ @@fns_previous=@md.fns if para=~/^1~meta/
end
- end
- if para =~/^4~/ #% EXTRACTION OF SUB-TOCs
- @@seg_subtoc[@@fn]=@@seg_subtoc_array
- @@seg_subtoc_array=[]
- end
- if para =~/^4~/ #% SEGMENT NAME, after EXTRACTION OF ENDNOTES & SUB-TOCs
- m=para[/^4~(\S+).+?<~(\d+);(?:[oh]|4:)\d+;\w\d+><#@dp:#@dp>$/]
- if m; @@fn,@@to_lev4=$1,$2 if m # changed 2004w07 #endnotes and sub-tocs
- else
- m=para[/^4~(\S+)/]
- @@fn,@@to_lev4=$1,'nonum' if m # changed 2005w13
+ if para =~/^4~/ #% EXTRACTION OF SUB-TOCs
+ @@seg_subtoc[@@fn]=@@seg_subtoc_array
+ @@seg_subtoc_array=[]
+ end
+ if para =~/^4~/ #% SEGMENT NAME, after EXTRACTION OF ENDNOTES & SUB-TOCs
+ if para !~/^4~metadata/
+ m=para[/^4~(\S+).+?<~(\d+);(?:[oh]|4:)\d+;\w\d+><#@dp:#@dp>$/]
+ end
+ if m; @@fn,@@to_lev4=$1,$2 if m # changed 2004w07 #endnotes and sub-tocs
+ else
+ if para !~/^4~metadata/
+ m=para[/^4~(\S+)/]
+ @@fn,@@to_lev4=$1,'nonum' if m # changed 2005w13
+ else @@fn=''
+ end
+ end
end
end
if para =~/^[56]~\S*\s+(.+)?<~(\d+);(?:h|[56]:)\d+;\w\d+><#@dp:#@dp>$/