diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v3/defaults.rb | 49 | ||||
-rw-r--r-- | lib/sisu/v3/param.rb | 28 | ||||
-rw-r--r-- | lib/sisu/v3/sysenv.rb | 58 | ||||
-rw-r--r-- | lib/sisu/v3/texpdf_format.rb | 33 |
4 files changed, 132 insertions, 36 deletions
diff --git a/lib/sisu/v3/defaults.rb b/lib/sisu/v3/defaults.rb index 97c2b263..cefab8a1 100644 --- a/lib/sisu/v3/defaults.rb +++ b/lib/sisu/v3/defaults.rb @@ -1746,12 +1746,12 @@ WOK <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> +<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <title>SiSU information Structuring Universe - Structured information, Serialized Units - software for electronic texts, documents, books, digital libraries in plaintext, html, XHTML, XML, ODF (OpenDocument), EPUB, 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, #{@date.year_static}" /> <meta name="dc.creator" content="Ralph Amissah" /> @@ -1769,7 +1769,7 @@ for search</title> <body> <div id="top_band"> <p class="top_band_image"> - <a href="http://www.sisudoc.org/sisu/SiSU" target="_top" > + <a href="http://www.sisudoc.org/sisu/SiSU" target="_top"> <img border="0" src="./_sisu/image/sisu.png" alt="SiSU >>"> </a> </p> @@ -1779,11 +1779,11 @@ for search</title> <h2 class="top_band_tiny"> Structured information, Serialized Units - <a href="http://www.sisudoc.org" target="_top" > + <a href="http://www.sisudoc.org" target="_top"> <www.sisudoc.org> </a> or - <a href="http://www.jus.uio.no/sisu/" target="_top" > + <a href="http://www.jus.uio.no/sisu/" target="_top"> <www.jus.uio.no/sisu/> </a> </h2> @@ -1801,7 +1801,7 @@ outputs include: plaintext, html, XHTML, XML, ODF (OpenDocument), EPUB, LaTeX, P </div> <div id="column_left"> <p class="bold"> - <a href="http://www.sisudoc.org/sisu/SiSU" target="_top" > + <a href="http://www.sisudoc.org/sisu/SiSU" target="_top"> SiSU </a> </p> @@ -1809,7 +1809,7 @@ outputs include: plaintext, html, XHTML, XML, ODF (OpenDocument), EPUB, LaTeX, P --- </p> <p class="small"> - <a href="http://www.sisudoc.org/sisu/sisu_manual/" target="_top" > + <a href="http://www.sisudoc.org/sisu/sisu_manual/" target="_top"> SiSU Manual </a> </p> @@ -1817,7 +1817,7 @@ outputs include: plaintext, html, XHTML, XML, ODF (OpenDocument), EPUB, LaTeX, P --- </p> <p class="small"> - <a href="http://www.sisudoc.org/sisu/SiSU/1.html#summary" target="_top" > + <a href="http://www.sisudoc.org/sisu/SiSU/1.html#summary" target="_top"> What does SiSU do? Summary </a> </p> @@ -1825,17 +1825,17 @@ outputs include: plaintext, html, XHTML, XML, ODF (OpenDocument), EPUB, LaTeX, P --- </p> <p class="small"> - <a href="http://www.sisudoc.org/sisu/SiSU/examples.html" target="_top" > + <a href="http://www.sisudoc.org/sisu/SiSU/examples.html" target="_top"> Book Samples and Markup Examples </a> </p> <p class="small"> - <a href="http://www.sisudoc.org/sisu/sisu_site_metadata/harvest_authors.html" target="_top" > + <a href="http://www.sisudoc.org/sisu/sisu_site_metadata/harvest_authors.html" target="_top"> sorted by Author (sisu metadata) </a> </p> <p class="small"> - <a href="http://www.sisudoc.org/sisu/sisu_site_metadata/harvest_topics.html" target="_top" > + <a href="http://www.sisudoc.org/sisu/sisu_site_metadata/harvest_topics.html" target="_top"> sorted by Topic (sisu metadata) </a> </p> @@ -1843,7 +1843,7 @@ outputs include: plaintext, html, XHTML, XML, ODF (OpenDocument), EPUB, LaTeX, P --- </p> <p class="small"> - <a href="http://www.sisudoc.org/sisu/SiSU/1.html#ocn" target="_top" > + <a href="http://www.sisudoc.org/sisu/SiSU/1.html#ocn" target="_top"> Object Citation Numbering - <i>ocn</i> </a> </p> @@ -1852,12 +1852,13 @@ outputs include: plaintext, html, XHTML, XML, ODF (OpenDocument), EPUB, LaTeX, P --- </p> <p class="small"> - <a href="http://www.sisudoc.org/sisu/SiSU/1.html#search" target="_top" > + <a href="http://www.sisudoc.org/sisu/SiSU/1.html#search" target="_top"> Search - "<i>granular</i>" </a> +</p> <p class="tiny"> Of interest is the ease of streaming documents to a relational database, at an object (roughly paragraph) level and the potential for increased precision in the presentation of matches that results thereby. The ability to serialise html, LaTeX, XML, SQL, (whatever) is also inherent in / incidental to the design. For a description see the - <a href="http://www.sisudoc.org/sisu/sisu_provisional_patent_application_200408" target="_top" > + <a href="http://www.sisudoc.org/sisu/sisu_provisional_patent_application_200408" target="_top"> abandoned U.S. provisional patent application </a> </p> @@ -1865,15 +1866,23 @@ outputs include: plaintext, html, XHTML, XML, ODF (OpenDocument), EPUB, LaTeX, P --- </p> <p class="small"> - <a href="http://www.sisudoc.org/sisu/SiSU/download.html" target="_top" > - <b>Download</b> + <a href="http://git.sisudoc.org/" target="_top"> + <b>Development, SCM - Git</b> + </a><br /> + <a href="http://git.sisudoc.org/" target="_top"> + <http://git.sisudoc.org> + </a> +</p> +<p class="small"> + <a href="http://www.sisudoc.org/sisu/SiSU/download.html" target="_top"> + <b>Download</b> alternatives </a> </p> <p class="tiny"> --- </p> <p class="small"> - <a href="http://www.sisudoc.org/sisu/SiSU/changelog.html" target="_top" > + <a href="http://www.sisudoc.org/sisu/SiSU/changelog.html" target="_top"> Changelog </a> </p> @@ -1882,7 +1891,7 @@ outputs include: plaintext, html, XHTML, XML, ODF (OpenDocument), EPUB, LaTeX, P </p> <p class="small"> License, SiSU is licensed under - <a href="http://www.gnu.org/licenses/gpl.html" target="_top" > + <a href="http://www.gnu.org/licenses/gpl.html" target="_top"> GPLv3 or later </a> </p> @@ -1909,7 +1918,7 @@ SiSU is an Open Source project initiated and led by Ralph Amissah <a href="mailt <p class="bold"> For less markup than the most elementary HTML you can have more. </p> -<p><a href="http://www.sisudoc.org/sisu/SiSU" target="_top" ><b>SiSU</b> - Structured information, Serialized Units</a> for electronic documents, is an information structuring, transforming, publishing and search framework with the following features:</p> +<p><a href="http://www.sisudoc.org/sisu/SiSU" target="_top"><b>SiSU</b> - Structured information, Serialized Units</a> for electronic documents, is an information structuring, transforming, publishing and search framework with the following features:</p> <p> <b>(i)</b> markup syntax: <b>(a)</b> @@ -1965,6 +1974,7 @@ document content certification and comparison considerations: the document and each object within it stamped with an md5 hash making it possible to easily check or guarantee that the substantive content of a document is unchanged, <b>(b)</b> version control, documents integrated with time based source control system, default RCS or CVS with use of $Id$ tag, which SiSU checks +</p> <p> <b>(x)</b> SiSU's minimalist markup makes for meaningful "diffing" of the substantive content of markup-files,</p> @@ -2035,7 +2045,7 @@ as a developers tool it is flexible and extensible <input type="hidden" name="a" value="1" /> <input type="radio" name="view" value="index" checked="checked" /> idx <input type="radio" name="view" value="text" /> txt -<a href="http://search.sisudoc.org" target="_top" ><search.sisudoc.org></a> +<a href="http://search.sisudoc.org" target="_top"><search.sisudoc.org></a> </form> <!-- Search SiSU --> </p> @@ -2061,6 +2071,7 @@ SiSU markup is fairly minimalistic, it consists of: a (largely optional) documen <a href="http://www.sisudoc.org/sisu/SiSU/"> <www.sisudoc.org/sisu/SiSU> </a> +</p> <p class="tiny"> SiSU was developed in relation to legal documents, and is strong across a wide variety of texts (law, literature...(humanities, law and part of the social sciences)). SiSU handles images but is not suitable for formulae/ statistics, or for technical writing at this time.</p> <p class="tiny"> diff --git a/lib/sisu/v3/param.rb b/lib/sisu/v3/param.rb index e2cffa9b..674b8cba 100644 --- a/lib/sisu/v3/param.rb +++ b/lib/sisu/v3/param.rb @@ -814,9 +814,31 @@ module SiSU_Param end end def texpdf_font - @h['texpdf_font'] && (@h['texpdf_font']=~/\S{3,}/) \ - ? @h['texpdf_font'] - : @env.font.texpdf + def main + @h['texpdf_font'] \ + && (@h['texpdf_font']=~/\S{3,}/) \ + ? @h['texpdf_font'] + : @env.font.texpdf.main + end + def sans # not used + @h['texpdf_font_sans'] \ + && (@h['texpdf_font_sans']=~/\S{3,}/) \ + ? @h['texpdf_font_sans'] + : @env.font.texpdf.sans + end + def serif # not used + @h['texpdf_font_serif'] \ + && (@h['texpdf_font_serif']=~/\S{3,}/) \ + ? @h['texpdf_font_serif'] + : @env.font.texpdf.serif + end + def mono + @h['texpdf_font_mono'] \ + && (@h['texpdf_font_mono']=~/\S{3,}/) \ + ? @h['texpdf_font_mono'] + : @env.font.texpdf.mono + end + self end def skin @h['skin'] diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index ed2d74dc..3ef176ec 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -216,13 +216,26 @@ module SiSU_Env @@default_dir=DEFAULT_DIR m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m stub_pwd=@@pwd[m,1] - @@rc_path=["#{@@pwd}/_sisu/#{SiSU_version_dir}","#{@@pwd}/_sisu","#{@@home}/.sisu/#{SiSU_version_dir}","#{@@home}/.sisu","#{@@sisu_etc}/#{SiSU_version_dir}"] - @@yamlrc_path=["#{@@pwd}/_sisu/#{SiSU_version_dir}","#{@@pwd}/_sisu","#{@@home}/.sisu/#{SiSU_version_dir}","#{@@home}/.sisu","#{@@sisu_etc}/#{SiSU_version_dir}"] + @@rc_path=[ + "#{@@pwd}/.sisu/#{SiSU_version_dir}", + "#{@@pwd}/.sisu", + "#{@@pwd}/_sisu/#{SiSU_version_dir}", + "#{@@pwd}/_sisu", + "#{@@home}/.sisu/#{SiSU_version_dir}", + "#{@@home}/.sisu", + "#{@@sisu_etc}/#{SiSU_version_dir}", + ] + @@yamlrc_path=@@rc_path #@@yamlrc_path=(stub_pwd !~/^sisupod$/) \ #? (["#{@@pwd}/_sisu/#{SiSU_version_dir}","#{@@pwd}/_sisu","#{@@home}/.sisu/#{SiSU_version_dir}","#{@@home}/.sisu","#{@@sisu_etc}/#{SiSU_version_dir}"]) #: ["#{@@home}/.sisu/#{SiSU_version_dir}","#{@@home}/.sisu","#{@@sisu_etc}/#{SiSU_version_dir}"] #security policy: prevent reading of sisurc.yml in sisupod @@ad_path=(stub_pwd !~/^sisupod$/) \ - ? (["#{@@pwd}/_sisu/skin/yml","#{@@home}/.sisu/skin/yml","#{@@sisu_etc}/skin/yml"]) + ? ([ + "#{@@pwd}/.sisu/skin/yml", + "#{@@pwd}/_sisu/skin/yml", + "#{@@home}/.sisu/skin/yml", + "#{@@sisu_etc}/skin/yml", + ]) : ["#{@@home}/.sisu",@@sisu_etc] attr_accessor :user,:home,:hostname,:pwd,:host,:arch,:rbver,:dir_arch,:dir_sitearch,:dir_bin,:locale,:webserv_path,:webserv_host_cgi,:webserv_port_cgi,:default_dir,:rc_path,:yamlrc_path,:ad_path def initialize @@ -1516,10 +1529,31 @@ WOK end def font def texpdf - (defined? @rc['default']['texpdf_font']) \ - && (@rc['default']['texpdf_font']=~/\S{3,}/) \ - ? @rc['default']['texpdf_font'] - : 'Liberation Sans' #'Liberation Sans' #'Liberation Serif' + def main + (defined? @rc['default']['texpdf_font']) \ + && (@rc['default']['texpdf_font']=~/\S{3,}/) \ + ? @rc['default']['texpdf_font'] + : 'Liberation Sans' + end + def sans # not used + (defined? @rc['default']['texpdf_font_sans']) \ + && (@rc['default']['texpdf_font_sans']=~/\S{3,}/) \ + ? @rc['default']['texpdf_font_sans'] + : 'Liberation Sans' + end + def serif # not used + (defined? @rc['default']['texpdf_font_serif']) \ + && (@rc['default']['texpdf_font_serif']=~/\S{3,}/) \ + ? @rc['default']['texpdf_font_serif'] + : 'Liberation Serif' + end + def mono + (defined? @rc['default']['texpdf_font_mono']) \ + && (@rc['default']['texpdf_font_mono']=~/\S{3,}/) \ + ? @rc['default']['texpdf_font_mono'] + : 'Liberation Mono' + end + self end self end @@ -3363,13 +3397,19 @@ WOK @@filename_html_scroll=File.new(p_fn,'w+') end def html_seg_index - pth,fn="#{output_path.html.dir}/#{@md.fnb}",base_filename.html_seg_index + pth=(by_filename?) \ + ? "#{output_path.html.dir}" + : "#{output_path.html.dir}/#{@md.fnb}" + fn=base_filename.html_seg_index make_path(pth) p_fn=place_file.html_seg_index.dir @@filename_html_index=File.new(p_fn,'w+') end def html_segtoc - pth,fn="#{output_path.html.dir}/#{@md.fnb}",base_filename.html_segtoc + pth=(by_filename?) \ + ? "#{output_path.html.dir}" + : "#{output_path.html.dir}/#{@md.fnb}" + fn=base_filename.html_segtoc make_path(pth) p_fn=place_file.html_segtoc.dir @@filename_html_index=File.new(p_fn,'w+') diff --git a/lib/sisu/v3/texpdf_format.rb b/lib/sisu/v3/texpdf_format.rb index bf1c2a37..34169892 100644 --- a/lib/sisu/v3/texpdf_format.rb +++ b/lib/sisu/v3/texpdf_format.rb @@ -789,12 +789,32 @@ module SiSU_TeX_Pdf { mainlang: mainlang, otherlang: otherlang } end def tex_head_encode - texpdf_font=if defined? @md.make.texpdf_font \ - and not @md.make.texpdf_font.nil? \ - and @md.make.texpdf_font=~/\S{3,}/ - @md.make.texpdf_font - else @env.font.texpdf + texpdf_font=if defined? @md.make.texpdf_font.main \ + and not @md.make.texpdf_font.main.nil? \ + and @md.make.texpdf_font.main=~/\S{3,}/ + @md.make.texpdf_font.main + else @env.font.texpdf.main end + texpdf_font_sans=if defined? @md.make.texpdf_font.sans \ + and not @md.make.texpdf_font.sans.nil? \ + and @md.make.texpdf_font.sans=~/\S{3,}/ # not used + @md.make.texpdf_font.sans + else @env.font.texpdf.sans + end + texpdf_font_serif=if defined? @md.make.texpdf_font.serif \ + and not @md.make.texpdf_font.serif.nil? \ + and @md.make.texpdf_font.serif=~/\S{3,}/ # not used + @md.make.texpdf_font.serif + else @env.font.texpdf.serif + end + texpdf_font_mono=if defined? @md.make.texpdf_font.mono \ + and not @md.make.texpdf_font.mono.nil? \ + and @md.make.texpdf_font.mono=~/\S{3,}/ + @md.make.texpdf_font.mono + else @env.font.texpdf.mono + end + # you may wish to check selected font against avaiable fonts: + # fc-list :outline -f "%{family}\n" case @tex2pdf when /xe/ <<WOK @@ -802,6 +822,9 @@ module SiSU_TeX_Pdf \\setmainlanguage{#{tex_head_lang[:mainlang]}} \\setotherlanguage{#{tex_head_lang[:otherlang]}} \\setmainfont{#{texpdf_font}} +\\setmonofont[Scale=0.85]{#{texpdf_font_mono}} +% \\setsansfont{#{texpdf_font_sans}} +% \\setromanfont{#{texpdf_font_serif}} WOK when /pdf/ if @md.file_encoding =~ /iso-?8859/i #% iso8859 |