diff options
author | Ralph Amissah <ralph@amissah.com> | 2012-03-12 18:45:04 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2012-03-12 18:45:07 -0400 |
commit | 756caa5d09492586824354864be6a5c9fe244005 (patch) | |
tree | 0eac01253f40ef786242092a5618adc724e013d4 /lib/sisu/v3dv/texpdf.rb | |
parent | v3dv: sysenv, param, options, output control hooks code modified (diff) |
v3dv: start using output control hooks
* for config file, document headers, & command line
* v3dv: sysenv, ProcessingSettings, start to use hooks to make it possible
to control (via: the command line; the document markup header, or; the
configuration file) the likes of: ocn, toc, segsubtoc, minitoc,
links-to-manifest, search-form, html-navigation, html-navigation-bar,
html-right-pane, html-top-band; these are switched on by default and may
be switched off in omit lists within configuration file, the document
markup header, or command line. The command line takes precedence & may
switch on or off overriding settings within the document markup header or
the sisu configuration file.
* --inc- on by default, but if switched off in doc header or
configuration, the command line --inc- has precedence; for each possible
exclude configuration the --inc- switch that overrides configuration
settings
* --exc- == --no-; exclude/switch off feature (but --inc- include has
precedence)
* document header @build: :omit: [list output features to be omitted]
* configuration (sisurc.yml) omit:
exclude output feature, overrides configuration settings (omit --dev
development branch modifier once merged back to main)
--exc-ocn, html (seg, scroll), epub, xml, pdf
sisu --dev --exc-ocn --html --epub --xml-sax --xml-dom --xhtml -v \
filename.sst
--exc-toc, html (scroll), epub, pdf
sisu --dev --exc-toc --html --epub --pdf -v filename.sst
--exc-segsubtoc html (seg), epub
sisu --dev --exc-segsubtoc --html --epub -v filename.sst
--exc-minitoc, html (seg), concordance, manifest
sisu --dev --exc-minitoc --html --concordance -v filename.sst
--exc-manifest-minitoc, manifest
sisu --dev --exc-manifest-minitoc --html -v filename.sst
--exc-links_to_manifest, --exc-manifest-links,
html (seg, scroll)
sisu --dev --exc-manifest-links --html -v filename.sst
--exc-search-form, html (seg, scroll), manifest
sisu --dev --exc-search-form --html -v filename.sst
--exc-html-minitoc, html (seg), concordance
sisu --dev --exc-html-minitoc --html --concordance -v filename.sst
--exc-html-navigation, html (seg, scroll)?
sisu --dev --exc-html-navigation --html -v filename.sst
--exc-html-navigation-bar, html (seg)
sisu --dev --exc-html-navigation-bar --html -v filename.sst
--exc-html-search-form, html (seg, scroll)
sisu --dev --exc-html-search-form --html -v filename.sst
--exc-html-right-pane, html (seg, scroll)
sisu --dev --exc-html-right-pane --html -v filename.sst
--exc-html-top-band, html (seg, scroll), concordance (minitoc is
forced on to provide seg navigation)
sisu --dev --exc-html-top-band --html --concordance -v filename.sst
Diffstat (limited to 'lib/sisu/v3dv/texpdf.rb')
-rw-r--r-- | lib/sisu/v3dv/texpdf.rb | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/lib/sisu/v3dv/texpdf.rb b/lib/sisu/v3dv/texpdf.rb index c69f7b9c..f0fb6b99 100644 --- a/lib/sisu/v3dv/texpdf.rb +++ b/lib/sisu/v3dv/texpdf.rb @@ -285,16 +285,11 @@ module SiSU_TeX @vz=SiSU_Env::GetInit.instance.skin @dp=@@dp ||=SiSU_Env::InfoEnv.new.digest.pattern @brace_url=SiSU_Viz::Skin.new.url_decoration - vz=SiSU_Env::GetInit.instance.skin l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language @language=l[:n] @translate=SiSU_Translate::Source.new(@md,@language) - @skin_no_ocn=if defined? vz.ocn_display_off \ - and vz.ocn_display_off==true - true - else false - end @codeblock_box='listings' #alternative 'boites' + @make ||=SiSU_Env::ProcessingSettings.new(@md) end def songsheet begin @@ -324,12 +319,6 @@ module SiSU_TeX if @md.flag_tables #WORK ON 2009 data=tables(data) #uncomment to start experimenting with tables end - ocn=if @md.markup.inspect =~/no_ocn/ \ - or @md.opt.mod.inspect =~/--no-ocn/ \ - or @skin_no_ocn - false - else true - end data=number_paras(data) data=markup(data) output(data) @@ -741,12 +730,20 @@ WOK @tex_file << @@prefix_b if defined? @md.creator.prefix_b and @md.creator.prefix_b end x={} - x[:l] =<<WOK -#{@tex_ml.newpage('landscape')} -\\pagestyle{fancy} + if (@make.build.toc?) + toc=<<WOK \\renewcommand{\\contentsname}{#{@translate.contents}} \\tableofcontents +WOK + toc_pb={ l: @tex_ml.newpage('landscape'), p: @tex_ml.newpage('portrait') } + else + toc='' + toc_pb={ l: '', p: '' } + end + x[:l] =<<WOK #{@tex_ml.newpage('landscape')} +\\pagestyle{fancy} +#{toc}#{toc_pb[:l]} \\pagenumbering{arabic} #{@tex_ml.paraskip_normal} #{@tex_ml.newpage('landscape')} @@ -754,8 +751,7 @@ WOK x[:p] =<<WOK #{@tex_ml.newpage('portrait')} \\pagestyle{fancy} -\\renewcommand{\\contentsname}{#{@translate.contents}} -\\tableofcontents +#{toc}#{toc_pb[:p]} #{@tex_ml.newpage('portrait')} \\pagenumbering{arabic} #{@tex_ml.paraskip_normal} @@ -814,11 +810,7 @@ WOK if dob.of ==:para paranum=dob.ocn ? dob.ocn : '' paranum = '' if paranum.to_i==0 - paranumber_display=if @md.markup.inspect =~/no_ocn/ \ - or @md.opt.mod.inspect =~/--no-ocn/ \ - or not dob.ocn_ - '' - else + paranumber_display=if @make.build.ocn? tags='' #[keep] code that follows inserts "name tags" as hypertargets, currently using ocn (converting nametags to ocn) for internal linking, related code: |texpdf_format.rb|@|uses nametags directly| #if dob.tags.length > 0 # insert tags "hypertargets" @@ -827,6 +819,7 @@ WOK # end #end "\\begin{tiny}\\hspace{0mm}\\end{tiny}{\\marginpar{\\begin{tiny}\\hspace{0mm}\\hypertarget{#{dob.ocn}}{#{dob.ocn}}#{tags}\\end{tiny}}}" #ocn object citation numbering + else '' end dob.tmp = paranumber_display + dob.tmp end |