aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-08-21 21:34:41 +0100
committerRalph Amissah <ralph@amissah.com>2007-08-21 21:34:41 +0100
commit7ef4f9a39e2aeffd9731ac0b68caca4c1b8cf03f (patch)
treefda200da69959ea24f146937bfd9fee843f368c2 /lib
parent0.56.3 md5s (diff)
small fixes to manifest and html_scroll, and adjustment to html navigation band use in concordance and manifest
* manifest * use relative link by default * in absence of configured url_root (http://) use info on location on local filesystem (file://) * html outputs, navigation band/banner adjustment, in concordance and manifest * html scroll, fix to document information link in table of contents
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v0/concordance.rb19
-rw-r--r--lib/sisu/v0/dal.rb4
-rw-r--r--lib/sisu/v0/defaults.rb4
-rw-r--r--lib/sisu/v0/html.rb11
-rw-r--r--lib/sisu/v0/html_format.rb31
-rw-r--r--lib/sisu/v0/html_scroll.rb8
-rw-r--r--lib/sisu/v0/manifest.rb14
-rw-r--r--lib/sisu/v0/sysenv.rb3
8 files changed, 64 insertions, 30 deletions
diff --git a/lib/sisu/v0/concordance.rb b/lib/sisu/v0/concordance.rb
index 251d5b58..111741ab 100644
--- a/lib/sisu/v0/concordance.rb
+++ b/lib/sisu/v0/concordance.rb
@@ -101,6 +101,9 @@ module SiSU_Concordance
require "#{SiSU_lib}/param"
include SiSU_Param
include SiSU_Viz
+ #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,md)
@md=md
@vz=SiSU_Env::Get_init.instance.skin
@@ -113,10 +116,11 @@ module SiSU_Concordance
@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"><p align="justify"><font size="3" color="#000000" face="times new roman"><a href="#{@md.fn[:manifest]}" #{@vz.js_toc}><img border="0" height="12" width="12" src="../_sisu/image/b_info.png" alt="Manifest">&nbsp;<b>#{@md.dc_title}</b></a><br />&nbsp;&nbsp;&nbsp;&nbsp;#{@md.dc_creator}</font></p><p><font size="3" color="#000000" face="times new roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#{@md.fn[:toc]}" #{@vz.js_toc}><img border="0" height="15" width="15" src="../_sisu/image/b_toc.png" alt="TOC">&nbsp;TOC - table of contents for individual articles</a></font></p><p><font size="3" color="#000000" face="times new roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#{@md.fn[:doc]}" #{@vz.js_doc}><img border="0" height="15" width="15" src="../_sisu/image/b_doc.png" alt="Full Text">&nbsp;Full text (with indexed table of contents)</a></font></p><p><font size="3" color="#000000" face="times new roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#{@md.fn[:pdf_p]}" #{@vz.js_portrait}><img border="0" height="18" width="15" src="../_sisu/image/b_pdf.png" alt="PDF portrait">&nbsp;pdf version of the document (portrait)</a></font></p><p><font size="3" color="#000000" face="times new roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#{@md.fn[:pdf_l]}" #{@vz.js_landscape}><img border="0" height="15" width="18" src="../_sisu/image/b_pdf.png" alt="PDF landscape">&nbsp;pdf version of the document (landscape)</a></font></p> </td></tr></table><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>
+<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_type::Head_toc.new(@md)
<<WOK
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
@@ -135,15 +139,10 @@ WOK
</head>
<body>
#{@vz.js_top}
- <table summary="home button" width="100%" border="0" cellpadding="3" bgcolor= "#ffffff" align="center"><tr>
- <td align="left" valign="top" bgcolor="#ffffff" width="20%">
- #{@vz.banner_home_button_only}
- </td>
- <td width="80%" align="right">
- #{@env.widget_static.search_form}
- </td>
- </tr></table>
- #@doc_details<p>(The word listing/index is Case sensitive: Capitalized words appear before lower case)</p>
+ #{head_banner.concordance_navigation_band('pdf')}
+ #@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>
<p>
<b>word</b> (number of occurences)<br />linked references to word within document <br />
[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.]
diff --git a/lib/sisu/v0/dal.rb b/lib/sisu/v0/dal.rb
index a4e512f2..2e5075d4 100644
--- a/lib/sisu/v0/dal.rb
+++ b/lib/sisu/v0/dal.rb
@@ -818,9 +818,9 @@ module SiSU_DAL
ocnm=ocnd=ocnv=0
ocnm+=1
header0='<:pn>'
- header1="\n1~ Document Information <~0;0:0;m#{ocnm}>"
+ header1="\n1~ Document Information (metadata) <~0;0:0;m#{ocnm}>"
ocnm+=1
- header4="\n4~metadata MetaData <~0;m#{ocnm};m#{ocnm}>"
+ header4="\n4~metadata Metadata <~0;m#{ocnm};m#{ocnm}>"
ocnm+=1; ocnd+=1
head_no_dc="<~0;m#{ocnm};d#{ocnd}>"
ocnm+=1; ocnd+=1
diff --git a/lib/sisu/v0/defaults.rb b/lib/sisu/v0/defaults.rb
index 3d5a7c40..c46860c3 100644
--- a/lib/sisu/v0/defaults.rb
+++ b/lib/sisu/v0/defaults.rb
@@ -1380,9 +1380,7 @@ WOK
is released under
<a href="http://www.gnu.org/licenses/gpl.html">GPLv3</a>
or later,
- <a href="http://www.gnu.org/licenses/gpl.html">
- http://www.gnu.org/licenses/gpl.html
- </a>
+ #{url_decoration.xml_open}<a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a>#{url_decoration.xml_close}
</font></p>
</td><td valign="top" width="45%">
<p class="tiny_left"><font color="#666666" size="2">
diff --git a/lib/sisu/v0/html.rb b/lib/sisu/v0/html.rb
index 5bec99bc..0798e604 100644
--- a/lib/sisu/v0/html.rb
+++ b/lib/sisu/v0/html.rb
@@ -392,10 +392,15 @@ WOK
title=if para =~/(<~0;(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>)$/
m=/#{$1}/
para.gsub!(m,'')
- linkname
- else #if para =~/Document Information/
+ if para=~/^\d~\s+Document Information/
+ %{<b><a href="#docinfo">#{linkname}</a></b>}
+ else linkname
+ end
+ else
@@toc[:scr] << '<br />'
- link='docinfo'
+ link=if para =~/<~[1-9];([0-6]):\d+;\w\d+><#@dp:#@dp>$/; $1
+ else ''
+ end
%{<b><a href="##{link}">#{linkname}</a></b>}
end
format_toc=SiSU_HTML_Format_type::Format_toc.new(@md,title)
diff --git a/lib/sisu/v0/html_format.rb b/lib/sisu/v0/html_format.rb
index b78017fd..c568a509 100644
--- a/lib/sisu/v0/html_format.rb
+++ b/lib/sisu/v0/html_format.rb
@@ -280,6 +280,24 @@ WOK
#{@vz.table_close}
<p />}
end
+ def concordance_navigation_band(type='')
+ if type=~/pdf/
+ @tocband_concordance=make_concordance
+ end
+ %{<table summary="concordance navigation band" id="toc" width="100%" bgcolor=#{@vz.color_band1}>
+<tr>