aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/concordance.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v0/concordance.rb')
-rw-r--r--lib/sisu/v0/concordance.rb19
1 files changed, 12 insertions, 7 deletions
diff --git a/lib/sisu/v0/concordance.rb b/lib/sisu/v0/concordance.rb
index 8fe8c4ed..485f3df5 100644
--- a/lib/sisu/v0/concordance.rb
+++ b/lib/sisu/v0/concordance.rb
@@ -68,6 +68,7 @@ module SiSU_Concordance
include SiSU_Viz
require "#{SiSU_lib}/html_format"
include SiSU_HTML_Format
+ require "#{SiSU_lib}/html_minitoc"
class Source
def initialize(opt)
@opt=opt
@@ -105,22 +106,23 @@ module SiSU_Concordance
#revisit, both requires (html & shared_xml) needed for stand alone operation (sisu -w [filename])
require "#{SiSU_lib}/shared_xml"
require "#{SiSU_lib}/html"
- def initialize(lnk,env,md)
- @env,@md=env,md
+ def initialize(particulars)
+ @particulars,@md=particulars,particulars.md
+ @data=SiSU_HTML::Source::Html_environment.new(particulars).tuned_file_instructions
@vz=SiSU_Env::Get_init.instance.skin
- file_array=@env.read_source_file(@md.fns)
txt_path=%{#{@md.dir_out}}
SiSU_Env::Info_skin.new(@md).select
@md_title=@md.title
@fnb=@md.fnb
@lex_button=%{<a href="http://www.jus.uio.no/sisu/" target="_top"><img border="0" height="44" width="144" valign="center" src="../_sisu/image/sisu.png" alt="SiSU home --&gt;"></a>}
- @lnk=lnk
@doc_details =<<WOK
<table summary="links to text related to this rudimentary index" width="96%" border="0" bgcolor="white" cellpadding="0" align="center"><tr><td width="2%" align="right">&nbsp;</td><td width="94%" valign="top" align="justify"><h1 class="small"><a href="#{@md.fn[:toc]}" #{@vz.js_toc}><b>#{@md.dc_title}</b></a></h1><p class="bold">#{@md.dc_creator}</p></td></tr></table>
WOK
end
def create
head_banner=SiSU_HTML_Format::Head_toc.new(@md)
+minitoc=SiSU_HTML_minitoc::Toc_mini.new(@md,@data).songsheet
+toc='<div class="toc">' + minitoc.to_s + '</div>'
<<WOK
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
@@ -140,6 +142,8 @@ WOK
<body>
#{@vz.js_top}
#{head_banner.concordance_navigation_band('pdf')}
+ #{toc}
+<div class="content">
#@doc_details
<p>Word index links are to html versions of the text the segmented version followed by the scroll (single document) version.<br />[For segmented text references [T1], [T2] or [T3] appearing without a link, indicates that the word appears in a title (or subtitle) of the text (that is identifiable by the appended object citation number).]</p>
<p>(The word listing/index is Case sensitive: Capitalized words appear before lower case)</p>
@@ -148,7 +152,7 @@ WOK
[if number of occurences exceed number of references - word occurs more than once in at least one reference. Footnote/endnotes are either assigned to the paragraph from which they are referenced or ignored, so it is relevant to check the footnotes referenced from within a paragraph as well.]
</p>
<p>
- (After the page is fully loaded) you can jump directly to a word by appending a hash (#) and the word to the url for this text, (do not forget that words are case sensitive, and may be listed twice (starting with and without an upper case letter)), #your_word # [&nbsp;http://[web host]/#@fnb/concordance.html#your_word&nbsp;]
+ (After the page is fully loaded) you can jump directly to a word by appending a hash (#) and the word to the url for this text, (do not forget that words are case sensitive, and may be listed twice (starting with and without an upper case letter)), #your_word # [&nbsp;http://[web host]/#{@fnb}/concordance.html#your_word&nbsp;]
</p>
WOK
end
@@ -177,6 +181,7 @@ WOK
include SiSU_Screen
@@dp=nil
def initialize(particulars)
+ @particulars=particulars
begin
@vz=SiSU_Env::Get_init.instance.skin
@env,@md,@dal_array=particulars.env,particulars.md,particulars.dal_array
@@ -308,7 +313,7 @@ WOK
end
scr='<font size="1" color="#777777" face=times new roman><img border="0" height="15" width="15" src="../_sisu/image/b_doc.png" alt="Full Text">&nbsp;scroll:&nbsp;</font><font size="1" color="#222222" face=times new roman>doc#&nbsp;</font> '
seg=''
- @file_index_all << SiSU_Concordance::Source::Doc_title.new('toc',@env,@md).create
+ @file_index_all << SiSU_Concordance::Source::Doc_title.new(@particulars).create
for word in @freq.keys.sort! {|a,b| a.downcase<=>b.downcase}
keyword=SiSU_Concordance::Source::Word.new(word,@freq[word]).html
if keyword !~ @rxp_excluded0
@@ -321,7 +326,7 @@ WOK
# special cases endnotes and header levels 1 - 3
end
credits=@vz.credits_sisu
- @file_index_all << "#{credits}</body>\n</html>" # footer
+ @file_index_all << %{</div><div class="content">#{credits}<div></body>\n</html>} # footer
tell=SiSU_Screen::Ansi.new(@md.cmd,@md.fns,"#{@env.path.output_tell}/#{@md.fn[:concordance]}")
tell.flow if @md.cmd =~/[MV]/
end