From 6d898f1eb74160fbc7d6365b3ad8d6b9417d2f19 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 14 Feb 2012 21:32:53 -0500 Subject: v3dv: control hooks * hooks to make it possible to control (via: the command line; the document markup header, or; the command line) the likes of: toc, manifest, manifest-links, metadata, html-minitoc, html-navigation, html-navigation-bar; these are switched on by default and control takes the form of making it possible to switch them off. --- lib/sisu/v3dv/sysenv.rb | 221 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 221 insertions(+) (limited to 'lib/sisu/v3dv/sysenv.rb') diff --git a/lib/sisu/v3dv/sysenv.rb b/lib/sisu/v3dv/sysenv.rb index b305dfb7..fcfc234b 100644 --- a/lib/sisu/v3dv/sysenv.rb +++ b/lib/sisu/v3dv/sysenv.rb @@ -1199,6 +1199,129 @@ module SiSU_Env else false end end + def manifest_minitoc? + flag=if (defined? @rc['manifest']['minitoc'] \ + and not @rc['manifest']['minitoc'].nil?) + @rc['manifest']['minitoc'] + else false + end + end + def build + def omit_list + @off_list ||=if (defined? @rc['omit_list'] \ + and not @rc['omit_list'].nil?) + @rc['omit_list'] + elsif (defined? @rc['omit']['list'] \ + and not @rc['omit']['list'].nil?) + @rc['omit']['list'] + else + nil + end + end + def listed?(test) #fix + listed=if omit_list + x=(omit_list.scan(/\b#{test}\b/)).join + test==x \ + ? true \ + : false + else + false + end + listed + end + def ocn? + flag=if (defined? @rc['omit']['ocn'] \ + and not @rc['omit']['ocn'].nil?) \ + or listed?('ocn') + false + else + true + end + end + def toc? + flag=if (defined? @rc['omit']['toc'] \ + and not @rc['omit']['toc'].nil?) \ + or listed?('toc') + false + else + true + end + end + def manifest? + flag=if (defined? @rc['omit']['manifest'] \ + and not @rc['omit']['manifest'].nil?) \ + or listed?('manifest') + false + else + true + end + end + def manifest_links? + flag=if (defined? @rc['omit']['manifest_links'] \ + and not @rc['omit']['manifest_links'].nil?) \ + or listed?('manifest_links') + false + else + true + end + end + def manifest_minitoc? + flag=if (defined? @rc['omit']['manifest_minitoc'] \ + and not @rc['omit']['manifest_minitoc'].nil?) \ + or listed?('manifest_minitoc') + false + else + true + end + end + def html_minitoc? + flag=if (defined? @rc['omit']['html_minitoc'] \ + and not @rc['omit']['html_minitoc'].nil?) \ + or (listed?('html_minitoc') \ + || listed?('minitoc')) + false + else + true + end + end + def html_navigation? + flag=if (defined? @rc['omit']['html_navigation'] \ + and not @rc['omit']['html_navigation'].nil?) \ + or listed?('html_navigation') + false + else + true + end + end + def html_navigation_bar? + flag=if (defined? @rc['omit']['html_navigation_bar'] \ + and not @rc['omit']['html_navigation_bar'].nil?) \ + or listed?('html_navigation_bar') + false + else + true + end + end + def html_search_form? + flag=if (defined? @rc['omit']['html_search_form'] \ + and not @rc['omit']['html_search_form'].nil?) \ + or listed?('html_search_form') + false + else + true + end + end + def html_right_column? + flag=if (defined? @rc['omit']['html_right_column'] \ + and not @rc['omit']['html_right_column'].nil?) \ + or listed?('html_right_column') + false + else + true + end + end + self + end def odt_ocn? ((defined? @rc['odt']['ocn']) \ && @rc['odt']['ocn']==true) \ @@ -4826,6 +4949,104 @@ WOK self end end + class InfoSet #