aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v6/sysenv.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-02-05 00:48:39 -0500
committerRalph Amissah <ralph@amissah.com>2014-02-05 00:48:39 -0500
commit728ed46232abea87eb1f0d5fabd52dc710b1e922 (patch)
tree45fa0eea784f6c28b70f697eb6878ca4f6f7fc7a /lib/sisu/v6/sysenv.rb
parentv5 v6: options, html --strict instruction (diff)
v5 v6: options, ocn switch on/off instructions (& defaults for plaintext & odt)
Diffstat (limited to 'lib/sisu/v6/sysenv.rb')
-rw-r--r--lib/sisu/v6/sysenv.rb39
1 files changed, 39 insertions, 0 deletions
diff --git a/lib/sisu/v6/sysenv.rb b/lib/sisu/v6/sysenv.rb
index 10de1fdd..db1bdc91 100644
--- a/lib/sisu/v6/sysenv.rb
+++ b/lib/sisu/v6/sysenv.rb
@@ -3905,6 +3905,40 @@ WOK
true
end
end
+ def plaintext_ocn?
+ if cmd_rc_act[:txt_ocn][:set]==:on \
+ or cmd_rc_act[:ocn][:set]==:on
+ true
+ elsif cmd_rc_act[:txt_ocn][:set]==:off \
+ or cmd_rc_act[:ocn][:set]==:off
+ false
+ elsif doc_rc.is_a?(Method) \
+ and defined? doc_rc.ocn? \
+ and doc_rc.toc? ==:off
+ false
+ elsif env_rc.build.ocn? ==:off
+ false
+ else
+ false
+ end
+ end
+ def odt_ocn?
+ if cmd_rc_act[:odt_ocn][:set]==:on \
+ or cmd_rc_act[:ocn][:set]==:on
+ true
+ elsif cmd_rc_act[:odt_ocn][:set]==:off \
+ or cmd_rc_act[:ocn][:set]==:off
+ false
+ elsif doc_rc.is_a?(Method) \
+ and defined? doc_rc.ocn? \
+ and doc_rc.toc? ==:off
+ false
+ elsif env_rc.build.ocn? ==:off
+ false
+ else
+ false
+ end
+ end
def html_strict?
if cmd_rc_act[:html_strict][:set]==:on
true
@@ -4154,6 +4188,11 @@ WOK
end
self
end
+ def ocn_html_identifier
+ (build.html_strict?) \
+ ? Mx[:ocn_id_char]
+ : ''
+ end
def output_dir_structure
def by_language_code?
if cmd_rc_act[:output_by][:set] == :language