aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/ao_doc_objects.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-01-12 21:21:25 -0500
committerRalph Amissah <ralph@amissah.com>2014-01-12 21:21:25 -0500
commit81108043bb80beeb47214014b07993f0e2a48c9f (patch)
tree74a53542f66a88a466803dbeb22066b9aa5ba438 /lib/sisu/v5/ao_doc_objects.rb
parentv4 v5: texpdf, report to screen on pdf output, link to a generated file-size (diff)
v5: ao, counter for various grouped / blocked texts & tables
* of particular use for poems which are broken into verse
Diffstat (limited to 'lib/sisu/v5/ao_doc_objects.rb')
-rw-r--r--lib/sisu/v5/ao_doc_objects.rb20
1 files changed, 13 insertions, 7 deletions
diff --git a/lib/sisu/v5/ao_doc_objects.rb b/lib/sisu/v5/ao_doc_objects.rb
index 70696d37..e711a7d8 100644
--- a/lib/sisu/v5/ao_doc_objects.rb
+++ b/lib/sisu/v5/ao_doc_objects.rb
@@ -253,9 +253,10 @@ module SiSU_AO_DocumentStructure
ocn_= if h[:ocn_].nil? then ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
else h[:ocn_]
end
+ num= h[:num] || ((defined? o.num) ? o.num : nil)
digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
- @of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@number_,@note_,@ocn_,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,number_,note_,ocn_,digest,tmp
+ @of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@number_,@note_,@ocn_,@num,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,number_,note_,ocn_,num,digest,tmp
self
end
def block(h,o=nil)
@@ -272,9 +273,10 @@ module SiSU_AO_DocumentStructure
ocn_= if h[:ocn_].nil? then ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
else h[:ocn_]
end
+ num= h[:num] || ((defined? o.num) ? o.num : nil)
digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
- @of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,digest,tmp
+ @of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@num,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,num,digest,tmp
self
end
def group(h,o=nil)
@@ -291,9 +293,10 @@ module SiSU_AO_DocumentStructure
ocn_= if h[:ocn_].nil? then ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
else h[:ocn_]
end
+ num= h[:num] || ((defined? o.num) ? o.num : nil)
digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
- @of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,digest,tmp
+ @of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@num,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,num,digest,tmp
self
end
def alt(h,o=nil) #see block
@@ -310,9 +313,10 @@ module SiSU_AO_DocumentStructure
ocn_= if h[:ocn_].nil? then ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
else h[:ocn_]
end
+ num= h[:num] || ((defined? o.num) ? o.num : nil)
digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
- @of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,digest,tmp
+ @of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@num,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,num,digest,tmp
self
end
def verse(h,o=nil) #part of poem decide how you deal with this
@@ -328,9 +332,10 @@ module SiSU_AO_DocumentStructure
ocn_= if h[:ocn_].nil? then ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
else h[:ocn_]
end
+ num= h[:num] || ((defined? o.num) ? o.num : nil)
digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
- @of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,digest,tmp
+ @of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@num,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,num,digest,tmp
@h=nil
self
end
@@ -339,7 +344,7 @@ module SiSU_AO_DocumentStructure
attr_accessor :obj,:is,:of,:lv,:tags,:name,:idx,:indent,:hang,:size,:ocn,:number,:head_,:cols,:widths,:odv,:osp,:parent,:note_,:ocn_,:digest,:tmp
def initialize
@of=:block
- @is=@obj=@lv=@name=@idx=@indent=@hang=@size=@ocn,@number,@head_,@cols,@widths=@odv=@osp=@parent=@note_=@ocn_=@digest=@tmp=nil
+ @is=@obj=@lv=@name=@idx=@indent=@hang=@size=@ocn,@number,@head_,@cols,@widths=@odv=@osp=@parent=@note_=@ocn_=@num=@digest=@tmp=nil
@tags=[]
end
def table(h,o=nil)
@@ -359,9 +364,10 @@ module SiSU_AO_DocumentStructure
ocn_=if h[:ocn_].nil? then ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
else h[:ocn_]
end
+ num= h[:num] || ((defined? o.num) ? o.num : nil)
digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
- @of,@is,@tags,@cols,@widths,@obj,@idx,@ocn,@odv,@osp,@parent,@head_,@note_,@ocn_,@digest,@tmp=of,is,tags,cols,widths,obj,idx,ocn,odv,osp,parent,head_,note_,ocn_,digest,tmp
+ @of,@is,@tags,@cols,@widths,@obj,@idx,@ocn,@odv,@osp,@parent,@head_,@note_,@ocn_,@num,@digest,@tmp=of,is,tags,cols,widths,obj,idx,ocn,odv,osp,parent,head_,note_,ocn_,num,digest,tmp
self
end
end