From a8472db6a89056fa93a859a4806ae1e9f182cab4 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 3 Oct 2011 21:06:51 -0400 Subject: v3: sysenv, rc_path adds ./.sisu/ (to existing ./_sisu/ & ~/.sisu/) --- lib/sisu/v3/sysenv.rb | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index ed2d74dc..9d4fa887 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 -- cgit v1.2.3 From 8925b8813e8e611faf060e76fecc83189e79bb6a Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 3 Oct 2011 21:08:02 -0400 Subject: v3: defaults, (sisu) home page, link to git repo, minor fixes --- lib/sisu/v3/defaults.rb | 49 ++++++++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 19 deletions(-) (limited to 'lib') 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 + 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 - @@ -1769,7 +1769,7 @@ for search

- + SiSU >>

@@ -1779,11 +1779,11 @@ for search

Structured information, Serialized Units    - + <www.sisudoc.org>   or   - + <www.jus.uio.no/sisu/>

@@ -1801,7 +1801,7 @@ outputs include: plaintext, html, XHTML, XML, ODF (OpenDocument), EPUB, LaTeX, P

- + SiSU

@@ -1809,7 +1809,7 @@ outputs include: plaintext, html, XHTML, XML, ODF (OpenDocument), EPUB, LaTeX, P ---

- + SiSU Manual

@@ -1817,7 +1817,7 @@ outputs include: plaintext, html, XHTML, XML, ODF (OpenDocument), EPUB, LaTeX, P ---

- + What does SiSU do? Summary

@@ -1825,17 +1825,17 @@ outputs include: plaintext, html, XHTML, XML, ODF (OpenDocument), EPUB, LaTeX, P ---

- + Book Samples and Markup Examples

- + sorted by Author (sisu metadata)

- + sorted by Topic (sisu metadata)

@@ -1843,7 +1843,7 @@ outputs include: plaintext, html, XHTML, XML, ODF (OpenDocument), EPUB, LaTeX, P ---

- + Object Citation Numbering - ocn

@@ -1852,12 +1852,13 @@ outputs include: plaintext, html, XHTML, XML, ODF (OpenDocument), EPUB, LaTeX, P ---

- + Search - "granular" +

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 - + abandoned U.S. provisional patent application

@@ -1865,15 +1866,23 @@ outputs include: plaintext, html, XHTML, XML, ODF (OpenDocument), EPUB, LaTeX, P ---

- - Download + + Development, SCM - Git +
+ + <http://git.sisudoc.org> + +

+

+ + Download alternatives

---

- + Changelog

@@ -1882,7 +1891,7 @@ outputs include: plaintext, html, XHTML, XML, ODF (OpenDocument), EPUB, LaTeX, P

License, SiSU is licensed under - + GPLv3 or later

@@ -1909,7 +1918,7 @@ SiSU is an Open Source project initiated and led by Ralph Amissah For less markup than the most elementary HTML you can have more.

-

SiSU - Structured information, Serialized Units for electronic documents, is an information structuring, transforming, publishing and search framework with the following features:

+

SiSU - Structured information, Serialized Units for electronic documents, is an information structuring, transforming, publishing and search framework with the following features:

(i) markup syntax: (a) @@ -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) version control, documents integrated with time based source control system, default RCS or CVS with use of $Id$ tag, which SiSU checks +

(x) SiSU's minimalist markup makes for meaningful "diffing" of the substantive content of markup-files,

@@ -2035,7 +2045,7 @@ as a developers tool it is flexible and extensible idx txt -<search.sisudoc.org> +<search.sisudoc.org>

@@ -2061,6 +2071,7 @@ SiSU markup is fairly minimalistic, it consists of: a (largely optional) documen <www.sisudoc.org/sisu/SiSU> +

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.

-- cgit v1.2.3 From 7fb6acc0702e4e6a05390be063d433b088d9cc0d Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 3 Oct 2011 21:09:09 -0400 Subject: v3: texpdf, fonts, Liberation series default (main: Sans, mono: Mono) * (mono) improved with selection of Liberation Mono as default * font (main font, mono) configurable in sisurc.yml under default: (texpdf_font:|texpdf_font_mono:) or within document under @make: (:texpdf_font:|:texpdf_font_mono:) --- lib/sisu/v3/param.rb | 28 +++++++++++++++++++++++++--- lib/sisu/v3/sysenv.rb | 29 +++++++++++++++++++++++++---- lib/sisu/v3/texpdf_format.rb | 33 ++++++++++++++++++++++++++++----- 3 files changed, 78 insertions(+), 12 deletions(-) (limited to 'lib') 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 9d4fa887..aaf210e0 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -1529,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 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/ < Date: Mon, 3 Oct 2011 21:13:43 -0400 Subject: v3: sysenv, output_structure_by: filename, fix to output directories created --- lib/sisu/v3/sysenv.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index aaf210e0..3ef176ec 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -3397,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+') -- cgit v1.2.3