diff options
author | Ralph Amissah <ralph@amissah.com> | 2007-07-13 01:58:26 +0100 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2007-07-13 01:58:26 +0100 |
commit | 546ea64f0ab03a52b1eb67cf216c8cc4c39d74c4 (patch) | |
tree | 5d1ca60f11cc40a4ba210ddd2a20eb5af078d531 | |
parent | various fixes: cgi search for, manifest, concordance, diakonos syntax highlgh... (diff) |
syntax hilighting (gedit), sisu rights and other info in outputs, cgi sample search improvements, see changelog
-rw-r--r-- | CHANGELOG | 14 | ||||
-rw-r--r-- | data/sisu/conf/syntax/sisu.lang | 52 | ||||
-rw-r--r-- | lib/sisu/v0/cgi_sql_common.rb | 298 | ||||
-rw-r--r-- | lib/sisu/v0/db_import.rb | 71 | ||||
-rw-r--r-- | lib/sisu/v0/defaults.rb | 53 | ||||
-rw-r--r-- | lib/sisu/v0/html_format.rb | 1 | ||||
-rw-r--r-- | lib/sisu/v0/html_segments.rb | 4 | ||||
-rw-r--r-- | lib/sisu/v0/shared_html_lite.rb | 27 | ||||
-rw-r--r-- | lib/sisu/v0/sysenv.rb | 3 | ||||
-rw-r--r-- | lib/sisu/v0/texpdf_format.rb | 12 |
10 files changed, 323 insertions, 212 deletions
@@ -23,15 +23,23 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.55.3.orig.tar.gz better * indentation levels reset - * cgi, generated sample search form, rearranged presentation, additional - links and result information provided + * cgi, generated sample search form + * presentation rearranged + * additional result information provided + * canned searches provided to show matched text or indexes in matched documents + * links to odf text + * new results defaults set + * better highlighting of matches + * footnotes and footnote references have links to the main text in which + they are found * manifest and concordance, output presentation title and author information more prominent * editor syntax highlighting (for SiSU), visited/improved - * kate, kwrite * diakonos + * gedit + * kate, kwrite %% sisu_0.55.2.orig.tar.gz (2007-07-07:27/6) http://www.jus.uio.no/sisu/pkg/src/sisu_0.55.2.orig.tar.gz diff --git a/data/sisu/conf/syntax/sisu.lang b/data/sisu/conf/syntax/sisu.lang index 4fcd9b68..b11766cb 100644 --- a/data/sisu/conf/syntax/sisu.lang +++ b/data/sisu/conf/syntax/sisu.lang @@ -17,7 +17,7 @@ or: </pattern-item> <pattern-item _name="Operators" style="Function"> - <regex>^(!_|_[12]|_[12]?\*)\s</regex> + <regex>^(!_|_[1-9]|_[1-9]?\*)\s</regex> </pattern-item> <syntax-item _name="Note Function" style="Function"> @@ -26,13 +26,43 @@ or: </syntax-item> <syntax-item _name="Bold Function" style="Function"> - <start-regex>[!*]\{</start-regex> - <end-regex>\}[!*]</end-regex> + <start-regex>[*]\{</start-regex> + <end-regex>\}[*]</end-regex> </syntax-item> - <syntax-item _name="FontFace Function" style="Function"> - <start-regex>[/_,^+-]\{</start-regex> - <end-regex>\}[/_,^+-]</end-regex> + <syntax-item _name="Exclaim Function" style="Function"> + <start-regex>!\{</start-regex> + <end-regex>\}!</end-regex> + </syntax-item> + + <syntax-item _name="Italics Function" style="Function"> + <start-regex>/\{</start-regex> + <end-regex>\}/</end-regex> + </syntax-item> + + <syntax-item _name="Underscore Function" style="Function"> + <start-regex>_\{</start-regex> + <end-regex>\}_</end-regex> + </syntax-item> + + <syntax-item _name="Supercript Function" style="Function"> + <start-regex>\^{</start-regex> + <end-regex>\}\^</end-regex> + </syntax-item> + + <syntax-item _name="Subscript Function" style="Function"> + <start-regex>,{</start-regex> + <end-regex>\},</end-regex> + </syntax-item> + + <syntax-item _name="Added Function" style="Function"> + <start-regex>[+]\{</start-regex> + <end-regex>\}[+]</end-regex> + </syntax-item> + + <syntax-item _name="Strikethrough Function" style="Function"> + <start-regex>[-]\{</start-regex> + <end-regex>\}[-]</end-regex> </syntax-item> <pattern-item _name="Bold Single" style="String"> @@ -40,11 +70,15 @@ or: </pattern-item> <pattern-item _name="Link" style="String"> - <regex>\{[^}]+\}(http:\/\/\S+|image)\s</regex> + <regex>\{[^}]+\}(https?:\/\/\S+|image)\s</regex> + </pattern-item> + + <pattern-item _name="Link Internal" style="String"> + <regex>\s\*~\S+</regex> </pattern-item> <pattern-item _name="Url" style="String"> - <regex>\bhttp:\/\/\S+</regex> + <regex>\bhttps?:\/\/\S+</regex> </pattern-item> <line-comment _name="Line Comment" style="Comment"> @@ -76,7 +110,7 @@ or: </pattern-item> <pattern-item _name="Line Break" style="Others 2" end-at-line-end = "TRUE"> - <regex><(\/\s*)?br></regex> + <regex><:?br></regex> </pattern-item> <pattern-item _name="Footnote Reference" style="Others" end-at-line-end = "TRUE"> diff --git a/lib/sisu/v0/cgi_sql_common.rb b/lib/sisu/v0/cgi_sql_common.rb index 762632dc..6239b6bf 100644 --- a/lib/sisu/v0/cgi_sql_common.rb +++ b/lib/sisu/v0/cgi_sql_common.rb @@ -174,7 +174,7 @@ module SiSU_CGI_sql <form action="#@base" id="Test Form" method="post"> <table cellpadding="2"> <tr><td valign=\"top\"> - <textarea id="find" name="find" type="text" rows="4" cols="30" maxlength="256">#@search_field</textarea> + <textarea id="find" name="find" type="text" rows="6" cols="40" maxlength="256">#@search_field</textarea> </td> <td valign=\"top\"> #@tip @@ -451,28 +451,31 @@ module SiSU_CGI_sql end self end - def sql_canned_search_url - can=sql_canned_search - page=(sql_offset.to_i + sql_limit.to_i)/sql_limit.to_i - case page.to_s - when /^1$/ - %{<hr /><br /><center> - pg. #{page.to_s} - <a href="#{can.next}"> ></a> - </center>} - when /^2$/ - %{<hr /><br /><center> - <a href="#{can.previous}">< </a> - pg. #{page.to_s} - <a href="#{can.next}"> ></a> - </center>} - else - %{<hr /><br /><center> - <a href="#{can.start}">|< </a> - <a href="#{can.previous}">< </a> - pg. #{page.to_s} - <a href="#{can.next}"> ></a> - </center>} + def sql_canned_search_url(ok) + if ok + can=sql_canned_search + page=(sql_offset.to_i + sql_limit.to_i)/sql_limit.to_i + case page.to_s + when /^1$/ + %{<hr /><br /><center> + pg. #{page.to_s} + <a href="#{can.next}"> ></a> + </center>} + when /^2$/ + %{<hr /><br /><center> + <a href="#{can.previous}">< </a> + pg. #{page.to_s} + <a href="#{can.next}"> ></a> + </center>} + else + %{<hr /><br /><center> + <a href="#{can.start}">|< </a> + <a href="#{can.previous}">< </a> + pg. #{page.to_s} + <a href="#{can.next}"> ></a> + </center>} + end + else '' end end WOK_SQL @@ -483,51 +486,7 @@ module SiSU_CGI_sql def tail <<-'WOK' <br /><hr /><br /> -<table summary="SiSU summary" bgcolor="#ffffff" cellpadding="4" border="0"> -<tr><td> - <!-- widget way better --> -<tr><td valign="top" width="10%"> - <p class="tiny_left"><font color="#666666" size="2"> - - <a href="http://www.gnu.org/licenses/gpl.html"> - <img border="0" src="#@image_src/gplv3_free_software.png" alt="GPLv3" width="127" height="51" /> - </a> - </font></p> -</td><td valign="top" width="45%"> - <p class="tiny_left"><font color="#666666" size="2"> - <b>SiSU</b> <sup>©</sup> Ralph Amissah - 1993, current 2007 - All Rights Reserved. - <br /> - <b>SiSU is released under - <a href="http://www.gnu.org/licenses/gpl.html">GPL v3</a> - or later</b> - <a href="http://www.gnu.org/licenses/gpl.html"> - http://www.gnu.org/licenses/gpl.html - </a> - </font></p> -</td><td valign="top" width="45%"> - <p class="tiny_left"><font color="#666666" size="2"> - Developed using - <a href="http://www.ruby-lang.org/en/"> - Ruby - </a> - on - <a href="http://www.debian.org/"> - Debian/Gnu/Linux - </a> - software infrastructure, - & with the usual GPL (or OSS) suspects. - <br /> - Better - "performance, reliability, scalability, security & total cost of ownership" - [not to mention flexibility & choice] - <br /> - Get With the Future - <a href="http://www.jus.uio.no/sisu/"> - Way Better! - </a> - </font></p> -</td></tr> +<table summary="SiSU summary" bgcolor="#ffffff" cellpadding="2" border="0"> <!-- widget sisu --> <tr><td valign="top" width="10%"> <p class="tiny_left"><font color="#666666" size="2"> @@ -540,9 +499,16 @@ module SiSU_CGI_sql <p class="tiny_left"><font color="#666666" size="2"> Generated by <a href="http://www.jus.uio.no/sisu" > - SiSU - </a> - #{v[:project]} #{v[:version]} #{v[:date]} (#{v[:date_stamp]}) + #{v[:project]}</a> #{v[:version]} #{v[:date]} (#{v[:date_stamp]}) + <br /> + <a href="http://www.jus.uio.no/sisu" > + <b>#{v[:project]}</b></a> <sup>©</sup> Ralph Amissah + 1993, current 2007. + All Rights Reserved. + <br /> + <a href="http://www.jus.uio.no/sisu" > + #{v[:project]}</a> + is software for document structuring, publishing and search, <br /> <a href="http://www.jus.uio.no/sisu" > www.jus.uio.no/sisu @@ -552,7 +518,6 @@ module SiSU_CGI_sql www.sisudoc.org </a> <br /> - <br /> <i>w3 since October 3 1993</i> <a href="mailto://ralph@amissah.com" > ralph@amissah.com @@ -560,7 +525,7 @@ module SiSU_CGI_sql </font></p> </td><td valign="top" width="45%"> <p class="tiny_left"><font color="#666666" size="2"> - Using: + #{v[:project]} using: <br />Standard SiSU markup syntax, <br />Standard SiSU meta-markup syntax, and the <br />Standard SiSU <u>object citation numbering</u> and system, (object/text positioning system) @@ -569,6 +534,44 @@ module SiSU_CGI_sql All Rights Reserved. </font></p> </td></tr> + <!-- widget way better --> +<tr><td valign="top" width="10%"> + <p class="tiny_left"><font color="#666666" size="2"> + <a href="http://www.gnu.org/licenses/gpl.html"> + <img border="0" src="#@image_src/gplv3_free_software.png" alt="GPLv3" width="127" height="51" /> + </a> + </font></p> +</td><td valign="top" width="45%"> + <p class="tiny_left"><font color="#666666" size="2"> + SiSU is released under + <a href="http://www.gnu.org/licenses/gpl.html">GPL v3</a> + or later, + <a href="http://www.gnu.org/licenses/gpl.html"> + http://www.gnu.org/licenses/gpl.html + </a> + </font></p> +</td><td valign="top" width="45%"> + <p class="tiny_left"><font color="#666666" size="2"> + #{v[:project]}, developed using + <a href="http://www.ruby-lang.org/en/"> + Ruby + </a> + on + <a href="http://www.debian.org/"> + Debian/Gnu/Linux + </a> + software infrastructure, + with the usual GPL (or OSS) suspects. + <br /> + Better - "performance, reliability, scalability, security & total cost of ownership" + [not to mention flexibility & choice] + <br /> + Get With the Future + <a href="http://www.jus.uio.no/sisu/"> + Way Better! + </a> + </font></p> +</td></tr> </table> <a name="bottom" id="bottom"></a><a name="down" id="down"></a><a name="end" id="end"></a><a name="finish" id="finish"></a><a name="stop" id="stop"></a><a name="credits" id="credits"></a> </body></html> @@ -658,6 +661,7 @@ module SiSU_CGI_sql "#@base?#{s1}#{key}#{ti}#{au}#{sj}#{dsc}#{pb}#{cntr}#{dt}#{ty}#{id}#{src}#{lang}#{rel}#{cov}#{cr}#{co}#{ab}#{dtc}#{dti}#{dtm}#{dta}#{dtv}#{fns}&db=#{cgi['db']}&view=#{cgi['view']}&a=1" else "#@base?#{s1}#{key}#{ti}#{au}#{sj}#{dsc}#{pb}#{cntr}#{dt}#{ty}#{id}#{src}#{lang}#{rel}#{cov}#{cr}#{co}#{ab}#{dtc}#{dti}#{dtm}#{dta}#{dtv}#{fns}&db=#{cgi['db']}&view=#{cgi['view']}" end + @canned_base_url="#@base?#{s1}&db=#{cgi['db']}" if checked_case=~/\S/ @search[:text][1]=%{documents.clean~'#{@search_for.text1}'} #s1 @search[:endnotes][1]=%{endnotes.clean~'#{@search_for.text1}'} #s1 @@ -767,75 +771,82 @@ module SiSU_CGI_sql ti=if c['subtitle'] =~/\S+/; "#{c['title']} - #{c['subtitle']}" else c['title'] end - title=%{<span style="background-color: #@color_heading"><a href="#@hosturl_files/#@stub/#{location}/toc#{lang}.html"><img border="0" width="15" height="18" src="#@image_src/b_toc.png" alt="toc html"> #{ti}</a></span> by #{c['creator']} <a href="#@hosturl_files/#@stub/#{location}/toc#{lang}.html"><img border="0" width="15" height="18" src="#@image_src/b_toc.png" alt="toc html"></a><a href="#@hosturl_files/#@stub/#{location}/portrait#{lang}.pdf"><img border="0" width="15" height="18" src="#@image_src/b_pdf.png" alt="pdf portrait"></a><a href="#@hosturl_files/#@stub/#{location}/landscape#{lang}.pdf"><img border="0" width="18" height="15" src="#@image_src/b_pdf.png" alt="pdf landscape"></a> <a href="#@hosturl_files/#@stub/#{location}/opendocument#{lang}.odt"><img border="0" width="15" height="15" src="#@image_src/b_odf.png" alt="odf"></a> <a href="#@hosturl_files/#@stub/#{location}/sisu_manifest#{lang}.html"><img border="0" width="15" height="15" src="#@image_src/b_info.png" alt="manifest"></a><br />} if file_suffix=~/s/ #hmm watch file_suffix - if @text_search_flag; title='<br /><hr>'+title - else title='<br />'+title - end - @counter_txt_doc+=1 - oldtid=c['tid'].to_i - else title='' + can_txt_srch=if cgi['view']=~/index/; %{<a href="#{@canned_base_url}&fns=#{c['filename']}&view=text"><img border="0" width="12" height="12" src="#@image_src/bullet_red.png" alt="red bullet"></a> } + else %{<a href="#{@canned_base_url}&fns=#{c['filename']}&view=index"><img border="0" width="12" height="12" src="#@image_src/bullet_red.png" alt="red bullet"></a> } end - if @text_search_flag - if cgi['view']=~/text/ #% txt body - text=if c['suffix'] !~/1/ #seg - if @search_for.text1 =~/\S+/ or q['s1'] =~/\S+/ #% only this branch is working !! - unescaped_search=if @search_for.text1 =~/\S+/; CGI.unescape(@search_for.text1) - elsif q['s1'] =~/\S+/; CGI.unescape(q['s1']) - else nil - end - @search_regx=if unescaped_search #check - search_regex=[] - build=unescaped_search.scan(/\S+/).each do |g| - if g.to_s =~/(AND|OR)/ - search_regex << '|' - else search_regex << %{#{g.to_s}} - end - end - search_regex=search_regex.join(' ') - search_regex=search_regex.gsub(/\s*\|\s*/,'|') - search_regex.to_s - else nil - end + title=%{<span style="background-color: #@color_heading"><a href="#@hosturl_files/#@stub/#{location}/toc#{lang}.html"><img border="0" width="15" height="18" src="#@image_src/b_toc.png" alt="toc html"> #{ti}</a></span> by #{c['creator']} #{can_txt_srch}<a href="#@hosturl_files/#@stub/#{location}/toc#{lang}.html"><img border="0" width="15" height="18" src="#@image_src/b_toc.png" alt="toc html"></a> <a href="#@hosturl_files/#@stub/#{location}/portrait#{lang}.pdf"><img border="0" width="15" height="18" src="#@image_src/b_pdf.png" alt="pdf portrait"></a> <a href="#@hosturl_files/#@stub/#{location}/landscape#{lang}.pdf"><img border="0" width="18" height="15" src="#@image_src/b_pdf.png" alt="pdf landscape"></a> <a href="#@hosturl_files/#@stub/#{location}/opendocument#{lang}.odt"><img border="0" width="15" height="15" src="#@image_src/b_odf.png" alt="odf"></a> <a href="#@hosturl_files/#@stub/#{location}/sisu_manifest#{lang}.html"><img border="0" width="15" height="15" src="#@image_src/b_info.png" alt="manifest"></a><br />} if file_suffix=~/s/ #hmm watch file_suffix + if @text_search_flag; title='<br /><hr>'+title + else title='<br />'+title + end + @counter_txt_doc+=1 + oldtid=c['tid'].to_i + else title='' + end + if @text_search_flag + if cgi['view']=~/text/ #% txt body + text=if c['suffix'] !~/1/ #seg + if @search_for.text1 =~/\S+/ or q['s1'] =~/\S+/ #% only this branch is working !! + unescaped_search=if @search_for.text1 =~/\S+/; CGI.unescape(@search_for.text1) + elsif q['s1'] =~/\S+/; CGI.unescape(q['s1']) else nil end - matched_para=if (@search_regx.to_s.class==String && @search_regx.to_s=~/\S\S+/) - matched=if c['body'] =~/<a href="https?:\/\//mi; c['body'] - else (c['body'].gsub(/(#@search_regx)/i,%{<span style="background-color: #@color_match">\\1</span>})) + @search_regx=if unescaped_search #check + search_regex=[] + build=unescaped_search.scan(/\S+/).each do |g| + if g.to_s =~/(AND|OR)/ + search_regex << '|' + else search_regex << %{#{g.to_s}} + end end - matched - else c['body'] + search_regex=search_regex.join(' ') + search_regex=search_regex.gsub(/\s*\|\s*/,'|') + Regexp.new(search_regex, Regexp::IGNORECASE) + else nil end - %{<hr><p><font size="2">ocn <b><a href="#@hosturl_files/#@stub/#{location}/#{c['seg']}#{lang}.html##{c['ocn']}">#{c['ocn']}</a></b>:</font></p>#{matched_para}} - elsif c['suffix'] =~/1/ #doc - %{#{title}<hr><p><font size="2">ocn #{c['ocn']}:#{c['body']}} - end - @counter_txt_ocn+=1 - output=if c['seg'] =~/\S+/; title+text - else text + else nil end - elsif cgi['view']=~/index/ #% idx body - if c['suffix'] !~/1/ #seg - index=%{<a href="#@hosturl_files/#@stub/#{location}/#{c['seg']}#{lang}.html##{c['ocn']}">#{c['ocn']}</a>, } if @text_search_flag - elsif c['suffix'] =~/1/ #doc - index=%{<a href="#@hosturl_files/#@stub/#{location}/doc#{lang}.html##{c['ocn']}">#{c['ocn']}</a>, } + matched_para=if (@search_regx.to_s.class==String && @search_regx.to_s=~/\S\S+/) + matched=c['body'].gsub(/(<a\s+href="https?:\/\/[^><\s]+#{@search_regx}[^>]+?>|#@search_regx)/mi,%{<span style="background-color: #@color_match">\\1</span>}) + else c['body'] end - if c['seg'] =~/\S+/ - if @text_search_flag - @counter_txt_ocn+=1 - output=title+index - end - else + %{<hr><p><font size="2">ocn <b><a href="#@hosturl_files/#@stub/#{location}/#{c['seg']}#{lang}.html##{c['ocn']}">#{c['ocn']}</a></b>:</font></p>#{matched_para}} + elsif c['suffix'] =~/1/ #doc + %{#{title}<hr><p><font size="2">ocn #{c['ocn']}:#{c['body']}} + end + @counter_txt_ocn+=1 + output=if c['seg'] =~/\S+/; title+text + else text + end + elsif cgi['view']=~/index/ #% idx body + if c['suffix'] !~/1/ #seg + index=%{<a href="#@hosturl_files/#@stub/#{location}/#{c['seg']}#{lang}.html##{c['ocn']}">#{c['ocn']}</a>, } if @text_search_flag + elsif c['suffix'] =~/1/ #doc + index=%{<a href="#@hosturl_files/#@stub/#{location}/doc#{lang}.html##{c['ocn']}">#{c['ocn']}</a>, } + end + if c['seg'] =~/\S+/ + if @text_search_flag @counter_txt_ocn+=1 - output=unless c['suffix'] =~/1/; title+index - else %{#{title}#{c['ocn'].sort}, } - end + output=title+index + end + else + @counter_txt_ocn+=1 + output=unless c['suffix'] =~/1/; title+index + else %{#{title}#{c['ocn'].sort}, } end end - else output=title end + else output=title + end @counters_txt=if @counter_txt_doc > 0 if checked_stats =~/\S/ - %{<hr /><font size="2" color="#666666">Found in the main body of #@counter_txt_doc documents, and at #@counter_txt_ocn locations within.</font><br />} + @@lt_t=if @counter_txt_ocn == dbi_statement.sql_limit.to_i + over='over' + true + else + over='' + false + end + %{<hr /><font size="2" color="#666666">Found in the main body of #@counter_txt_doc documents, and at #{over} #@counter_txt_ocn locations within.</font><br />} else '' end else '' @@ -859,7 +870,10 @@ module SiSU_CGI_sql ti=if e['subtitle'] =~/\S+/; "#{e['title']} - #{e['subtitle']}" else e['title'] end - title=%{<br /><hr><span style="background-color: #@color_heading"><a href="#@hosturl_files/#@stub/#{location}/toc#{lang}.html"><img border="0" width="15" height="18" src="#@image_src/b_toc.png" alt="toc html"> #{ti}</a></span> by #{e['creator']} <a href="#@hosturl_files/#@stub/#{location}/toc#{lang}.html"><img border="0" width="15" height="18" src="#@image_src/b_toc.png" alt="toc html"></a> <a href="#@hosturl_files/#@stub/#{location}/portrait.pdf"><img border="0" width="15" height="18" src="#@image_src/b_pdf.png" alt="pdf portrait"></a><a href="#@hosturl_files/#@stub/#{location}/landscape.pdf"><img border="0" width="18" height="15" src="#@image_src/b_pdf.png" alt="pdf landscape"></a> <a href="#@hosturl_files/#@stub/#{location}/opendocument#{lang}.odt"><img border="0" width="15" height="15" src="#@image_src/b_odf.png" alt="odf"></a> <a href="#@hosturl_files/#@stub/#{location}/sisu_manifest#{lang}.html"><img border="0" width="15" height="15" src="#@image_src/b_info.png" alt="manifest"></a><br />} if file_suffix=~/s/ + can_txt_srch=if cgi['view']=~/index/; %{<a href="#{@canned_base_url}&fns=#{e['filename']}&view=text"><img border="0" width="12" height="12" src="#@image_src/bullet_red.png" alt="red bullet"></a> } + else %{<a href="#{@canned_base_url}&fns=#{e['filename']}&view=index"><img border="0" width="12" height="12" src="#@image_src/bullet_red.png" alt="red bullet"></a> } + end + title=%{<br /><hr><span style="background-color: #@color_heading"><a href="#@hosturl_files/#@stub/#{location}/toc#{lang}.html"><img border="0" width="15" height="18" src="#@image_src/b_toc.png" alt="toc html"> #{ti}</a></span> by #{e['creator']} #{can_txt_srch}<a href="#@hosturl_files/#@stub/#{location}/toc#{lang}.html"><img border="0" width="15" height="18" src="#@image_src/b_toc.png" alt="toc html"></a> <a href="#@hosturl_files/#@stub/#{location}/portrait.pdf"><img border="0" width="15" height="18" src="#@image_src/b_pdf.png" alt="pdf portrait"></a><a href="#@hosturl_files/#@stub/#{location}/landscape.pdf"><img border="0" width="18" height="15" src="#@image_src/b_pdf.png" alt="pdf landscape"></a> <a href="#@hosturl_files/#@stub/#{location}/opendocument#{lang}.odt"><img border="0" width="15" height="15" src="#@image_src/b_odf.png" alt="odf"></a> <a href="#@hosturl_files/#@stub/#{location}/sisu_manifest#{lang}.html"><img border="0" width="15" height="15" src="#@image_src/b_info.png" alt="manifest"></a><br />} if file_suffix=~/s/ @counter_endn_doc+=1 oldtid=e['metadata_tid'].to_i else title = '' @@ -867,21 +881,24 @@ module SiSU_CGI_sql if cgi['view']=~/text/ #% txt endnotes @counter_endn_ocn+=1 matched_endnote=if (@search_regx.to_s.class==String && @search_regx.to_s=~/\S\S+/) - matched=if e['body'] =~/<a href="https?:\/\//mi; e['body'] - else e['body'].gsub(/(#@search_regx)/i,%{<span style="background-color: #@color_match">\\1</span>}) - #e['body'] - end - matched + matched=e['body'].gsub(/(<a\s+href="https?:\/\/[^><\s]+#{@search_regx}[^>]+?>|#@search_regx)/mi,%{<span style="background-color: #@color_match">\\1</span>}) else e['body'] end - output=%{#{title}<hr><font size="2">note <b><a href="#@hosturl_files/#@stub/#{location}/endnotes.html##{e['nr']}">#{e['nr']}</a></b> referred to from ocn <a href="#@hosturl_files/#@stub/#{location}/doc.html##{e['ocn']}">#{e['ocn']}</a>:</font> #{matched_endnote}} + output=%{#{title}<hr><font size="2">note <b><a href="#@hosturl_files/#@stub/#{location}/endnotes.html#_#{e['nr']}">#{e['nr']}</a></b> referred to from ocn <a href="#@hosturl_files/#@stub/#{location}/doc.html##{e['ocn']}">#{e['ocn']}</a>:</font> #{matched_endnote}} elsif cgi['view']=~/index/ #% idx endnotes @counter_endn_ocn+=1 output=%{#{title}<a href="#@hosturl_files/#@stub/#{location}/endnotes.html#_#{e['nr']}">#{e['nr']}</a> [§ <a href="#@hosturl_files/#@stub/#{location}/doc.html##{e['ocn']}">#{e['ocn']}</a>], } end @counters_endn=if @counter_endn_doc > 0 if checked_stats =~/\S/ - %{<font size="2" color="#666666">Found in the endnotes of #@counter_endn_doc documents, and at #@counter_endn_ocn locations within.</font><br />} + @@lt_e=if @counter_endn_ocn == dbi_statement.sql_limit.to_i + over='over' + true + else + over='' + false + end + %{<font size="2" color="#666666">Found in the endnotes of #@counter_endn_doc documents, and at #{over} #@counter_endn_ocn locations within.</font><br />} else '' end end @@ -891,7 +908,12 @@ module SiSU_CGI_sql end offset=dbi_statement.sql_offset.to_s limit=dbi_statement.sql_limit.to_s - canned=dbi_statement.sql_canned_search_url.to_s + @@lt_t ||=false; @@lt_e ||=false + canned=if (@@lt_t or @@lt_e) + dbi_statement.sql_canned_search_url(true).to_s + else + dbi_statement.sql_canned_search_url(false).to_s + end limit=dbi_statement.sql_limit.to_s cgi.out{@header + @counters_txt + @counters_endn + @body_main.join + @endnotes.join + canned + @tail} #% print cgi_output_header+counters+body+endnotes end diff --git a/lib/sisu/v0/db_import.rb b/lib/sisu/v0/db_import.rb index 1148ab63..b9528063 100644 --- a/lib/sisu/v0/db_import.rb +++ b/lib/sisu/v0/db_import.rb @@ -63,6 +63,7 @@ module SiSU_DB_import include SiSU_Param include SiSU_Screen @@dl=nil + @@hname=nil attr_accessor :tp def initialize(opt,conn='',sql_type='pg') @opt,@conn,@sql_type=opt,conn,sql_type @@ -381,7 +382,7 @@ module SiSU_DB_import @en_pls << txt.scan(/~\[[+](\d+).+?\]~/) txt.gsub!(/~\[([+]\d+).+?\]~/,'<sup>\1</sup>') end - @col[:body]=SiSU_Format_Shared::CSS_Format.new(txt,@col[:ocn],@col[:lev]).lev4_minus + @col[:body]=SiSU_Format_Shared::CSS_Format.new(@md,txt,@col).lev4_minus special_character_escape(@col[:body]) @col[:plaintext]=@col[:body].dup strip_markup(@col[:plaintext]) @@ -405,25 +406,31 @@ module SiSU_DB_import @col[:lv4]+=1 @col[:lid]+=1 @col[:lev]=4 + @hname=if @col[:seg] and not @col[:seg].to_s.empty? + @@hname=@col[:seg].to_s + else @@hname + end + @env=SiSU_Env::Info_env.new(@md.fns) + @base_url="#{@env.url.root}/#{@md.fnb}/#@hname.html" if txt =~ /~\{.+?\}~/ word_mode=txt.scan(/\S+/) endnote_range(word_mode) @en << txt.scan(/~\{(\d+).+?\}~/) - txt.gsub!(/~\{(\d+).+?\}~/,'<sup>\1</sup>') + txt.gsub!(/~\{(\d+).+?\}~/,%{<sup><a href="#@base_url#_\\1" name="-\\1">\\1</a></sup>}) end if txt =~/~\[\*.+?\]~/ word_mode=txt.scan(/\S+/) endnote_range(word_mode) @en_ast << txt.scan(/~\[[*](\d+).+?\]~/) - txt.gsub!(/~\[([*]\d+).+?\]~/,'<sup>\1</sup>') + txt.gsub!(/~\[([*]\d+).+?\]~/,%{<sup><a href="#@base_url#_\\1" name="-\\1">\\1</a></sup>}) end if txt =~/~\[\+.+?\]~/ word_mode=txt.scan(/\S+/) endnote_range(word_mode) @en_pls << txt.scan(/~\[[+](\d+).+?\]~/) - txt.gsub!(/~\[([+]\d+).+?\]~/,'<sup>\1</sup>') + txt.gsub!(/~\[([+]\d+).+?\]~/,%{<sup><a href="#@base_url#_\\1" name="-\\1">\\1</a></sup>}) end - @col[:body]=SiSU_Format_Shared::CSS_Format.new(txt,@col[:ocn],@col[:lev],@col[:seg]).lev4_plus + @col[:body]=SiSU_Format_Shared::CSS_Format.new(@md,txt,@col).lev4_plus special_character_escape(@col[:body]) @col[:plaintext]=@col[:body].dup strip_markup(@col[:plaintext]) @@ -445,25 +452,31 @@ module SiSU_DB_import @col[:lv5]+=1 @col[:lid]+=1 @col[:lev]=5 + @hname=if @col[:seg] and not @col[:seg].to_s.empty? + @@hname=@col[:seg].to_s + else @@hname + end + @env=SiSU_Env::Info_env.new(@md.fns) + @base_url="#{@env.url.root}/#{@md.fnb}/#@hname.html" if txt =~ /~\{.+?\}~/ word_mode=txt.scan(/\S+/) endnote_range(word_mode) @en << txt.scan(/~\{(\d+).+?\}~/) - txt.gsub!(/~\{(\d+).+?\}~/,'<sup>\1</sup>') + txt.gsub!(/~\{(\d+).+?\}~/,%{<sup><a href="#@base_url#_\\1" name="-\\1">\\1</a></sup>}) end if txt =~/~\[\*.+?\]~/ word_mode=txt.scan(/\S+/) endnote_range(word_mode) @en_ast << txt.scan(/~\[[*](\d+).+?\]~/) - txt.gsub!(/~\[([*]\d+).+?\]~/,'<sup>\1</sup>') + txt.gsub!(/~\[([*]\d+).+?\]~/,%{<sup><a href="#@base_url#_\\1" name="-\\1">\\1</a></sup>}) end if txt =~/~\[\+.+?\]~/ word_mode=txt.scan(/\S+/) endnote_range(word_mode) @en_pls << txt.scan(/~\[[+](\d+).+?\]~/) - txt.gsub!(/~\[([+]\d+).+?\]~/,'<sup>\1</sup>') + txt.gsub!(/~\[([+]\d+).+?\]~/,%{<sup><a href="#@base_url#_\\1" name="-\\1">\\1</a></sup>}) end - @col[:body]=SiSU_Format_Shared::CSS_Format.new(txt,@col[:ocn],@col[:ocnd],@col[:ocns],@col[:lev],@col[:seg]).lev4_plus + @col[:body]=SiSU_Format_Shared::CSS_Format.new(@md,txt,@col).lev4_plus special_character_escape(@col[:body]) @col[:plaintext]=@col[:body].dup strip_markup(@col[:plaintext]) @@ -485,25 +498,31 @@ module SiSU_DB_import @col[:lv6]+=1 @col[:lid]+=1 @col[:lev]=6 + @hname=if @col[:seg] and not @col[:seg].to_s.empty? + @@hname=@col[:seg].to_s + else @@hname + end + @env=SiSU_Env::Info_env.new(@md.fns) + @base_url="#{@env.url.root}/#{@md.fnb}/#@hname.html" if txt =~ /~\{.+?\}~/ word_mode=txt.scan(/\S+/) endnote_range(word_mode) @en << txt.scan(/~\{(\d+).+?\}~/) - txt.gsub!(/~\{(\d+).+?\}~/,'<sup>\1</sup>') + txt.gsub!(/~\{(\d+).+?\}~/,%{<sup><a href="#@base_url#_\\1" name="-\\1">\\1</a></sup>}) end if txt =~/~\[\*.+?\]~/ word_mode=txt.scan(/\S+/) endnote_range(word_mode) @en_ast << txt.scan(/~\[[*](\d+).+?\]~/) - txt.gsub!(/~\[([*]\d+).+?\]~/,'<sup>\1</sup>') + txt.gsub!(/~\[([*]\d+).+?\]~/,%{<sup><a href="#@base_url#_\\1" name="-\\1">\\1</a></sup>}) end if txt =~/~\[\+.+?\]~/ word_mode=txt.scan(/\S+/) endnote_range(word_mode) @en_pls << txt.scan(/~\[[+](\d+).+?\]~/) - txt.gsub!(/~\[([+]\d+).+?\]~/,'<sup>\1</sup>') + txt.gsub!(/~\[([+]\d+).+?\]~/,%{<sup><a href="#@base_url#_\\1" name="-\\1">\\1</a></sup>}) end - @col[:body]=SiSU_Format_Shared::CSS_Format.new(txt,@col[:ocn],@col[:ocnd],@col[:ocns],@col[:lev],@col[:seg]).lev4_plus + @col[:body]=SiSU_Format_Shared::CSS_Format.new(@md,txt,@col).lev4_plus special_character_escape(@col[:body]) @col[:plaintext]=@col[:body].dup strip_markup(@col[:plaintext]) @@ -520,24 +539,30 @@ module SiSU_DB_import @col[:lid]+=1 txt='' txt,@col[:ocn],@col[:ocnd],@col[:ocns],@col[:digest_clean],@col[:digest_all]=(/(.+?)<~(\d+);((?:\w|[0-6]:)\d+);(\w\d+)><([0-9a-f]{#{@@dl}}):([0-9a-f]{#{@@dl}})>/m).match(data).captures + @hname=if @col[:seg] and not @col[:seg].to_s.empty? + @@hname=@col[:seg].to_s + else @@hname + end + @env=SiSU_Env::Info_env.new(@md.fns) + @base_url="#{@env.url.root}/#{@md.fnb}/#@hname.html" if txt =~ /~\{.+?\}~/ word_mode=txt.scan(/\S+/) endnote_range(word_mode) @en << txt.scan(/~\{(\d+).+?\}~/) - txt.gsub!(/~\{(\d+).+?\}~/,'<sup>\1</sup>') + txt.gsub!(/~\{(\d+).+?\}~/,%{<sup><a href="#@base_url#_\\1" name="-\\1">\\1</a></sup>}) #txt.gsub!(/~\{(\d+).+?\}~/,'^[\1]') # remove endnote, keep endnote reference number, display as, e.g. [^1] end if txt =~/~\[\*.+?\]~/ word_mode=txt.scan(/\S+/) endnote_range(word_mode) @en_ast << txt.scan(/~\[[*](\d+).+?\]~/) - txt.gsub!(/~\[([*]\d+).+?\]~/,'<sup>\1</sup>') + txt.gsub!(/~\[([*]\d+).+?\]~/,%{<sup><a href="#@base_url#_\\1" name="-\\1">\\1</a></sup>}) end if txt =~/~\[\+.+?\]~/ word_mode=txt.scan(/\S+/) endnote_range(word_mode) @en_pls << txt.scan(/~\[[+](\d+).+?\]~/) - txt.gsub!(/~\[([+]\d+).+?\]~/,'<sup>\1</sup>') + txt.gsub!(/~\[([+]\d+).+?\]~/,%{<sup><a href="#@base_url#_\\1" name="-\\1">\\1</a></sup>}) end if @sql_type=~/pg/ and txt.size > (document_clean - 1) #% examine pg build & remove limitation puts "\n\nTOO LARGE (TXT - see error log)\n\n" @@ -553,13 +578,13 @@ module SiSU_DB_import if @en_pls[0]; @en_a_plus,@en_z_plus=@en_pls[0].first,@en_pls[0].last end @col[:body]=if txt=~/<!T[h]?ยก.+?!~\d+;\w\d+;\w\d+>/ #watch - SiSU_Format_Shared::CSS_Format.new(txt,@col[:ocn],@col[:ocnd],@col[:ocns]).html_table + SiSU_Format_Shared::CSS_Format.new(@md,txt,@col).html_table elsif txt=~/<:i1>/ - SiSU_Format_Shared::CSS_Format.new(txt,@col[:ocn],@col[:ocnd],@col[:ocns]).indent1 + SiSU_Format_Shared::CSS_Format.new(@md,txt,@col).indent1 elsif txt=~/<:i2>/ - SiSU_Format_Shared::CSS_Format.new(txt,@col[:ocn],@col[:ocnd],@col[:ocns]).indent2 + SiSU_Format_Shared::CSS_Format.new(@md,txt,@col).indent2 else - SiSU_Format_Shared::CSS_Format.new(txt,@col[:ocn],@col[:ocnd],@col[:ocns]).norm + SiSU_Format_Shared::CSS_Format.new(@md,txt,@col).norm end special_character_escape(@col[:body]) @col[:plaintext]=@col[:body].dup @@ -578,7 +603,7 @@ module SiSU_DB_import en,txt,digest_clean=$1,$2,$3 end @id_n+=1 - body=SiSU_Format_Shared::CSS_Format.new(txt,@col[:ocn],@col[:ocnd],@col[:ocns],en).endnote + body=SiSU_Format_Shared::CSS_Format.new(@md,txt,@col,en).endnote special_character_escape(body) special_character_escape(txt) strip_markup(txt) @@ -607,7 +632,7 @@ module SiSU_DB_import en,txt,digest_clean=$1,$2,$3 end @id_n+=1 - body=SiSU_Format_Shared::CSS_Format.new(txt,@col[:ocn],@col[:ocnd],@col[:ocns],en).endnote + body=SiSU_Format_Shared::CSS_Format.new(@md,txt,@col,en).endnote special_character_escape(body) special_character_escape(txt) strip_markup(txt) @@ -636,7 +661,7 @@ module SiSU_DB_import en,txt,digest_clean=$1,$2,$3 end @id_n+=1 - body=SiSU_Format_Shared::CSS_Format.new(txt,@col[:ocn],@col[:ocnd],@col[:ocns],en).endnote + body=SiSU_Format_Shared::CSS_Format.new(@md,txt,@col,en).endnote special_character_escape(body) special_character_escape(txt) strip_markup(txt) diff --git a/lib/sisu/v0/defaults.rb b/lib/sisu/v0/defaults.rb index ef4c9df4..6585e700 100644 --- a/lib/sisu/v0/defaults.rb +++ b/lib/sisu/v0/defaults.rb @@ -67,7 +67,7 @@ module SiSU_Viz #@css=SiSU_Env::CSS_default.new @fonts='verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman' # 'verdana, arial, georgia, tahoma, sans-serif, helvetica, "times new roman", times, roman' @dir=SiSU_Env::Info_env.new - @date=SiSU_Env::Info_date.new + @date=SiSU_Env::Info_date.new #{@date.year} end #% glyph def glyph_bullet # • @@ -1306,7 +1306,6 @@ WOK WOK end def widget_sisu - #{@date.year} v=SiSU_Env::Info_version.new.get_version <<WOK <!-- widget sisu --> @@ -1319,11 +1318,23 @@ WOK </td><td valign="top" width="45%"> <!-- SiSU Rights --> <p class="tiny_left"><font color="#666666" size="2"> - Generated by + Output generated by <a href="#{url_sisu}" #{js_sisu}> - SiSU + #{v[:project]} </a> - #{v[:project]} #{v[:version]} #{v[:date]} (#{v[:date_stamp]}) + #{v[:version]} #{v[:date]} (#{v[:date_stamp]}) + <br /> + <a href="#{url_sisu}" #{js_sisu}> + <b>#{v[:project]}</b> + </a> + <sup>©</sup> Ralph Amissah. + 1997, current #{@date.year_static}. + All Rights Reserved. + <br /> + <a href="#{url_sisu}" #{js_sisu}> + #{v[:project]} + </a> + is software for document structuring, publishing and search, <br /> <a href="#{url_sisu}" #{js_sisu}> www.jus.uio.no/sisu @@ -1333,7 +1344,6 @@ WOK www.sisudoc.org </a> <br /> - <br /> <i>w3 since October 3 1993</i> <a href="mailto://ralph@amissah.com" #{js_mail}> ralph@amissah.com @@ -1341,18 +1351,19 @@ WOK </font></p> </td><td valign="top" width="45%"> <p class="tiny_left"><font color="#666666" size="2"> - Using: + #{v[:project]} using: <br />Standard SiSU markup syntax, <br />Standard SiSU meta-markup syntax, and the <br />Standard SiSU <u>object citation numbering</u> and system, (object/text positioning system) <br /> - <sup>©</sup> Ralph Amissah 1997, current 2007. + <sup>©</sup> Ralph Amissah 1997, current #{@date.year_static}. All Rights Reserved. </font></p> </td></tr> WOK end def widget_way_better + v=SiSU_Env::Info_version.new.get_version <<WOK <!-- widget way better --> <tr><td valign="top" width="10%"> @@ -1363,20 +1374,19 @@ WOK </font></p> </td><td valign="top" width="45%"> <p class="tiny_left"><font color="#666666" size="2"> - <b>SiSU</b> <sup>©</sup> Ralph Amissah - 1993, current 2007 - All Rights Reserved. - <br /> - <b>SiSU is released under - <a href="http://www.gnu.org/licenses/gpl.html">GPL v3</a> - or later</b> + <a href="#{url_sisu}" #{js_sisu}> + #{v[:project]} + </a> + 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> </font></p> </td><td valign="top" width="45%"> <p class="tiny_left"><font color="#666666" size="2"> - Developed using + #{v[:project]}, developed using <a href="http://www.ruby-lang.org/en/"> Ruby </a> @@ -1385,7 +1395,7 @@ WOK Debian/Gnu/Linux </a> software infrastructure, - & with the usual GPL (or OSS) suspects. + with the usual GPL (or OSS) suspects. <br /> Better - "performance, reliability, scalability, security & total cost of ownership" [not to mention flexibility & choice] @@ -1425,8 +1435,8 @@ WOK def credits_sisu %{#{widgets_open} <tr><td> - #{widget_way_better} #{widget_sisu} + #{widget_way_better} </table>} end def credits_splash @@ -1484,8 +1494,7 @@ documents, books, digital libraries in plaintext, html, XHTML, XML, ODF (OpenDocument), LaTeX, PDF, SQL (PostgreSQL and SQLite), and for search</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> -<meta name="dc.title" content= -"SiSU information Structuring Universe, Structured information Serialised Units, 2007" /> +<meta name="dc.title" content="SiSU information Structuring Universe, Structured information Serialised Units, #{@date.year_static}" /> <meta name="dc.creator" content="Ralph Amissah" /> <meta name="dc.subject" content= "document structuring, ebook, publishing, PDF, LaTeX, XML, ODF, SQL, postgresql, sqlite, electronic book, electronic publishing, electronic document, electronic citation, data structure, citation systems, granular search, digital library" /> @@ -1512,7 +1521,7 @@ for search</title> Structured information, Serialized Units </h2> <h2 class="top_band_tiny"> -software for electronic texts, document collections, books, digital libraries, and search +software for electronic texts, document collections, books, digital libraries, and search, </h2> <h2 class="top_band_tiny"> with "atomic search" and text positioning system (shared text citation numbering: "<i>ocn</i>") @@ -1846,7 +1855,7 @@ ralph.amissah@gmail.com </a> </p> <p class="small"> -2007 +#{@date.year_static} </p> <p class="tiny"> w3 since October 3 1993 diff --git a/lib/sisu/v0/html_format.rb b/lib/sisu/v0/html_format.rb index 442f2b19..cbbcadb4 100644 --- a/lib/sisu/v0/html_format.rb +++ b/lib/sisu/v0/html_format.rb @@ -839,7 +839,6 @@ WOK Endnotes </h4> #{@vz.table_close} -#{table_top_control} <h1>Endnotes</h1>} end def navigation_table diff --git a/lib/sisu/v0/html_segments.rb b/lib/sisu/v0/html_segments.rb index 1221f1f1..96eb0bee 100644 --- a/lib/sisu/v0/html_segments.rb +++ b/lib/sisu/v0/html_segments.rb @@ -190,8 +190,8 @@ module SiSU_HTML_seg def header_art(para) format_head_seg=SiSU_HTML_Format_type::Head_seg.new(@md) if para =~/^[0-6]~/ #2004w27/5 - if @@tracker < @@seg_total-1; @@seg[:dot_nav]=format_head_seg.dot_control_pre_next #if format_head_seg.dot_control_pre_next - else @@seg[:dot_nav]=format_head_seg.dot_control_pre #if format_head_seg.dot_control_pre + if @@tracker < @@seg_total-1; @@seg[:dot_nav]=format_head_seg.dot_control_pre_next + else @@seg[:dot_nav]=format_head_seg.dot_control_pre end end ads=SiSU_HTML_promo::Ad.new(@md) diff --git a/lib/sisu/v0/shared_html_lite.rb b/lib/sisu/v0/shared_html_lite.rb index 5285b6db..76def67d 100644 --- a/lib/sisu/v0/shared_html_lite.rb +++ b/lib/sisu/v0/shared_html_lite.rb @@ -60,18 +60,29 @@ module SiSU_Format_Shared include SiSU_Viz class CSS_Format require "#{SiSU_lib}/defaults" - def initialize(content=nil,id=nil,ocnd='',ocns='',lv='',hname=nil) + @@fns=nil + def initialize(md,content=nil,col=nil,en=nil) content.gsub!(/<:i[12]>/,'') - @content=content - @id=@ocn=id - @ocnd,@ocns=ocnd,ocns - @lv=@notenumber=lv.to_s - @hname=hname.to_s + @md,@content=md,content + @id=@ocn=col[:id] + @ocnd,@ocns=col[:ocnd],col[:ocns] + @notenumber=en + @lv=col[:lev].to_s + @@hname=if @md.fns != @@fns + @@fns=@md.fns + '' + end + @hname=if col[:seg] and not col[:seg].to_s.empty? + @@hname=col[:seg].to_s + else @@hname + end @tab="\t" @url_brace=SiSU_Viz::Skin.new.url_decoration # lots introduced to do html tables in db @@tablehead,@@tablefoot=[],[] @vz=SiSU_Env::Get_init.instance.skin + @env=SiSU_Env::Info_env.new(@md.fns) + @base_url="#{@env.url.root}/#{@md.fnb}/#@hname.html" end def urls(data) @words=[] @@ -128,11 +139,11 @@ module SiSU_Format_Shared def paragraph %{#{@tab*1}<p class="h#@lv" id="#@ocn" type="substantive" header="#@hname">\n#{@tab*2}#@content\n#{@tab*1}</p>\n} << "\n" end - def endnote + def endnote #used only by db @content=markup(@content) <<GSUB #{@tab*1}<p class="endnote" name="note_#@notenumber" from="#@ocn"> -#{@tab*2}<a name="_#@notenumber" href="#-#@notenumber">#@notenumber.</a> <note>#@content</note> +#{@tab*2}<a href="#@base_url#-#@notenumber" name="_#@notenumber">#@notenumber.</a> <note>#@content</note> #{@tab*1}</p> GSUB end diff --git a/lib/sisu/v0/sysenv.rb b/lib/sisu/v0/sysenv.rb index ddd84aaa..e9e39268 100644 --- a/lib/sisu/v0/sysenv.rb +++ b/lib/sisu/v0/sysenv.rb @@ -84,6 +84,9 @@ module SiSU_Env def monthonly @t.month end + def year_static + '2007' + end end class Info_system require 'rbconfig' diff --git a/lib/sisu/v0/texpdf_format.rb b/lib/sisu/v0/texpdf_format.rb index 4d69c1ae..72cd3932 100644 --- a/lib/sisu/v0/texpdf_format.rb +++ b/lib/sisu/v0/texpdf_format.rb @@ -64,7 +64,7 @@ module SiSU_TeX_Pdf def initialize(md,orientation='') @md,@orientation=md,orientation @vz=SiSU_Env::Get_init.instance.skin - @date=SiSU_Env::Info_date.new + @date=SiSU_Env::Info_date.new # #{@date.year} @copymark='{\\begin{footnotesize}\\raisebox{1ex}{\\copyright}\\end{footnotesize}}' #@url_brace=SiSU_Viz::Skin.new.url_decoration end @@ -144,9 +144,9 @@ WOK \\\\ ~ {\\begin{footnotesize}#{base_prog_txt} \\\\ Generated by \\href{http://www.jus.uio.no/sisu}{SiSU} \\begin{tiny}[ #{v[:project]} #{v[:version]} of #{v[:date_stamp]} ]\\end{tiny} \\href{http://www.jus.uio.no/sisu}{www.jus.uio.no/sisu} -\\\\ using SiSU: object citation numbering, markup, meta-markup, and system -\\\\ #@copymark Ralph Amissah 1997, current #{@date.year}, All Rights Reserved. -\\\\ SiSU is released under \\href{http://www.fsf.org/licenses/gpl.html}{GPL 3 } or later, \\href{http://www.fsf.org/licenses/gpl.html}{http://www.fsf.org/licenses/gpl.html}. \\\\ \\href{http://www.sisudoc.org}{www.sisudoc.org} +\\\\ #@copymark Ralph Amissah 1997, current #{@date.year_static}, All Rights Reserved. +\\\\ SiSU is software for document structuring, publishing and search (with object citation numbering), \\href{http://www.sisudoc.org}{www.sisudoc.org} +\\\\ SiSU is released under \\href{http://www.fsf.org/licenses/gpl.html}{GPL 3 } or later, \\href{http://www.fsf.org/licenses/gpl.html}{http://www.fsf.org/licenses/gpl.html}. {\\end{footnotesize} \\\\ WOK @@ -221,10 +221,10 @@ WOK \"Support Open Standards and Software Libre for the Information Technology Infrastructure\" RA\\subsubsection*{Information on this document copy #{site}} \\addcontentsline{toc}{subsection}{Information on this document copy} {\\begin{footnotesize} -\\\\ Generated by \\href{http://www.jus.uio.no/sisu/}{SiSU} found at \\href{http://www.jus.uio.no/sisu/}{www.jus.uio.no/sisu} \\begin{tiny}[ #{v[:project]} #{v[:version]} #{v[:date_stamp]} ]\\end{tiny} \\href{http://www.sisudoc.org}{www.sisudoc.org} (using SiSU: object citation numbering, markup, meta-markup, and system) #@copymark Ralph Amissah 1997, current #{@date.year}, All Rights Reserved. +\\\\ Generated by \\href{http://www.jus.uio.no/sisu/}{SiSU} found at \\href{http://www.jus.uio.no/sisu/}{www.jus.uio.no/sisu} \\begin{tiny}[ #{v[:project]} #{v[:version]} #{v[:date_stamp]} ]\\end{tiny} \\href{http://www.sisudoc.org}{www.sisudoc.org}. SiSU is software for document structuring, publishing and search (using SiSU: object citation numbering, markup, meta-markup, and system) #@copymark Ralph Amissah 1997, current #{@date.year_static}, All Rights Reserved. \\\\ SiSU is released under \\href{http://www.fsf.org/licenses/gpl.html}{GPL 3 } or later (\\href{http://www.fsf.org/licenses/gpl.html}{www.fsf.org/licenses/gpl.html}). {\\end{footnotesize} {\\begin{small} -\\\\ W3 since October 3 1993 \\href{http://www.jus.uio.no/sisu/}{#{sisu_ico}}SiSU 1997, current #{@date.year}. \\\\ #{sitename} presentations at \\begin{bfseries}#{site}\\end{bfseries} \\\\ \\\\ #{@md.title} \\textbf{pdf} versions can be found at: \\\\ +\\\\ W3 since October 3 1993 \\href{http://www.jus.uio.no/sisu/}{#{sisu_ico}}SiSU 1997, current #{@date.year_static}. \\\\ #{sitename} presentations at \\begin{bfseries}#{site}\\end{bfseries} \\\\ \\\\ #{@md.title} \\textbf{pdf} versions can be found at: \\\\ {\\end{small} \\begin{scriptsize}\\href{#{@vz.url_root_http}/#{url}/#{@md.fn[:pdf_p]}}{#{@vz.url_root_http}/#{url}/#{@md.fn[:pdf_p]}}\\end{scriptsize} \\\\ \\begin{scriptsize}\\href{#{@vz.url_root_http}/#{url}/#{@md.fn[:pdf_l]}}{#{@vz.url_root_http}/#{url}/#{@md.fn[:pdf_l]}}\\end{scriptsize} \\\\ |