From 45a05d0cbf65cd368ff463e02dac76796d210ee4 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 26 Jun 2011 22:55:48 -0400 Subject: sha256 (3.0.13) --- data/doc/sisu/CHANGELOG_v3 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 7f2093b0..2945f34e 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -16,9 +16,9 @@ v3 branch once stable will supersede & replace current stable v2 branch %% 3.0.13.orig.tar.gz (2011-06-26:25/7) http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/3.0.13-1 http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.13.orig.tar.gz - sisu_3.0.13.orig.tar.gz - sisu_3.0.13-1.dsc - sisu_3.0.13-1.debian.tar.gz + 33d2358a39a69c1be4403b06b52eaeca604e851ee4e32c6f1625399944362fea 1943441 sisu_3.0.13.orig.tar.gz + c741399aa3da6189854f7a532eae6db27370646a2b86b7427bf330401369bc13 1223 sisu_3.0.13-1.dsc + 0fe5173e4973a4af7fba79dcf5ae3c702f34b5ac89e02f4be9e014641e7514d0 289790 sisu_3.0.13-1.debian.tar.gz * dal_syntax, linebreak within regular objects is \\ (
depreciated) [test, affects downstream outputs, there is the potential for breakage] -- cgit v1.2.3 From 9056c5a30941680d7e6704f1e0380f28159ddbdd Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:03:08 -0400 Subject: v3: 3.0.14 version & changelog "opened" --- data/doc/sisu/CHANGELOG_v3 | 7 +++++++ data/sisu/v3/v/version.yml | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 2945f34e..c69e53e8 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -13,6 +13,13 @@ Reverse Chronological: %% Development branch UNSTABLE v3 branch once stable will supersede & replace current stable v2 branch +%% 3.0.14.orig.tar.gz (2011-07-26:30/2) +http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/3.0.14-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.14.orig.tar.gz + sisu_3.0.14.orig.tar.gz + sisu_3.0.14-1.dsc + sisu_3.0.14-1.debian.tar.gz + %% 3.0.13.orig.tar.gz (2011-06-26:25/7) http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/3.0.13-1 http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.13.orig.tar.gz diff --git a/data/sisu/v3/v/version.yml b/data/sisu/v3/v/version.yml index 681fd4c9..98cdbc06 100644 --- a/data/sisu/v3/v/version.yml +++ b/data/sisu/v3/v/version.yml @@ -1,5 +1,5 @@ --- -:version: 3.0.13-beta-rb1.9.2p180 -:date_stamp: 2011w25/7 -:date: "2011-06-26" +:version: 3.0.14-beta-rb1.9.2p180 +:date_stamp: 2011w30/2 +:date: "2011-07-26" :project: SiSU -- cgit v1.2.3 From 200843919b9d7e41012af32e876c43d3fb44a852 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:04:52 -0400 Subject: v3: urls, --concordance (hyphen added, descriptive) --- data/doc/sisu/CHANGELOG_v3 | 2 ++ lib/sisu/v3/urls.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index c69e53e8..6769a187 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -20,6 +20,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.14.orig.tar.gz sisu_3.0.14-1.dsc sisu_3.0.14-1.debian.tar.gz + * urls, --concordance + %% 3.0.13.orig.tar.gz (2011-06-26:25/7) http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/3.0.13-1 http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.13.orig.tar.gz diff --git a/lib/sisu/v3/urls.rb b/lib/sisu/v3/urls.rb index 2e73a91f..d5698b53 100644 --- a/lib/sisu/v3/urls.rb +++ b/lib/sisu/v3/urls.rb @@ -118,7 +118,7 @@ module SiSU_urls 'X --xml-dom (XML dom type)'=>@fn[:dom], 'y --manifest (Manifest, html)'=>@fn[:manifest], 'Y (Sitemap, xml)'=>@fn[:sitemap], - 'w -concordance (Concordance, html)'=>@fn[:concordance], + 'w --concordance (Concordance, html)'=>@fn[:concordance], }.sort {|a,b| a[0].downcase<=>b[0].downcase} end def songsheet -- cgit v1.2.3 From b739f3f1afeeb7798a906f06d030392d2d3e33e2 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:05:50 -0400 Subject: v3: sysenv, avoid creation of spurious directories in output tree * an image copy section removed (re-implement correctly later) --- data/doc/sisu/CHANGELOG_v3 | 3 +++ lib/sisu/v3/sysenv.rb | 12 +----------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 6769a187..7bcc728f 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -20,6 +20,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.14.orig.tar.gz sisu_3.0.14-1.dsc sisu_3.0.14-1.debian.tar.gz + * sysenv, avoid creation of spurious directories in output tree + (an image copy section removed, re-implement correctly later) + * urls, --concordance %% 3.0.13.orig.tar.gz (2011-06-26:25/7) diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index d709cd52..4a168e2d 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -2142,20 +2142,10 @@ WOK #end def images_local if FileTest.directory?(path.image_source_include) - if @@image_flag - images=Dir.glob("#{path.image_source_include}/*.{png,jpg,gif}") - pth="#{path.webserv}/#{@stub_pwd}" - mkdir_p("#{pth}/_sisu/image") unless FileTest.directory?("#{pth}/_sisu/image") - images.each { |i| File.install(i,"#{pth}/#{i}") } unless images.length > 0 - @@image_flag=false - end path.image_source_include -# "#{Xx[:html_relative2]}/_sisu/image" else if @@local_image==true - cmd=if @cmd; @cmd - else '' - end + cmd=@cmd ? @cmd : '' SiSU_Screen::Ansi.new(cmd,"WARNING - no local image directory or images:", defaults[:image_local] ).warn unless cmd =~/q/ @@local_image=false end -- cgit v1.2.3 From 9c518b4507322eef03a7921783e033e79f438448 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:07:18 -0400 Subject: v3: sysenv, cosmetic --- lib/sisu/v3/sysenv.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index 4a168e2d..8816212d 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -696,28 +696,28 @@ module SiSU_Env end def relaxng(cmd='') #trang - convert between different schema languages for XML program='trang' - program_ref="\n\t\tsee http://www.thaiopensource.com/relaxng/trang.html" + program_ref="\n\t\tsee " if program_found?(program); system("trang #{@input} #{@output}") else puts "\tWARN: #{program} is not installed #{program_ref}" if cmd =~/V/ end end def imagemagick #imagemagick is a image manipulation program program='identify' - program_ref="\n\t\tsee http://www.imagemagick.org/" + program_ref="\n\t\tsee " found=(program_found?(program)) ? true : false puts "\tWARN: #{program} is not installed #{program_ref}" unless found found end def graphicksmagick #graphicsmagick is a image manipulation program program='gm' - program_ref="\n\t\tsee http://www.graphicsmagick.org/" + program_ref="\n\t\tsee " found=(program_found?(program)) ? true : false puts "\tWARN: #{program} is not installed #{program_ref}" unless found found end def well_formed? #tidy - check for well formed xml xhtml etc. program=@prog.tidy - program_ref="\n\t\tsee http://tidy.sourceforge.net/" + program_ref="\n\t\tsee " if program_found?(program); system("#{@prog.tidy} -xml #{@input} > #{@output}") else puts "\tWARN: #{program} is not installed #{program_ref}" end @@ -741,8 +741,7 @@ module SiSU_Env end def latex2pdf(md,papersize='a4') #convert from latex to pdf tell=((@cmd =~/[MVv]/) ? '' : '> /dev/null' ) - mode='batchmode' - #mode='nonstopmode' + mode='batchmode' #mode='nonstopmode' program_ref="\n\t\tSee http://www.tug.org/applications/pdftex/\n\t\tOn Debian this is is included in tetex-extra" texpdf=tex2pdf_engine if @pdfetex_flag; -- cgit v1.2.3 From 5eb77a9b2e3558ef1d7393b60d3acd2b8d97912b Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:08:59 -0400 Subject: v3: param, cleanup setting of auto endotes --- data/doc/sisu/CHANGELOG_v3 | 2 ++ lib/sisu/v3/param.rb | 13 ++----------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 7bcc728f..ff837c06 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -23,6 +23,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.14.orig.tar.gz * sysenv, avoid creation of spurious directories in output tree (an image copy section removed, re-implement correctly later) + * param, cleanup setting of auto endnotes + * urls, --concordance %% 3.0.13.orig.tar.gz (2011-06-26:25/7) diff --git a/lib/sisu/v3/param.rb b/lib/sisu/v3/param.rb index 22b711df..2d2c22c0 100644 --- a/lib/sisu/v3/param.rb +++ b/lib/sisu/v3/param.rb @@ -1172,17 +1172,8 @@ module SiSU_Param when /^\^~\s+\S/; @en[:note] +=1 #% processing end end - if para =~/~\{|\^~ |~\^|<:ee>|\{.+?\[[1-6]\]\}\S+?\.ss[tm]/m; @flag_auto_endnotes,@flag_endnotes=true,true - end - unless @flag_auto_endnotes - if para =~/^(4~endnotes\b|<:ee>)/ - @flag_separate_endnotes=true - @flag_endnotes=true - end - end - if para =~/^(?:4~endnotes|<:ee>)/; @flag_separate_endnotes_make=false - end - if para =~/\s*.+/; @flag_endnotes=true + if para =~/~\{|\^~ |~\^|\{.+?\[[1-6]\]\}\S+?\.ss[tm]/m + @flag_auto_endnotes,@flag_endnotes=true,true end if para =~/^(?:table\{|\{table)/i; @flag_tables=true end -- cgit v1.2.3 From bdc8fb1810ad1295ebedca29926bc58481e1dd24 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:10:12 -0400 Subject: v3: xmls (sax, dom, xhtml) use of tidy, correct output location --- data/doc/sisu/CHANGELOG_v3 | 2 ++ lib/sisu/v3/xhtml.rb | 8 ++++---- lib/sisu/v3/xml.rb | 8 ++++---- lib/sisu/v3/xml_dom.rb | 8 ++++---- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index ff837c06..db069a13 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -25,6 +25,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.14.orig.tar.gz * param, cleanup setting of auto endnotes + * xmls (sax, dom, xhtml) use of xml tidy, correct output file location + * urls, --concordance %% 3.0.13.orig.tar.gz (2011-06-26:25/7) diff --git a/lib/sisu/v3/xhtml.rb b/lib/sisu/v3/xhtml.rb index ba8238d2..03415280 100644 --- a/lib/sisu/v3/xhtml.rb +++ b/lib/sisu/v3/xhtml.rb @@ -107,7 +107,7 @@ module SiSU_XHTML def song begin SiSU_XHTML::Source::Scroll.new(@particulars).songsheet - SiSU_XHTML::Source::Tidy.new(@md,@env).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use + SiSU_XHTML::Source::Tidy.new(@md,@file.place_file.xhtml.dir).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use SiSU_Rexml::Rexml.new(@md,@file.place_file.xhtml.dir).xml if @md.opt.cmd =~/M/ # test rexml parsing, comment out when not in use #debug rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error ensure @@ -395,8 +395,8 @@ WOK end end class Tidy - def initialize(md,dir) - @md,@env=md,dir + def initialize(md,file) + @md,@file=md,file @prog=SiSU_Env::Info_program.new end def xml @@ -408,7 +408,7 @@ WOK tell.grey_open end tidyfile='/dev/null' #don't want one or screen output, check for alternative flags - tidy=SiSU_Env::System_call.new("#{@env.path.output}/#{@md.fnb}/#{@md.fn[:xhtml]}",tidyfile) + tidy=SiSU_Env::System_call.new(@file,tidyfile) tidy.well_formed? tell.p_off unless @md.opt.cmd =~/q/ end diff --git a/lib/sisu/v3/xml.rb b/lib/sisu/v3/xml.rb index 23cfb5bc..f2751da1 100644 --- a/lib/sisu/v3/xml.rb +++ b/lib/sisu/v3/xml.rb @@ -107,7 +107,7 @@ module SiSU_XML_SAX def song begin SiSU_XML_SAX::Source::Scroll.new(@particulars).songsheet - SiSU_XML_SAX::Source::Tidy.new(@md,@env).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use + SiSU_XML_SAX::Source::Tidy.new(@md,@file.place_file.xml_sax.dir).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use SiSU_Rexml::Rexml.new(@md,@file.place_file.xml_sax.dir).xml if @md.opt.cmd =~/M/ # test rexml parsing, comment out when not in use #debug rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error ensure @@ -437,8 +437,8 @@ WOK end end class Tidy - def initialize(md,dir) - @md,@env=md,dir + def initialize(md,file) + @md,@file=md,file @prog=SiSU_Env::Info_program.new end def xml @@ -450,7 +450,7 @@ WOK tell.grey_open end tidyfile='/dev/null' #don't want one or screen output, check for alternative flags - tidy=SiSU_Env::System_call.new("#{@env.path.output}/#{@md.fnb}/#{@md.fn[:sax]}",tidyfile) + tidy=SiSU_Env::System_call.new(@file,tidyfile) tidy.well_formed? tell.p_off unless @md.opt.cmd =~/q/ end diff --git a/lib/sisu/v3/xml_dom.rb b/lib/sisu/v3/xml_dom.rb index 22b11ebc..7a0d55f3 100644 --- a/lib/sisu/v3/xml_dom.rb +++ b/lib/sisu/v3/xml_dom.rb @@ -104,7 +104,7 @@ module SiSU_XML_DOM def songsheet begin SiSU_XML_DOM::Source::Scroll.new(@particulars).songsheet - SiSU_XML_DOM::Source::Tidy.new(@md,@env).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use + SiSU_XML_DOM::Source::Tidy.new(@md,@file.place_file.xml_dom.dir).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use SiSU_Rexml::Rexml.new(@md,@file.place_file.xml_dom.dir).xml if @md.opt.cmd =~/M/ # test rexml parsing, comment out when not in use #debug rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error ensure @@ -513,8 +513,8 @@ WOK end end class Tidy - def initialize(md,dir) - @md,@env=md,dir + def initialize(md,file) + @md,@file=md,file @prog=SiSU_Env::Info_program.new end def xml @@ -524,7 +524,7 @@ WOK tell=SiSU_Screen::Ansi.new(@md.opt.cmd,'invert','','') tell.grey_open unless @md.opt.cmd =~/q/ tidyfile='/dev/null' #don't want one or screen output, check for alternative flags - tidy=SiSU_Env::System_call.new("#{@env.path.output}/#{@md.fnb}/#{@md.fn[:dom]}",tidyfile) + tidy=SiSU_Env::System_call.new(@file,tidyfile) tidy.well_formed? tell.p_off unless @md.opt.cmd =~/q/ end -- cgit v1.2.3 From 427c8b2969fef30a403a55adfc32b449d78d7fe9 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:11:52 -0400 Subject: v3: texpdf, XeTeX language settings (setmainlanguage setotherlanguage) * get from directory or filename if header @make: :language: not set --- data/doc/sisu/CHANGELOG_v3 | 3 +++ lib/sisu/v3/texpdf.rb | 2 +- lib/sisu/v3/texpdf_format.rb | 16 +++++++++++++--- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index db069a13..e873047e 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -25,6 +25,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.14.orig.tar.gz * param, cleanup setting of auto endnotes + * texpdf, XeTeX language settings ((setmainlanguage setotherlanguage) from + directory or filename) if @make: :language: header not set + * xmls (sax, dom, xhtml) use of xml tidy, correct output file location * urls, --concordance diff --git a/lib/sisu/v3/texpdf.rb b/lib/sisu/v3/texpdf.rb index 522480fd..22269fc2 100644 --- a/lib/sisu/v3/texpdf.rb +++ b/lib/sisu/v3/texpdf.rb @@ -183,7 +183,7 @@ module SiSU_TeX when /legal/; pdf_p=@f.pdf_p_legal; pdf_l=@f.pdf_l_legal else pdf_p=@f.pdf_p_a4; pdf_l=@f.pdf_l_a4 end - Dir.mkdir(@md.file.output_path.pdf.dir) unless FileTest.directory?(@md.file.output_path.pdf.dir) + mkdir_p(@md.file.output_path.pdf.dir) unless FileTest.directory?(@md.file.output_path.pdf.dir) if FileTest.file?(portrait_pdf) cp(portrait_pdf,"#{@md.file.output_path.pdf.dir}/#{pdf_p}") rm(portrait_pdf) diff --git a/lib/sisu/v3/texpdf_format.rb b/lib/sisu/v3/texpdf_format.rb index d7942121..cd63cd4e 100644 --- a/lib/sisu/v3/texpdf_format.rb +++ b/lib/sisu/v3/texpdf_format.rb @@ -636,10 +636,20 @@ module SiSU_TeX_Pdf end def tex_head_lang #babel 18n lang_char_arr=@md.i18n - mainlang_char=lang_char_arr.slice(0) + mainlang_char=if @md.i18n == Array \ + and @md.i18n.length > 0 + lang_char_arr.slice(0) + else @md.opt.lng + end mainlang=@lang.list[mainlang_char][:xlp] - otherlang=[] - lang_char_arr.slice(1..9).each { |ch| otherlang << @lang.list[ch][:xlp] } + otherlang=if mainlang != 'english' + [ @lang.list['en'][:xlp] ] + else [] + end + if lang_char_arr.length > 0 + lang_char_arr.slice(1..9).each { |ch| otherlang << @lang.list[ch][:xlp] } + otherlang.uniq! + end otherlang=otherlang.join(',') { mainlang: mainlang, otherlang: otherlang } end -- cgit v1.2.3 From a44bbf20b1f06c938ae0579a7771005995273c0c Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:12:52 -0400 Subject: v3: epub, opf fixes --- data/doc/sisu/CHANGELOG_v3 | 2 + lib/sisu/v3/epub_format.rb | 90 +++++++++++++++++++++++++++++++++++++++----- lib/sisu/v3/epub_segments.rb | 6 ++- 3 files changed, 87 insertions(+), 11 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index e873047e..00f62e6a 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -20,6 +20,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.14.orig.tar.gz sisu_3.0.14-1.dsc sisu_3.0.14-1.debian.tar.gz + * epub, opf fixes + * sysenv, avoid creation of spurious directories in output tree (an image copy section removed, re-implement correctly later) diff --git a/lib/sisu/v3/epub_format.rb b/lib/sisu/v3/epub_format.rb index e75ad112..9f169f5e 100644 --- a/lib/sisu/v3/epub_format.rb +++ b/lib/sisu/v3/epub_format.rb @@ -1037,16 +1037,90 @@ WOK def metadata #metadata dc author=if defined? @md.creator.author \ and @md.creator.author =~/\S+/ - x=@md.creator.author.gsub!(//,'>') - @md.creator.author.gsub!(/<br(?: \/)?>/,'
') - %{\n #{x}} + m='' + @md.creator.author_detail.each do |x| + surname=x[:the] \ + ? x[:the] \ + : '' + other_names=x[:others] \ + ? ', ' + x[:others] \ + : '' + m=(m.empty?) \ + ? (surname + other_names) \ + : (m + '; ' + surname + ', ' + other_names) + m.gsub!(//,'>') + m.gsub!(/<br(?: \/)?>/,';') + end + x=@md.creator.author.dup + x.gsub!(//,'>') + x.gsub!(/<br(?: \/)?>/,'
') + %{\n #{x}} + else '' + end + translator=if defined? @md.creator.translator \ + and @md.creator.translator =~/\S+/ + m='' + @md.creator.translator_detail.each do |x| + surname=x[:the] \ + ? x[:the] \ + : '' + other_names=x[:others] \ + ? ', ' + x[:others] \ + : '' + m=(m.empty?) \ + ? (surname + other_names) \ + : (m + '; ' + surname + ', ' + other_names) + m.gsub!(//,'>') + m.gsub!(/<br(?: \/)?>/,';') + end + x=@md.creator.translator.dup + x.gsub!(//,'>') + x.gsub!(/<br(?: \/)?>/,'
') + %{\n #{x}} else '' end illustrator=if defined? @md.creator.illustrator \ and @md.creator.illustrator =~/\S+/ - x=@md.creator.illustrator.gsub!(//,'>') - @md.creator.illustrator.gsub!(/<br(?: \/)?>/,'
') - %{\n #{x}} + m='' + @md.creator.illustrator_detail.each do |x| + surname=x[:the] \ + ? x[:the] \ + : '' + other_names=x[:others] \ + ? ', ' + x[:others] \ + : '' + m=(m.empty?) \ + ? (surname + other_names) \ + : (m + '; ' + surname + ', ' + other_names) + m.gsub!(//,'>') + m.gsub!(/<br(?: \/)?>/,';') + end + x=@md.creator.illustrator.dup + x.gsub!(//,'>') + x.gsub!(/<br(?: \/)?>/,'
') + %{\n #{x}} + else '' + end + date_published=if defined? @md.date.published \ + and @md.date.published =~/\S+/ + x=@md.date.published.dup + x.gsub!(//,'>') + x.gsub!(/<br(?: \/)?>/,'
') + %{\n #{x}} + else '' + end + subject=if defined? @md.classify.subject \ + and @md.classify.subject =~/\S+/ + x=@md.classify.subject.dup + x.gsub!(//,'>') + x.gsub!(/<br(?: \/)?>/,'
') + %{\n #{x}} + else '' + end + language=if defined? @md.opt.lng \ + and @md.opt.lng =~/\S+/ + language=@md.opt.lng.gsub(/
/,'
') + %{\n #{language}} else '' end rights=if defined? @md.rights.all \ @@ -1058,10 +1132,8 @@ WOK < #{@md.title.full} - #{author}#{illustrator} - en-US + #{author}#{translator}#{illustrator}#{language}#{date_published}#{subject}#{rights} ... - #{rights} urn:uuid:#{@md.dgst[1]} WOK diff --git a/lib/sisu/v3/epub_segments.rb b/lib/sisu/v3/epub_segments.rb index ed8c8d39..7bddf917 100644 --- a/lib/sisu/v3/epub_segments.rb +++ b/lib/sisu/v3/epub_segments.rb @@ -395,7 +395,8 @@ WOK if @md.flag_separate_endnotes # may need to revisit, check dob.obj.gsub!(/"\s+href="#note_ref(\d+)">/,%{" href=\"endnotes#{Sfx[:epub_xhtml]}#note_ref\\1">}) #endnote- twice #removed file type end - if dob.is =~/heading|para/ and (not dob.ocn or dob.ocn.to_s.empty?) + if dob.is =~/heading|para/ \ + and (not dob.ocn or dob.ocn.to_s.empty?) format_seg=SiSU_EPUB_Format::Format_seg.new(@md,dob) end if (dob.is=='heading' or dob.is=='heading_insert' or dob.is=='para') \ @@ -414,7 +415,8 @@ WOK end def tail format_head_seg=SiSU_EPUB_Format::Head_seg.new(@md) - if @md.flag_auto_endnotes and @@seg_endnotes[@@get_hash_fn] + if @md.flag_auto_endnotes \ + and @@seg_endnotes[@@get_hash_fn] @@seg[:tail] << %{\n
\n
\n} if @@seg_endnotes[@@get_hash_fn].flatten.length > 0 @@seg[:tail] << format_head_seg.endnote_mark -- cgit v1.2.3 From f965e5904777542136ff525685193be307bbcfe8 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:14:34 -0400 Subject: v3: qrcode, manifest, (++), QR code (metadata) images for manifest * generate images using qrencode --- data/doc/sisu/CHANGELOG_v3 | 3 + lib/sisu/v3/hub.rb | 4 + lib/sisu/v3/manifest.rb | 28 ++ lib/sisu/v3/options.rb | 6 + lib/sisu/v3/qrcode.rb | 733 +++++++++++++++++++++++++++++++++++++++++++++ lib/sisu/v3/sysenv.rb | 39 ++- 6 files changed, 807 insertions(+), 6 deletions(-) create mode 100644 lib/sisu/v3/qrcode.rb diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 00f62e6a..89c0bf6b 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -20,6 +20,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.14.orig.tar.gz sisu_3.0.14-1.dsc sisu_3.0.14-1.debian.tar.gz + * qrcode, sysenv, manifest, generate & add QR code images of metadata to + manifest (using qrencode) (consider where and how else to use images) + * epub, opf fixes * sysenv, avoid creation of spurious directories in output tree diff --git a/lib/sisu/v3/hub.rb b/lib/sisu/v3/hub.rb index 7b847d4f..5e288b96 100644 --- a/lib/sisu/v3/hub.rb +++ b/lib/sisu/v3/hub.rb @@ -157,6 +157,7 @@ module SiSU when /^xml_scaffold$/; SiSU_XML_scaffold::Source.new(@opt).read # -k xml_scaffold.rb when /^embedded$/; SiSU_Embedded::Source.new(@opt).read # -m embedded.rb (image and other content) #check when /^manifest$/; SiSU_Manifest::Source.new(@opt).read # -y manifest.rb + when /^qrcode$/; SiSU_QRcode::Source.new(@opt).read # -Q qrcode.rb when /^sitemaps$/; SiSU_Sitemaps::Source.new(@opt).read # -Y sitemaps.rb when /^zap$/; SiSU_Zap::Source.new(@opt).read # -Z zap.rb when /^dbi$/; SiSU_DBI::SiSU_SQL.new(@opt).connect # -D -d dbi.rb @@ -398,6 +399,9 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ op('share_src_kdissert','kdissert (kdi)') #% -S share kdissert source end end + if @opt.act[:qrcode] #% --qrcode, -Q + op('qrcode','QRcode') + end if @opt.act[:hash_digests] #% --hash-digests, -N digest tree op('digests','digests') end diff --git a/lib/sisu/v3/manifest.rb b/lib/sisu/v3/manifest.rb index 06745c35..c6db7f25 100644 --- a/lib/sisu/v3/manifest.rb +++ b/lib/sisu/v3/manifest.rb @@ -415,6 +415,33 @@ module SiSU_Manifest published_languages(id,file) end end + def qrc_image + pth="#{@env.path.webserv}/#{@env.path.stub_pwd}/_sisu/image" + fn=@f.base_filename.manifest_txt + #fix relative path for different output structures + img_md="../../_sisu/image/qrc_md.#{fn}.png" + img_title="../../_sisu/image/qrc_title.#{fn}.png" + if FileTest.file?("#{pth}/qrc_md.#{fn}.png")==true + @manifest[:html] <<< +

QR code SiSU document metadata:

+

+ qrcode metadata +

+ +WOK + end + if FileTest.file?("#{pth}/qrc_title.#{fn}.png")==true + @manifest[:html] <<< +

QR code document title info:

+

+ qrcode title +

+ +WOK + end + end def source_tests if @md.fns =~/\.ssm\.sst$/ #% decide whether to extract and include requested/required documents req=@md.fns @@ -813,6 +840,7 @@ WOK WOK language_versions + qrc_image @manifest[:html] <<<
diff --git a/lib/sisu/v3/options.rb b/lib/sisu/v3/options.rb index 81d12db8..b5771590 100644 --- a/lib/sisu/v3/options.rb +++ b/lib/sisu/v3/options.rb @@ -309,6 +309,7 @@ module SiSU_commandline when /^--(?:po4a|pot?)$/; c=c+'P' when /^--(?:termsheet)$/; c=c+'T' when /^--(?:manifest)$/; c=c+'y' + when /^--(?:qrcode)$/; c=c+'Q' when /^--(?:sqlite)$/; c=c+'d' when /^--(?:pg|pg?sql|postgresql)$/; c=c+'D' when /^--(?:remote|rsync)$/; c=c+'R' @@ -551,6 +552,11 @@ module SiSU_commandline true else false end + act[:qrcode]=if cmd =~/Q/ \ + or mod.inspect =~/"--qrcode"/ + true + else false + end act[:manifest]=if cmd =~/y/ \ or mod.inspect =~/"--manifest"/ true diff --git a/lib/sisu/v3/qrcode.rb b/lib/sisu/v3/qrcode.rb new file mode 100644 index 00000000..0e9cad4a --- /dev/null +++ b/lib/sisu/v3/qrcode.rb @@ -0,0 +1,733 @@ +# encoding: utf-8 +=begin + + * Name: SiSU + + * Description: a framework for document structuring, publishing and search + + * Author: Ralph Amissah + + * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved. + + * License: GPL 3 or later: + + SiSU, a framework for document structuring, publishing and search + + Copyright (C) Ralph Amissah + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation, either version 3 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along with + this program. If not, see . + + If you have Internet connection, the latest version of the GPL should be + available at these locations: + + + + + + + + * SiSU uses: + * Standard SiSU markup syntax, + * Standard SiSU meta-markup syntax, and the + * Standard SiSU object citation numbering and system + + * Hompages: + + + + * Download: + + + * Ralph Amissah + + + + ** Description: summary of generated outputs and metadata + +=end +module SiSU_QRcode + require_relative 'sysenv' # sysenv.rb + include SiSU_Env + require_relative 'prog_text_translation' # prog_text_translation.rb + require_relative 'particulars' # particulars.rb + include SiSU_Particulars + require_relative 'html' # html.rb + require_relative 'param' # param.rb + include SiSU_Param + require_relative 'i18n' # i18n.rb + include SiSU_Viz + class Source + def initialize(opt) + @opt=opt + @particulars=SiSU_Particulars::Combined_singleton.instance.get_all(opt) + l=SiSU_Env::Standardise_language.new(@opt.lng).language + @doc_language=l[:n] + end + def read + begin + @env=SiSU_Env::Info_env.new(@opt.fns) + @md=SiSU_Param::Parameters.new(@opt).get + SiSU_Env::Info_skin.new(@md).select + xbrowser=@env.program.web_browser + browser=@env.program.console_web_browser + unless @opt.cmd =~/q/ + url_html="file://#{@md.file.output_path.manifest.dir}/#{@md.file.base_filename.manifest}" + @opt.cmd=~/[MVvz]/ \ + ? SiSU_Screen::Ansi.new(@opt.cmd,'QR code',"#{xbrowser} #{url_html}").green_hi_blue \ + : SiSU_Screen::Ansi.new(@opt.cmd,'QR code',"[#{@opt.f_pth[:lng_is]}] #{@opt.fns}").green_title_hi + SiSU_Screen::Ansi.new(@opt.cmd,"#{browser} #{url_html}").grey_tab if @opt.cmd =~/v/i + end + data=SiSU_HTML::Source::Html_environment.new(@particulars).tuned_file_instructions + Output_Info.new(@md).check_output(data) + rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + ensure + end + end + private + class Output_Info 0 + @manifest[:txt] << %{#{@translate.topic_register}:\n} +@sp=' ' + @md.topic_register_array.each do |t| + t.each_with_index do |st,i| + if st.class==Array + st.each do |v| + @manifest[:txt] << %{#{@sp*i}#{v}\n} + end + else @manifest[:txt] << %{#{@sp*i}#{st}\n} + end + end + end + end + if @md.fns + id,info=@translate.sourcefile,@md.fns + metadata(id,info) + end + if @md.en[:mismatch] > 0 + id,info='WARNING document error in endnote markup, number mismatch',"endnotes: #{@md.en[:note]} != endnote reference marks: #{@md.en[:mark]} (difference = #{@md.en[:mismatch]})" + metadata(id,info) + end + if @md.wc_words + id,info=@translate.word_count,@md.wc_words + metadata(id,info) + end + if @md.dgst + id,info="#{@translate.sourcefile_digest} (#{@dg})",@md.dgst[1] + metadata(id,info) + end + if @md.sc_number + id,info=@translate.sc_number,@md.sc_number + metadata(id,info) + end + if @md.sc_date + id,info=@translate.sc_date,"#{@md.sc_date} at #{@md.sc_time}" + metadata(id,info) + end + end + def check_output(data) + begin + id,file='','' + vz=SiSU_Env::Get_init.instance.skin + @f=SiSU_Env::SiSU_file.new(@md) #.base_filename + url=@f.output_path.base.url + @en_manifest=if @env.output_dir_structure.by_language_code? + "#{url}/en/manifest/#{@md.fnb}.html" + elsif @env.output_dir_structure.by_filetype? + "#{url}/manifest/#{@md.fnb}.#{lc}.html" + else + "#{url}/sisu_manifest.#{lc}.html" + end + @manifest[:txt] <<< Date: Tue, 26 Jul 2011 20:16:49 -0400 Subject: v3: param, manifest, qrcode, epub, added creator.editor field --- data/doc/sisu/CHANGELOG_v3 | 2 ++ lib/sisu/v3/epub_format.rb | 24 +++++++++++++++++++++++- lib/sisu/v3/manifest.rb | 5 +++++ lib/sisu/v3/param.rb | 21 +++++++++++++++++++++ lib/sisu/v3/qrcode.rb | 5 +++++ 5 files changed, 56 insertions(+), 1 deletion(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 89c0bf6b..47270aaa 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -20,6 +20,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.14.orig.tar.gz sisu_3.0.14-1.dsc sisu_3.0.14-1.debian.tar.gz + * param, manifest, qrcode, epub, added creator.editor field + * qrcode, sysenv, manifest, generate & add QR code images of metadata to manifest (using qrencode) (consider where and how else to use images) diff --git a/lib/sisu/v3/epub_format.rb b/lib/sisu/v3/epub_format.rb index 9f169f5e..6879c933 100644 --- a/lib/sisu/v3/epub_format.rb +++ b/lib/sisu/v3/epub_format.rb @@ -1057,6 +1057,28 @@ WOK %{\n #{x}} else '' end + editor=if defined? @md.creator.editor \ + and @md.creator.editor =~/\S+/ + m='' + @md.creator.editor_detail.each do |x| + surname=x[:the] \ + ? x[:the] \ + : '' + other_names=x[:others] \ + ? ', ' + x[:others] \ + : '' + m=(m.empty?) \ + ? (surname + other_names) \ + : (m + '; ' + surname + ', ' + other_names) + m.gsub!(//,'>') + m.gsub!(/<br(?: \/)?>/,';') + end + x=@md.creator.editor.dup + x.gsub!(//,'>') + x.gsub!(/<br(?: \/)?>/,'
') + %{\n #{x}} + else '' + end translator=if defined? @md.creator.translator \ and @md.creator.translator =~/\S+/ m='' @@ -1132,7 +1154,7 @@ WOK < #{@md.title.full} - #{author}#{translator}#{illustrator}#{language}#{date_published}#{subject}#{rights} + #{author}#{editor}#{translator}#{illustrator}#{language}#{date_published}#{subject}#{rights} ... urn:uuid:#{@md.dgst[1]} diff --git a/lib/sisu/v3/manifest.rb b/lib/sisu/v3/manifest.rb index c6db7f25..f94534a4 100644 --- a/lib/sisu/v3/manifest.rb +++ b/lib/sisu/v3/manifest.rb @@ -490,6 +490,11 @@ WOK id,info=@translate.author,@md.creator.author metadata(id,info) end + if defined? @md.creator.editor \ + and @md.creator.editor=~/\S+/ + id,info=@translate.editor,@md.creator.editor + metadata(id,info) + end if defined? @md.creator.contributor \ and @md.creator.contributor=~/\S+/ id,info=@translate.contributor,@md.creator.contributor diff --git a/lib/sisu/v3/param.rb b/lib/sisu/v3/param.rb index 2d2c22c0..c33bab75 100644 --- a/lib/sisu/v3/param.rb +++ b/lib/sisu/v3/param.rb @@ -300,6 +300,27 @@ module SiSU_Param names=name_format(s) names[:name_a_h] end + def editor + names=@h['editor'] \ + ? name_format(@h['editor']) \ + : nil + s=(names.class==Hash) \ + ? names[:name_str] \ + : nil + s=if s + l,n=Db[:col_name],'creator.editor' + validate_length(s,l,n) + else nil + end + end + def editor_detail + names=@h['editor'] \ + ? name_format(@h['editor']) \ + : nil + (names.class==Hash) \ + ? names[:name_a_h] \ + : nil + end def contributor names=@h['contributor'] \ ? name_format(@h['contributor']) \ diff --git a/lib/sisu/v3/qrcode.rb b/lib/sisu/v3/qrcode.rb index 0e9cad4a..b31bc7a5 100644 --- a/lib/sisu/v3/qrcode.rb +++ b/lib/sisu/v3/qrcode.rb @@ -485,6 +485,11 @@ WOK metadata(id,info) md_title_info(id,info) end + if defined? @md.creator.editor \ + and @md.creator.editor=~/\S+/ + id,info=@translate.editor,@md.creator.editor + metadata(id,info) + end if defined? @md.creator.contributor \ and @md.creator.contributor=~/\S+/ id,info=@translate.contributor,@md.creator.contributor -- cgit v1.2.3 From 399e6eaa0597b59b20135da362da894e09630e8b Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:17:56 -0400 Subject: v3: sql db, constants, cgi-sql, structure changed, creator.editor field added --- data/doc/sisu/CHANGELOG_v3 | 2 ++ lib/sisu/v3/cgi_sql_common.rb | 23 ++++++++++++++++------- lib/sisu/v3/constants.rb | 4 ++-- lib/sisu/v3/db_columns.rb | 29 +++++++++++++++++++++++++++++ lib/sisu/v3/db_create.rb | 2 ++ lib/sisu/v3/db_load_tuple.rb | 2 ++ 6 files changed, 53 insertions(+), 9 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 47270aaa..a8a43efd 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -22,6 +22,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.14.orig.tar.gz * param, manifest, qrcode, epub, added creator.editor field + * sql db, constants, cgi-sql, structure changed, creator editor field added + * qrcode, sysenv, manifest, generate & add QR code images of metadata to manifest (using qrencode) (consider where and how else to use images) diff --git a/lib/sisu/v3/cgi_sql_common.rb b/lib/sisu/v3/cgi_sql_common.rb index 8dce0743..5a2b9fde 100644 --- a/lib/sisu/v3/cgi_sql_common.rb +++ b/lib/sisu/v3/cgi_sql_common.rb @@ -138,7 +138,7 @@ module SiSU_CGI_sql search_field='' if checked_echo !~/\S/ @base,@search_field,@selected_db,@result_type,@checked_sql_limit,@checked_tip,@checked_stats,@checked_searched,@checked_url,@checked_case,@checked_echo,@checked_sql,@checked_all,@checked_none,@checked_selected,@checked_default,@search_note,@the_can=base,search_field,selected_db,result_type,checked_sql_limit,checked_tip,checked_stats,checked_searched,checked_url,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_selected,checked_default,search_note,the_can @tip=if checked_tip =~/\S/ - 'text:__; fulltxt:__; keywords:__; title:__; author:__; topic_register:__; subject:__; description:__; publisher:__; contributor:__; date:__; type:__; format:__; identifier:__; source:__; language:__; relation:__; coverage:__; rights:__; comment:__; abstract:__; filename:__;
' + 'text:__; fulltxt:__; keywords:__; title:__; author:__; topic_register:__; subject:__; description:__; publisher:__; editor:__; contributor:__; date:__; type:__; format:__; identifier:__; source:__; language:__; relation:__; coverage:__; rights:__; comment:__; abstract:__; filename:__;
' else '' end end @@ -231,10 +231,10 @@ module SiSU_CGI_sql def search_request <<-'WOK_SQL' class Search_request #% search_for - attr_accessor :text1,:fulltext,:keywords,:title,:author,:topic_register,:subject,:description,:publisher,:contributor,:date,:type,:format,:identifier,:source,:language,:relation,:coverage,:rights,:comment,:abstract,:owner,:date_created,:date_issued,:date_modified,:date_available,:date_valid,:filename + attr_accessor :text1,:fulltext,:keywords,:title,:author,:topic_register,:subject,:description,:publisher,:editor,:contributor,:date,:type,:format,:identifier,:source,:language,:relation,:coverage,:rights,:comment,:abstract,:owner,:date_created,:date_issued,:date_modified,:date_available,:date_valid,:filename def initialize(search_field='',q='') @search_field,@q=search_field,q - @text1=@fulltext=@keywords=@title=@author=@topic_register=@subject=@description=@publisher=@contributor=@date=@type=@format=@identifier=@source=@language=@relation=@coverage=@rights=@comment=@abstract=@owner=@date_created=@date_issued=@date_modified=@date_available=@date_valid=@filename='' + @text1=@fulltext=@keywords=@title=@author=@topic_register=@subject=@description=@publisher=@editor=@contributor=@date=@type=@format=@identifier=@source=@language=@relation=@coverage=@rights=@comment=@abstract=@owner=@date_created=@date_issued=@date_modified=@date_available=@date_valid=@filename='' if @search_field=~/\S/ @text1=text_to_match('text:') @fulltext=text_to_match('fulltxt:') @@ -244,6 +244,7 @@ module SiSU_CGI_sql @subject=text_to_match('subj(?:ect)?:') # DublinCore 3 - subject @description=text_to_match('description:') # DublinCore 4 - description @publisher=text_to_match('pub(?:lisher)?:') # DublinCore 5 - publisher + @editor=text_to_match('editor:') @contributor=text_to_match('contributor:') # DublinCore 6 - contributor @date=text_to_match('date:') # DublinCore 7 - date dd-mm-yy @type=text_to_match('type:') # DublinCore 8 - type @@ -275,6 +276,7 @@ module SiSU_CGI_sql @subject=q['sj'] if q['sj']=~/\S/ @description=q['dsc'] if q['dsc']=~/\S/ @publisher=q['pb'] if q['pb']=~/\S/ + @editor=q['cntr'] if q['cntr']=~/\S/ @contributor=q['cntr'] if q['cntr']=~/\S/ @date=q['dt'] if q['dt']=~/\S/ @type=q['ty'] if q['ty']=~/\S/ @@ -381,6 +383,11 @@ module SiSU_CGI_sql search[:text] << st[:search] search[:endnotes] << st[:search] end + st=Dbi_search_string.new('metadata_and_text.creator_editor',search_for.editor,q['cntr'],cse).string + if st[:flag] + search[:text] << st[:search] + search[:endnotes] << st[:search] + end st=Dbi_search_string.new('metadata_and_text.creator_contributor',search_for.contributor,q['cntr'],cse).string if st[:flag] search[:text] << st[:search] @@ -709,6 +716,7 @@ module SiSU_CGI_sql sj='&sj=' + CGI.escape(@search_for.subject) if @search_for.subject=~/\S/ dsc='&dsc=' + CGI.escape(@search_for.description) if @search_for.description=~/\S/ pb='&pb=' + CGI.escape(@search_for.publisher) if @search_for.publisher=~/\S/ + edt='&edt=' + CGI.escape(@search_for.editor) if @search_for.editor=~/\S/ cntr='&cntr=' + CGI.escape(@search_for.contributor) if @search_for.contributor=~/\S/ dt='&dt=' + CGI.escape(@search_for.date) if @search_for.date=~/\S/ ty='&ty=' + CGI.escape(@search_for.type) if @search_for.type=~/\S/ @@ -727,8 +735,8 @@ module SiSU_CGI_sql dtv='&dtv=' + CGI.escape(@search_for.date_valid) if @search_for.date_valid=~/\S/ fns='&fns=' + CGI.escape(@search_for.filename) if @search_for.filename=~/\S/ @@canned_search_url=(checked_all =~/checked/) \ - ? "#{@base}?#{s1}#{ft}#{key}#{ti}#{au}#{tr}#{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" \ - : "#{@base}?#{s1}#{ft}#{key}#{ti}#{au}#{tr}#{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']}" + ? "#{@base}?#{s1}#{ft}#{key}#{ti}#{au}#{tr}#{sj}#{dsc}#{pb}#{edt}#{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" \ + : "#{@base}?#{s1}#{ft}#{key}#{ti}#{au}#{tr}#{sj}#{dsc}#{pb}#{edt}#{cntr}#{dt}#{ty}#{id}#{src}#{lang}#{rel}#{cov}#{cr}#{co}#{ab}#{dtc}#{dti}#{dtm}#{dta}#{dtv}#{fns}&db=#{cgi['db']}&view=#{cgi['view']}" mod=ft=~/\S+/ ? (ft.gsub(/ft/,'s1')) : s1 @canned_base_url="#{@base}?#{mod}&db=#{cgi['db']}" if checked_case=~/\S/ @@ -762,12 +770,13 @@ module SiSU_CGI_sql green=%{} canned_search_url_txt=CGI.escapeHTML(@@canned_search_url) the_can=%{#{canned_note} #{canned_search_url_txt}
} - p_text=p_fulltext=p_keywords=p_title=p_author=p_topic_register=p_subject=p_description=p_publisher=p_contributor=p_date=p_type=p_format=p_identifier=p_source=p_language=p_relation=p_coverage=p_rights=p_comment=p_abstract=p_filename='' + p_text=p_fulltext=p_keywords=p_title=p_author=p_topic_register=p_subject=p_description=p_publisher=p_editor=p_contributor=p_date=p_type=p_format=p_identifier=p_source=p_language=p_relation=p_coverage=p_rights=p_comment=p_abstract=p_filename='' p_filename=%{filename: #{green}#{@search_for.filename}

} if @search_for.filename =~/\S+/ p_text=%{text: #{green}#{@search_for.text1}
} if @search_for.text1 =~/\S+/ p_fulltext=%{fulltxt: #{green}#{@search_for.fulltext}
} if @search_for.fulltext =~/\S+/ p_title=%{title: #{green}#{@search_for.title}
} if @search_for.title =~/\S+/ p_author=%{author: #{green}#{@search_for.author}
} if @search_for.author =~/\S+/ + p_editor=%{editor: #{green}#{@search_for.editor}
} if @search_for.editor=~/\S+/ p_contributor=%{contributor: #{green}#{@search_for.contributor}
} if @search_for.contributor =~/\S+/ p_date=%{date: #{green}#{@search_for.date}
} if @search_for.date =~/\S+/ p_rights=%{rights: #{green}#{@search_for.rights}
} if @search_for.rights =~/\S+/ @@ -789,7 +798,7 @@ module SiSU_CGI_sql database: #{green}#{@db}; selected view: #{green}#{cgi['view']} search string: "#{green}#{analyze_format}"
- #{p_text} #{p_fulltext} #{p_keywords} #{p_title} #{p_author} #{p_topic_register} #{p_subject} #{p_description} #{p_publisher} #{p_contributor} #{p_date} #{p_type} #{p_format} #{p_identifier} #{p_source} #{p_language} #{p_relation} #{p_coverage} #{p_rights} #{p_comment} #{p_abstract} #{p_filename} + #{p_text} #{p_fulltext} #{p_keywords} #{p_title} #{p_author} #{p_topic_register} #{p_subject} #{p_description} #{p_publisher} #{p_editor} #{p_contributor} #{p_date} #{p_type} #{p_format} #{p_identifier} #{p_source} #{p_language} #{p_relation} #{p_coverage} #{p_rights} #{p_comment} #{p_abstract} #{p_filename} WOK #eg = %{canned search e.g.:
#{url}
find: #{analyze}
database: #{database}} diff --git a/lib/sisu/v3/constants.rb b/lib/sisu/v3/constants.rb index ae2a3b18..918a581f 100644 --- a/lib/sisu/v3/constants.rb +++ b/lib/sisu/v3/constants.rb @@ -151,8 +151,8 @@ Px[:lv3]= '=' Px[:lv4]= '-' Px[:lv5]= '.' Px[:lv6]= '.' -Db[:name_prefix]="SiSU#{SiSU_version_dir}d_" -Db[:name_prefix_db]="sisu_#{SiSU_version_dir}d_" +Db[:name_prefix]="SiSU#{SiSU_version_dir}e_" +Db[:name_prefix_db]="sisu_#{SiSU_version_dir}e_" Db[:col_title]=800 Db[:col_title_part]=400 Db[:col_title_edition]=10 diff --git a/lib/sisu/v3/db_columns.rb b/lib/sisu/v3/db_columns.rb index d8a6f3cf..99118f92 100644 --- a/lib/sisu/v3/db_columns.rb +++ b/lib/sisu/v3/db_columns.rb @@ -273,6 +273,7 @@ module SiSU_DB_columns #% creator @creator: :author: + :editor: :contributor: :illustrator: :photographer: @@ -353,6 +354,34 @@ module SiSU_DB_columns end self end + def creator_editor + def name + 'creator_editor' + end + def create_column + "#{name} VARCHAR(#{Db[:col_name]}) NULL," + end + def column_comment + %{COMMENT ON COLUMN metadata_and_text.#{name} + IS 'metadata document editor name(s)';} + end + def tuple + t=if defined? @md.creator.editor_detail \ + and @md.creator.editor_detail.class==Array \ + and @md.creator.editor_detail.length > 0 + txt=@md.creator.editor_detail #dc + txt='' + @md.creator.editor_detail.each do |h| + txt=txt + %{#{h[:the]}, #{h[:others]}; } + end + txt.gsub!(/[;, ]+\s*$/,'') + special_character_escape(txt) + ["#{name}, ","'#{txt}', "] + else ['',''] + end + end + self + end def creator_contributor # DublinCore 6 - contributor def name 'creator_contributor' diff --git a/lib/sisu/v3/db_create.rb b/lib/sisu/v3/db_create.rb index 35750c4b..1804410a 100644 --- a/lib/sisu/v3/db_create.rb +++ b/lib/sisu/v3/db_create.rb @@ -116,6 +116,7 @@ module SiSU_DB_create #{column.creator_author.create_column} #{column.creator_author_honorific.create_column} #{column.creator_author_nationality.create_column} + #{column.creator_editor.create_column} #{column.creator_contributor.create_column} #{column.creator_illustrator.create_column} #{column.creator_photographer.create_column} @@ -375,6 +376,7 @@ module SiSU_DB_create %{#{column.creator_author.column_comment}}, %{#{column.creator_author_honorific.column_comment}}, %{#{column.creator_author_nationality.column_comment}}, + %{#{column.creator_editor.column_comment}}, %{#{column.creator_contributor.column_comment}}, %{#{column.creator_illustrator.column_comment}}, %{#{column.creator_photographer.column_comment}}, diff --git a/lib/sisu/v3/db_load_tuple.rb b/lib/sisu/v3/db_load_tuple.rb index b8408f22..f7f39c08 100644 --- a/lib/sisu/v3/db_load_tuple.rb +++ b/lib/sisu/v3/db_load_tuple.rb @@ -132,6 +132,7 @@ module SiSU_DB_tuple #{@tp.column.creator_author.tuple[0]} #{@tp.column.creator_author_honorific.tuple[0]} #{@tp.column.creator_author_nationality.tuple[0]} +#{@tp.column.creator_editor.tuple[0]} #{@tp.column.creator_contributor.tuple[0]} #{@tp.column.creator_illustrator.tuple[0]} #{@tp.column.creator_photographer.tuple[0]} @@ -216,6 +217,7 @@ tid) #{@tp.column.creator_author.tuple[1]} #{@tp.column.creator_author_honorific.tuple[1]} #{@tp.column.creator_author_nationality.tuple[1]} +#{@tp.column.creator_editor.tuple[1]} #{@tp.column.creator_contributor.tuple[1]} #{@tp.column.creator_illustrator.tuple[1]} #{@tp.column.creator_photographer.tuple[1]} -- cgit v1.2.3 From c77953fb0518bf296bc88208c5cec9fabff3bb89 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:20:22 -0400 Subject: v3: vim sisu syntax highlighting * markers for hanging indent added * added header for @creator: :editor: * minor comments added * deletion of an unused tag --- data/doc/sisu/CHANGELOG_v3 | 6 + .../v3/conf/editor-syntax-etc/vim/syntax/sisu.vim | 138 ++++++++++++++------- 2 files changed, 101 insertions(+), 43 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index a8a43efd..396be68f 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -24,6 +24,12 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.14.orig.tar.gz * sql db, constants, cgi-sql, structure changed, creator editor field added + * vim sisu syntax highlighting + * markers for hanging indent added + * added header for @creator: :editor: + * minor comments added + * deletion of an unused tag + * qrcode, sysenv, manifest, generate & add QR code images of metadata to manifest (using qrencode) (consider where and how else to use images) diff --git a/data/sisu/v3/conf/editor-syntax-etc/vim/syntax/sisu.vim b/data/sisu/v3/conf/editor-syntax-etc/vim/syntax/sisu.vim index 00c02a34..7416f809 100644 --- a/data/sisu/v3/conf/editor-syntax-etc/vim/syntax/sisu.vim +++ b/data/sisu/v3/conf/editor-syntax-etc/vim/syntax/sisu.vim @@ -1,7 +1,7 @@ " SiSU Vim syntax file " SiSU Maintainer: Ralph Amissah -" SiSU Markup: SiSU (sisu-3.0.13) -" Last Change: 2011-06-26 +" SiSU Markup: SiSU (sisu-3.0.14) +" Last Change: 2011-07-24 " URL: "(originally looked at Ruby Vim by Mirko Nasato) @@ -12,9 +12,10 @@ elseif exists("b:current_syntax") else endif -" Errors: +"% "Errors: syn match sisu_error contains=sisu_link,sisu_error_wspace "" -" Markers Identifiers: + +"% "Markers Identifiers: if !exists("sisu_no_identifiers") syn match sisu_mark_endnote "\~^" syn match sisu_break contains=@NoSpell " \\\\\( \|$\)" @@ -35,14 +36,18 @@ if !exists("sisu_no_identifiers") syn match sisu_require contains=@NoSpell "^<<\s*[a-zA-Z0-9^._-]\+\.ss[it]$" syn match sisu_require contains=@NoSpell "^<<{[a-zA-Z0-9^._-]\+\.ss[it]}$" syn match sisu_structure "^:A\~$" + +"% "Document Sub Headers: syn match sisu_sub_header_title "^\s\+:\(subtitle\|short\|edition\|language\|lang_char\|note\):\s" "group=sisu_header_content - syn match sisu_sub_header_creator "^\s\+:\(author\|contributor\|illustrator\|photographer\|translator\|digitized_by\|prepared_by\|audio\|video\):\s" " &hon &institution + syn match sisu_sub_header_creator "^\s\+:\(author\|editor\|contributor\|illustrator\|photographer\|translator\|digitized_by\|prepared_by\|audio\|video\):\s" " &hon &institution syn match sisu_sub_header_rights "^\s\+:\(copyright\|text\|translation\|illustrations\|photographs\|preparation\|digitization\|audio\|video\|license\|all\):\s" " access_rights license syn match sisu_sub_header_classify "^\s\+:\(topic_register\|coverage\|format\|identifier\|keywords\|relation\|subject\|type\|dewey\|loc\|oclc\|pg\|isbn\):\s" syn match sisu_sub_header_date "^\s\+:\(added_to_site\|available\|created\|issued\|modified\|published\|valid\|translated\|original_publication\):\s" syn match sisu_sub_header_original "^\s\+:\(publisher\|date\|language\|lang_char\|institution\|nationality\|source\):\s" syn match sisu_sub_header_make "^\s\+:\(headings\|num_top\|breaks\|language\|italics\|bold\|emphasis\|plaintext_wrap\|texpdf_font\|skin\|stamp\|promo\|ad\|manpage\):\s" syn match sisu_sub_header_notes "^\s\+:\(abstract\|comment\|description\|history\|prefix\|prefix_[ab]\|suffix\):\s" + +"% "semantic markers: (ignore) syn match sisu_sem_marker ";{\|};[a-z._]*[a-z]" syn match sisu_sem_marker_block "\([a-z][a-z._]*\|\):{\|}:[a-z._]*[a-z]" syn match sisu_sem_ex_marker ";\[\|\];[a-z._]*[a-z]" @@ -53,77 +58,123 @@ if !exists("sisu_no_identifiers") syn match sisu_sem_ex_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";\[[^}].\{-}\];[a-z]\+" endif -"URLs Numbers And ASCII Codes: +"% "URLs Numbers And ASCII Codes: syn match sisu_number "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>" syn match sisu_number "?\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\w\)" -"Tuned Error: (is error if not already matched) +"% "Tuned Error: (is error if not already matched) syn match sisu_error contains=sisu_error "[\~/\*!_]{\|}[\~/\*!_]" syn match sisu_error contains=sisu_error "]" -"Simple Paired Enclosed Markup: +"% "Simple Paired Enclosed Markup: "url/link syn region sisu_link contains=sisu_error,sisu_error_wspace matchgroup=sisu_action start="^<<\s*|[a-zA-Z0-9^._-]\+|@|[a-zA-Z0-9^._-]\+|"rs=s+2 end="$" -"header + +"% "Document Header: +" title syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_title matchgroup=sisu_header start="^[@]title:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" creator syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_creator matchgroup=sisu_header start="^[@]creator:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" dates syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_date matchgroup=sisu_header start="^[@]date:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" publisher syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_publisher matchgroup=sisu_header start="^[@]publisher:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" rights syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_rights matchgroup=sisu_header start="^[@]rights:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" classify document syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_classify matchgroup=sisu_header start="^[@]classify:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" original language (depreciated) syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_original matchgroup=sisu_header start="^[@]original:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" notes syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_notes matchgroup=sisu_header start="^[@]notes:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" links of interest syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_linked,sisu_sub_header_links matchgroup=sisu_header start="^[@]links:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" make, processing instructions syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_make matchgroup=sisu_header start="^[@]make:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" -"headings -syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace matchgroup=sisu_structure start="^\([1-8]\|:\?[A-C]\)\~\(\S\+\|[^-]\)" end="$" -"block/group text -syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^table{.\+" end="}table" -syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^{\(t\|table\)\(\~h\)\?\(\sc[0-9]\+;\)\?[0-9; ]*}" end="\n$" + +"% "Headings: +syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace matchgroup=sisu_structure start="^\([1-8]\|:\?[A-C]\)\~\(\S\+\|[^-]\)" end="$" + +"% "Block Group Text: +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^table{.\+" end="}table" +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^{\(t\|table\)\(\~h\)\?\(\sc[0-9]\+;\)\?[0-9; ]*}" end="\n$" +" block, group, poem, alt syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^\(block\|group\|poem\|alt\){" end="^}\(block\|group\|poem\|alt\)" +" code syn region sisu_content_alt contains=sisu_error matchgroup=sisu_contain start="^code{" end="^}code" -"endnotes -syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker matchgroup=sisu_mark_endnote start="\~{[*+]*" end="}\~" skip="\n" -syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker matchgroup=sisu_mark_endnote start="\~\[[*+]*" end="\]\~" skip="\n" -syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n$" -"links and images -syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="}\(https\?:/\/\|:\|\.\.\/\|#\)\S\+" oneline -syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="\[[1-5][sS]*\]}\S\+\.ss[tm]" oneline -syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}image" oneline -"some line operations -syn region sisu_control contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace matchgroup=sisu_control start="\(\(^\| \)!_ \|<:b>\)" end="$" -syn region sisu_normal contains=sisu_fontface,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\) " end="$" + +"% "Endnotes: +" regular endnote or asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker matchgroup=sisu_mark_endnote start="\~{[*+]*" end="}\~" skip="\n" +" numbered asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker matchgroup=sisu_mark_endnote start="\~\[[*+]*" end="\]\~" skip="\n" +" endnote content marker (for binary content marking) +syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n$" + +"% "Links And Images: +" image with url link (and possibly footnote of url) +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="}\(https\?:/\/\|:\|\.\.\/\|#\)\S\+" oneline +" sisu outputs, short notation +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="\[[1-5][sS]*\]}\S\+\.ss[tm]" oneline +" image +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}image" oneline + +"% "Some Line Operations: +" bold line +syn region sisu_bold contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^!_ " end=" \\\\\|$" +" indent and bullet paragraph +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\) " end="$" +" indent and bullet (bold start) paragraph +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\)!_\? " end=" \\\\\|$" +" hanging indent paragraph [proposed] +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9] " end="$" +" hanging indent (bold start/ definition) paragraph [proposed] +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9]!_\? " end=" \\\\\|$" +" list numbering syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^\(#[ 1]\|_# \)" end="$" -"font face curly brackets + +"% "Font Face Curly Brackets: "syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_sem start="\S\+:{" end="}:[^<>,.!?:; ]\+" oneline +" book index: syn region sisu_index matchgroup=sisu_index_block start="^={" end="}" -syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\*{" end="}\*" -syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="!{" end="}!" -syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="_{" end="}_" -syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="/{" end="}/" -syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="+{" end="}+" -syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\^{" end="}\^" -syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start=",{" end="}," -syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="#{" end="}#" +" emphasis: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\*{" end="}\*" +" bold: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="!{" end="}!" +" underscore: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="_{" end="}_" +" italics: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="/{" end="}/" +" added: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="+{" end="}+" +" superscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\^{" end="}\^" +" subscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start=",{" end="}," +" monospace: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="#{" end="}#" +" strikethrough: syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-" -syn region sisu_html contains=sisu_error contains=sisu_strikeout matchgroup=sisu_contain start="" end="" oneline -"single words bold italicise etc. "workon -syn region sisu_control contains=sisu_error matchgroup=sisu_control start="\([ (]\|^\)\*[^\|{\n\~\\]"hs=e-1 end="\*"he=e-0 skip="[a-zA-Z0-9']" oneline + +"% "Single Words Bold Italicise Etc: (depreciated) +syn region sisu_bold contains=sisu_error matchgroup=sisu_bold start="\([ (]\|^\)\*[^\|{\n\~\\]"hs=e-1 end="\*"he=e-0 skip="[a-zA-Z0-9']" oneline syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\([ ]\|^\)/[^{ \|\n\\]"hs=e-1 end="/\[ \.\]" skip="[a-zA-Z0-9']" oneline "misc syn region sisu_identifier contains=sisu_error matchgroup=sisu_fontface start="\^[^ {\|\n\\]"rs=s+1 end="\^[ ,.;:'})\\\n]" skip="[a-zA-Z0-9']" oneline -"Expensive Mode: +"% "Expensive Mode: if !exists("sisu_no_expensive") else " not Expensive syn region sisu_content_alt matchgroup=sisu_control start="^\s*def\s" matchgroup=NONE end="[?!]\|\>" skip="\.\|\(::\)" oneline endif " Expensive? -"Headers And Headings: (Document Instructions) +"% "Headers And Headings: (Document Instructions) syn match sisu_control contains=sisu_error,sisu_error_wspace "4\~! \S\+" syn region sisu_markpara contains=sisu_error,sisu_error_wspace start="^=begin" end="^=end.*$" -"Errors: +"% "Errors: syn match sisu_error_wspace contains=sisu_error_wspace "^\s\+[^:]" syn match sisu_error_wspace contains=sisu_error_wspace "\s\s\+" syn match sisu_error_wspace contains=sisu_error_wspace "\s\+$" @@ -147,16 +198,17 @@ syn match sisu_error contains=sisu_error "" syn match sisu_error contains=sisu_error,sisu_match,sisu_strikeout,sisu_contain,sisu_content_alt,sisu_mark,sisu_break,sisu_number "<[a-zA-Z\/]\+>" syn match sisu_error "/\?<\([biu]\)>[^()]\{-}\n$" -"Error Exceptions: +"% "Error Exceptions: syn match sisu_control "\n$" "contains=ALL -syn match sisu_control " //" +"syn match sisu_control " //" syn match sisu_error "%{" syn match sisu_error "
_\?https\?:\S\+\|_\?https\?:\S\+
" syn match sisu_error "[><]_\?https\?:\S\+\|_\?https\?:\S\+[><]" syn match sisu_comment "^%\{1,2\}.\+" -"Definitions Default Highlighting: +"% "Definitions Default Highlighting: hi def link sisu_normal Normal +hi def link sisu_bold Statement hi def link sisu_header PreProc hi def link sisu_header_content Normal hi def link sisu_sub_header_title Statement -- cgit v1.2.3 From afa76471f128da7a04a89b5ee4b88b846de74c47 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:21:32 -0400 Subject: v3: emacs syntax highlighting sisu-mode.el * markers for hanging indent added * line-break --- data/doc/sisu/CHANGELOG_v3 | 4 ++++ data/sisu/v3/conf/editor-syntax-etc/emacs/sisu-mode.el | 12 ++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 396be68f..740611a8 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -30,6 +30,10 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.14.orig.tar.gz * minor comments added * deletion of an unused tag + * emacs sisu-mode.el + * markers for hanging indent added + * line-break + * qrcode, sysenv, manifest, generate & add QR code images of metadata to manifest (using qrencode) (consider where and how else to use images) diff --git a/data/sisu/v3/conf/editor-syntax-etc/emacs/sisu-mode.el b/data/sisu/v3/conf/editor-syntax-etc/emacs/sisu-mode.el index 8ea5c023..84e7cbef 100644 --- a/data/sisu/v3/conf/editor-syntax-etc/emacs/sisu-mode.el +++ b/data/sisu/v3/conf/editor-syntax-etc/emacs/sisu-mode.el @@ -251,15 +251,23 @@ ;;indented text (cons "^_[1-9] " 'general-font-lock-red1) + (cons "^_[1-9]! " 'general-font-lock-red1) + + ;hanging indented text [proposed enable when implemented] + (cons "^__[1-9] " 'general-font-lock-red1) + (cons "^_[0-9]_[0-9] " 'general-font-lock-red1) + (cons "^__[1-9]! " 'general-font-lock-red1) + (cons "^_[0-9]_[0-9]! " 'general-font-lock-red1) ;;url (cons "\\(^\\|[ ]\\)http:[/][/][^ \t\n\r<]+" 'general-font-lock-blue2) -;; \\|\$ - ;; Comment Lines (cons "^% .*" 'general-font-lock-blue1) + ;; line break + (cons " \\\\\\\\ " 'general-font-lock-red1) + ;; line break (depreciated) (cons "
" 'general-font-lock-red1) ;; Section titles -- cgit v1.2.3 From 5e292103d5da448844c7c5bc38b920874d895107 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:22:49 -0400 Subject: v3: dal, indent, control of first line of indent & rest of paragraph * implements hanging indent, and possibility to set first line step indent * __[1-9] hanging indent (initial indent 0); paragraph text indent [1-9] * _[0-9]?_[1-9] initial indent; paragraph text indent * __[1-9]! bold words \\ part of hanging indent paragraph text --- data/doc/sisu/CHANGELOG_v3 | 20 +++++++++++++ lib/sisu/v3/dal_doc_objects.rb | 14 +++++---- lib/sisu/v3/dal_doc_str.rb | 66 +++++++++++++++++++++++++++++++++++++----- lib/sisu/v3/dal_syntax.rb | 20 +++++++++++-- 4 files changed, 103 insertions(+), 17 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 740611a8..56e737bc 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -20,6 +20,26 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.14.orig.tar.gz sisu_3.0.14-1.dsc sisu_3.0.14-1.debian.tar.gz + * hanging indent partially implemented, added markup possibilities + + __[1-9] hanging indent (initial indent 0); paragraph text indent [1-9] + + _[0-9]?_[1-9] initial indent; paragraph text indent + + * done: dal; + not done: , plaintext, html, xhtml, xml sax, xml dom, epub, pdf, odf, + man, info + check: po4a, html_lite (used in sql search results) + * syntax highlighting done: vim (sisu.vim), emacs (sisu-mode.el) + + * indent added bold words markup syntax (_[1-9]!) (_[0-9]?_[1-9]!) + for indents + + __[1-9]! bold words + part of hanging indent paragraph text + + __[1-9]! bold words \\ part of hanging indent paragraph text + * param, manifest, qrcode, epub, added creator.editor field * sql db, constants, cgi-sql, structure changed, creator editor field added diff --git a/lib/sisu/v3/dal_doc_objects.rb b/lib/sisu/v3/dal_doc_objects.rb index ad5f8bb7..8a330f13 100644 --- a/lib/sisu/v3/dal_doc_objects.rb +++ b/lib/sisu/v3/dal_doc_objects.rb @@ -167,10 +167,10 @@ module SiSU_document_structure end end class Object_para - attr_accessor :obj,:is,:tags,:of,:name,:idx,:bullet_,:indent,:ocn,:odv,:osp,:parent,:note_,:image_,:ocn_,:digest,:tmp + attr_accessor :obj,:is,:tags,:of,:name,:idx,:bullet_,:indent,:hang,:ocn,:odv,:osp,:parent,:note_,:image_,:ocn_,:digest,:tmp def initialize @of='para' - @is=@obj=@name=@idx=@bullet_=@indent=@size=@ocn=@odv=@osp=@parent=@note_=@image_=@ocn_=@digest=@tmp=nil + @is=@obj=@name=@idx=@bullet_=@indent=@hang=@size=@ocn=@odv=@osp=@parent=@note_=@image_=@ocn_=@digest=@tmp=nil @tags=[] end def paragraph(h,o=nil) @@ -185,6 +185,7 @@ module SiSU_document_structure osp= h[:osp] || ((defined? o.osp) ? o.osp : nil) parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent] indent= h[:indent].to_s || ((defined? o.indent) ? o.indent.to_s : nil) #Integer, indent level + hang= h[:hang].to_s || ((defined? o.hang) ? o.hang.to_s : nil) #Integer, hanging indent level bullet_=h[:bullet_] || ((defined? o.bullet_) ? o.bullet_ : false) #Bool, bulleted? note_= h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization) image_= h[:image_] || ((defined? o.image_) ? o.image_ : false) #Bool, images? (processing optimization) @@ -193,7 +194,7 @@ module SiSU_document_structure end digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5 tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use - @of,@is,@name,@tags,@obj,@indent,@bullet_,@idx,@ocn,@odv,@osp,@parent,@image_,@note_,@ocn_,@digest,@tmp=of,is,name,tags,obj,indent,bullet_,idx,ocn,odv,osp,parent,image_,note_,ocn_,digest,tmp + @of,@is,@name,@tags,@obj,@indent,@hang,@bullet_,@idx,@ocn,@odv,@osp,@parent,@image_,@note_,@ocn_,@digest,@tmp=of,is,name,tags,obj,indent,hang,bullet_,idx,ocn,odv,osp,parent,image_,note_,ocn_,digest,tmp self end def docinfo(h,o=nil) @@ -208,6 +209,7 @@ module SiSU_document_structure osp= h[:osp] || ((defined? o.osp) ? o.osp : nil) parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent] indent= nil #Integer, indent level + hang= nil #Integer, indent level bullet_=false #Bool, bulleted? note_= false #Bool, endnotes/footnotes? (processing optimization) image_= h[:image_] || ((defined? o.image_) ? o.image_ : false) #Bool, images? (processing optimization) @@ -216,7 +218,7 @@ module SiSU_document_structure end digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5 tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use - @of,@is,@name,@tags,@obj,@indent,@bullet_,@idx,@ocn,@odv,@osp,@parent,@image_,@note_,@ocn_,@digest,@tmp=of,is,name,tags,obj,indent,bullet_,idx,ocn,odv,osp,parent,image_,note_,ocn_,digest,tmp + @of,@is,@name,@tags,@obj,@indent,@hang,@bullet_,@idx,@ocn,@odv,@osp,@parent,@image_,@note_,@ocn_,@digest,@tmp=of,is,name,tags,obj,indent,hang,bullet_,idx,ocn,odv,osp,parent,image_,note_,ocn_,digest,tmp self end end @@ -325,10 +327,10 @@ module SiSU_document_structure end end class Object_table - attr_accessor :obj,:is,:of,:lv,:tags,:name,:idx,:indent,:size,:ocn,:number,:head_,:cols,:widths,:odv,:osp,:parent,:note_,:ocn_,:digest,:tmp + attr_accessor :obj,:is,:of,:lv,:tags,:name,:idx,:indent,:hang,:size,:ocn,:number,:head_,:cols,:widths,:odv,:osp,:parent,:note_,:ocn_,:digest,:tmp def initialize @of='block' - @is=@obj=@lv=@name=@idx=@indent=@size=@ocn,@number,@head_,@cols,@widths=@odv=@osp=@parent=@note_=@ocn_=@digest=@tmp=nil + @is=@obj=@lv=@name=@idx=@indent=@hang=@size=@ocn,@number,@head_,@cols,@widths=@odv=@osp=@parent=@note_=@ocn_=@digest=@tmp=nil @tags=[] end def table(h,o=nil) diff --git a/lib/sisu/v3/dal_doc_str.rb b/lib/sisu/v3/dal_doc_str.rb index ed289015..52425437 100644 --- a/lib/sisu/v3/dal_doc_str.rb +++ b/lib/sisu/v3/dal_doc_str.rb @@ -92,8 +92,36 @@ module SiSU_document_structure_extract def bullet_test(str) bool=((str=~/\*/) ? true : false) end - def indent_test(str) - num=((str=~/^_([1-9])/) ? $1 : 0) + def hang_and_indent_test(str) + hang_indent=if str=~/^_([1-9])[^_]/ + [$1,$1] + elsif str=~/^__([1-9])/ + [0,$1] + elsif str=~/^_([0-9])_([0-9])/ + [$1,$2] + else + [0,0] + end + hang,indent=hang_indent[0],hang_indent[1] + [hang,indent] + end + def hang_and_indent_def_test(str1,str2) + hang_indent=if str1=~/^_([1-9])[^_]/ + [$1,$1] + elsif str1=~/^__([1-9])/ + [0,$1] + elsif str1=~/^_([0-9])_([0-9])/ + [$1,$2] + else + [0,0] + end + obj=if str2 =~/^(.+?)\s+\\\\(?:\s+|\n)/ + str2.gsub(/^(.+?)(\s+\\\\(?:\s+|\n))/,"#{Mx[:fa_bold_o]}\\1#{Mx[:fa_bold_c]}\\2") + else + str2.gsub(/^(.+?)\n/,"#{Mx[:fa_bold_o]}\\1#{Mx[:fa_bold_c]}\n") + end + hang,indent=hang_indent[0],hang_indent[1] + [hang,indent,obj] end def endnote_test?(str) bool=((str=~/~\{.+?\}~|~\[.+?\]~/) ? true : false) @@ -171,16 +199,37 @@ module SiSU_document_structure_extract SiSU_document_structure::Object_heading.new.heading(h) else nil end - when /^(?:_[1-9]|_[1-9]?\*)\s+/ #indented and/or bullet paragraph - t_o=if t_o=~/^(_(?:[1-9]?\*|[1-9])\s+)(.+)/m + when /^_(?:[1-9]!?|[1-9]?\*)\s+/ #indented and/or bullet paragraph + t_o=if t_o=~/^(_(?:[1-9]?\*|[1-9]!?)\s+)(.+)/m tst,obj=$1,$2 - indent=indent_test(tst) + if t_o=~/^_[1-9]!\s+.+/m + hang,indent,obj=hang_and_indent_def_test(tst,obj) + else + hang,indent=hang_and_indent_test(tst) + end bullet=bullet_test(tst) image=image_test(obj) note=endnote_test?(obj) obj,tags=extract_tags(obj) unless obj=~/\A\s*\Z/m - h={ bullet_: bullet, indent: indent, obj: obj, idx: idx, note_: note, image_: image, tags: tags } + h={ bullet_: bullet, hang: hang, indent: indent, obj: obj, idx: idx, note_: note, image_: image, tags: tags } + SiSU_document_structure::Object_para.new.paragraph(h) + end + else nil + end + when /^_[0-9]?_[0-9]!?\s+/ #hanging indent paragraph + t_o=if t_o=~/^(_[0-9]?_[0-9]!?\s+)(.+)/m + tst,obj=$1,$2 + if t_o=~/^_[0-9]?_[0-9]!\s+.+/m + hang,indent,obj=hang_and_indent_def_test(tst,obj) + else + hang,indent=hang_and_indent_test(tst) + end + image=image_test(obj) + note=endnote_test?(obj) + obj,tags=extract_tags(obj) + unless obj=~/\A\s*\Z/m + h={ hang: hang, indent: indent, obj: obj, idx: idx, note_: note, image_: image, tags: tags } SiSU_document_structure::Object_para.new.paragraph(h) end else nil @@ -196,7 +245,7 @@ module SiSU_document_structure_extract note=endnote_test?(t_o) obj,tags=extract_tags(t_o) unless obj=~/\A\s*\Z/m - h={ bullet_: false, indent: 0, obj: obj, idx: idx, note_: note, image_: image, tags: tags } + h={ bullet_: false, indent: 0, hang: 0, obj: obj, idx: idx, note_: note, image_: image, tags: tags } SiSU_document_structure::Object_para.new.paragraph(h) end end @@ -725,7 +774,8 @@ module SiSU_document_structure_extract end def structure_markup #build structure where structure provided only in meta header @dob=if @dob.is =~/para/ \ - and @dob.indent !~/[1-9]/ \ + and ((@dob.hang !~/[1-9]/ and @dob.indent !~/[1-9]/) \ + or (@dob.hang != @dob.indent)) \ and not @dob.bullet_ @dob=case @dob.obj when /^#{@md.lv1}/ diff --git a/lib/sisu/v3/dal_syntax.rb b/lib/sisu/v3/dal_syntax.rb index 4595d6e1..bb1aacbe 100644 --- a/lib/sisu/v3/dal_syntax.rb +++ b/lib/sisu/v3/dal_syntax.rb @@ -398,9 +398,19 @@ module SiSU_Syntax dob.obj.gsub!(/=\{(.+?)\}/, "#{Mx[:idx_o]}\\1#{Mx[:idx_c]}") dob.obj.gsub!(/^\s*_([1-9])\*\s*/, - "#{Mx[:pa_o]}:i\\1#{Mx[:pa_c]}#{Mx[:gl_bullet]}") #bullets, shortcut + "#{Mx[:pa_o]}:i\\1:\\1#{Mx[:pa_c]}#{Mx[:gl_bullet]}") #bullets, shortcut dob.obj.gsub!(/^\s*_([1-9])\s+/, - "#{Mx[:pa_o]}:i\\1#{Mx[:pa_c]}") #indent + "#{Mx[:pa_o]}:i\\1:\\1#{Mx[:pa_c]}") #indent + dob.obj.gsub!(/^\s*_([1-9])!\s+(.+?)\s*$/, + "#{Mx[:pa_o]}:i\\1:\\1#{Mx[:pa_c]}#{Mx[:fa_bold_o]}\\2#{Mx[:fa_bold_c]} ") #indent bold + dob.obj.gsub!(/^\s*__([1-9])\s+/, + "#{Mx[:pa_o]}:i0:\\1#{Mx[:pa_c]}") #hang + dob.obj.gsub!(/^\s*__([1-9])!\s+(.+?)\s*$/, + "#{Mx[:pa_o]}:i0:\\1#{Mx[:pa_c]}#{Mx[:fa_bold_o]}\\2#{Mx[:fa_bold_c]} ") #hangdef + dob.obj.gsub!(/^\s*_([0-9])_([0-9])\s+/, + "#{Mx[:pa_o]}:i\\1:\\2#{Mx[:pa_c]}") #hang + dob.obj.gsub!(/^\s*_([0-9])_([0-9])!\s+(.+?)\s*$/, + "#{Mx[:pa_o]}:i\\1:\\2#{Mx[:pa_c]}#{Mx[:fa_bold_o]}\\3#{Mx[:fa_bold_c]} ") #hangdef dob.obj.gsub!(/<:hi>/,"#{Mx[:fa_hilite_o]}") #'') # bright yellow rgb(255,255,0) pale yellow rgb(255,255,200) dob.obj.gsub!(/<:\/hi>/,"#{Mx[:fa_hilite_c]}") #'') dob.obj.gsub!(/(#{Mx[:gr_o]}verse#{Mx[:gr_c]}.+)/m,"\\1\n") @@ -517,7 +527,11 @@ module SiSU_Syntax line.gsub!(/^\s*_\([1-9]\)\(\*\+\)\s*/, "#{Mx[:pa_o]}:i\\1#{Mx[:pa_c]}#{Mx[:fa_o]}\\2#{Mx[:fa_c_o]}") #bullets, shortcut line.gsub!(/^\s*_\([1-9]\)\s+/, - "#{Mx[:pa_o]}:i\\1#{Mx[:pa_c]}") + "#{Mx[:pa_o]}:i\\1#{Mx[:pa_c]}") #watch + line.gsub!(/^\s*__\([1-9]\)\s+/, + "#{Mx[:pa_o]}:h\\1#{Mx[:pa_c]}") #watch + #line.gsub!(/^\s*__\([1-9]\)!\s+/, + # "#{Mx[:pa_o]}:hd\\1#{Mx[:pa_c]}") #watch line.gsub!(/#{Mx[:br_line]}\s*_[12]\s+/, "#{Mx[:br_line]} ") #indent used in endnotes, not implemented, replace when ready with: line.gsub!(/(?:
|
)\s*_([12])\s+/,'
<:i\1> ') end -- cgit v1.2.3 From 051b32167ddbff4193e7d52d8be434ef3f70470d Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:24:41 -0400 Subject: v3: plaintext, indent ... --- data/doc/sisu/CHANGELOG_v3 | 5 ++--- lib/sisu/v3/plaintext.rb | 7 ++++++- lib/sisu/v3/shared_txt.rb | 6 +++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 56e737bc..7db34c34 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -26,9 +26,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.14.orig.tar.gz _[0-9]?_[1-9] initial indent; paragraph text indent - * done: dal; - not done: , plaintext, html, xhtml, xml sax, xml dom, epub, pdf, odf, - man, info + * done: dal, plaintext; + not done: html, xhtml, xml sax, xml dom, epub, pdf, odf, man, info check: po4a, html_lite (used in sql search results) * syntax highlighting done: vim (sisu.vim), emacs (sisu-mode.el) diff --git a/lib/sisu/v3/plaintext.rb b/lib/sisu/v3/plaintext.rb index b7ad1680..aee1e56f 100644 --- a/lib/sisu/v3/plaintext.rb +++ b/lib/sisu/v3/plaintext.rb @@ -225,7 +225,12 @@ WOK wrapped=if dob.is =='para' \ or dob.is=='heading' if dob.is=='para' - if dob.indent =~/[1-9]/ + if dob.hang \ + and dob.hang =~/[0-9]/ \ + and dob.indent != dob.hang + util=SiSU_text_utils::Wrap.new(dob.obj,@wrap_width,dob.indent.to_i*2,dob.hang.to_i*2) + #util=SiSU_text_utils::Wrap.new(dob.obj,@wrap_width,dob.hang.to_i*2,0) + elsif dob.indent =~/[1-9]/ util=if dob.bullet_ SiSU_text_utils::Wrap.new("* #{dob.obj}",@wrap_width,dob.indent.to_i*2) else SiSU_text_utils::Wrap.new(dob.obj,@wrap_width,dob.indent.to_i*2) diff --git a/lib/sisu/v3/shared_txt.rb b/lib/sisu/v3/shared_txt.rb index 6f25a06b..c81e1c37 100644 --- a/lib/sisu/v3/shared_txt.rb +++ b/lib/sisu/v3/shared_txt.rb @@ -84,8 +84,8 @@ module SiSU_text_utils line=line elsif word =~/\n\n/ word="\n" - @n_char_max_extend = @n_char_max + out[line].length - line=line + @n_char_max_extend = @n_char_max + line += 1 elsif (out[line].length + word.length) > (@n_char_max_extend - @n_indent) \ and out[line] =~/\S+/ @n_char_max_extend = @n_char_max @@ -104,7 +104,7 @@ module SiSU_text_utils end @oldword=word if word =~/\S+/ end - x=out.join(spaces_indent).gsub(/\A\n+/m,'').insert(0,spaces_hang) + spaces_hang + out.join(spaces_indent) end def line_wrap_indent1 @n_indent,@n_hang=2,2 -- cgit v1.2.3 From 476ee850a8f11f49578281137620189304223de0 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:25:25 -0400 Subject: v3: css, indent ... --- data/doc/sisu/CHANGELOG_v3 | 2 +- lib/sisu/v3/css.rb | 1323 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 1286 insertions(+), 39 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 7db34c34..3caf06c8 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -26,7 +26,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.14.orig.tar.gz _[0-9]?_[1-9] initial indent; paragraph text indent - * done: dal, plaintext; + * done: dal, plaintext, css; not done: html, xhtml, xml sax, xml dom, epub, pdf, odf, man, info check: po4a, html_lite (used in sql search results) * syntax highlighting done: vim (sisu.vim), emacs (sisu-mode.el) diff --git a/lib/sisu/v3/css.rb b/lib/sisu/v3/css.rb index 463492af..e86c3076 100644 --- a/lib/sisu/v3/css.rb +++ b/lib/sisu/v3/css.rb @@ -342,7 +342,8 @@ WOK margin-right: 2em; margin-top: 10px; margin-bottom: 0px; - text-indent: 0mm; + padding-left: 0em; + text-indent: 0em; } p, h0, h1, h2, h3, h4, h5, h6 { display: block; @@ -357,16 +358,431 @@ WOK margin-top: 3px; margin-bottom: 3px; } + + /* indent */ + p.norm { } - p.i1 {margin-left: 1em;} - p.i2 {margin-left: 2em;} - p.i3 {margin-left: 3em;} - p.i4 {margin-left: 4em;} - p.i5 {margin-left: 5em;} - p.i6 {margin-left: 6em;} - p.i7 {margin-left: 7em;} - p.i8 {margin-left: 8em;} - p.i9 {margin-left: 9em;} + p.i1 {padding-left: 1em;} + p.i2 {padding-left: 2em;} + p.i3 {padding-left: 3em;} + p.i4 {padding-left: 4em;} + p.i5 {padding-left: 5em;} + p.i6 {padding-left: 6em;} + p.i7 {padding-left: 7em;} + p.i8 {padding-left: 8em;} + p.i9 {padding-left: 9em;} + + /* hanging indent */ + + p.h0i0 { + padding-left: 0em; + text-indent: 0em; + } + p.h0i1 { + padding-left: 1em; + text-indent: -1em; + } + p.h0i2 { + padding-left: 2em; + text-indent: -2em; + } + p.h0i3 { + padding-left: 3em; + text-indent: -3em; + } + p.h0i4 { + padding-left: 4em; + text-indent: -4em; + } + p.h0i5 { + padding-left: 5em; + text-indent: -5em; + } + p.h0i6 { + padding-left: 6em; + text-indent: -6em; + } + p.h0i7 { + padding-left: 7em; + text-indent: -7em; + } + p.h0i8 { + padding-left: 8em; + text-indent: -8em; + } + p.h0i9 { + padding-left: 9em; + text-indent: -9em; + } + + p.h1i0 { + padding-left: 0em; + text-indent: 1em; + } + p.h1i1 { + padding-left: 1em; + text-indent: 0em; + } + p.h1i2 { + padding-left: 2em; + text-indent: -1em; + } + p.h1i3 { + padding-left: 3em; + text-indent: -2em; + } + p.h1i4 { + padding-left: 4em; + text-indent: -3em; + } + p.h1i5 { + padding-left: 5em; + text-indent: -4em; + } + p.h1i6 { + padding-left: 6em; + text-indent: -5em; + } + p.h1i7 { + padding-left: 7em; + text-indent: -6em; + } + p.h1i8 { + padding-left: 8em; + text-indent: -7em; + } + p.h1i9 { + padding-left: 9em; + text-indent: -8em; + } + + p.h2i0 { + padding-left: 0em; + text-indent: 2em; + } + p.h2i1 { + padding-left: 1em; + text-indent: 1em; + } + p.h2i2 { + padding-left: 2em; + text-indent: 0em; + } + p.h2i3 { + padding-left: 3em; + text-indent: -1em; + } + p.h2i4 { + padding-left: 4em; + text-indent: -2em; + } + p.h2i5 { + padding-left: 5em; + text-indent: -3em; + } + p.h2i6 { + padding-left: 6em; + text-indent: -4em; + } + p.h2i7 { + padding-left: 7em; + text-indent: -5em; + } + p.h2i8 { + padding-left: 8em; + text-indent: -6em; + } + p.h2i9 { + padding-left: 9em; + text-indent: -7em; + } + + p.h3i0 { + padding-left: 0em; + text-indent: 3em; + } + p.h3i1 { + padding-left: 1em; + text-indent: 2em; + } + p.h3i2 { + padding-left: 2em; + text-indent: 1em; + } + p.h3i3 { + padding-left: 3em; + text-indent: 0em; + } + p.h3i4 { + padding-left: 4em; + text-indent: -1em; + } + p.h3i5 { + padding-left: 5em; + text-indent: -2em; + } + p.h3i6 { + padding-left: 6em; + text-indent: -3em; + } + p.h3i7 { + padding-left: 7em; + text-indent: -4em; + } + p.h3i8 { + padding-left: 8em; + text-indent: -5em; + } + p.h3i9 { + padding-left: 9em; + text-indent: -6em; + } + + p.h4i0 { + padding-left: 0em; + text-indent: 4em; + } + p.h4i1 { + padding-left: 1em; + text-indent: 3em; + } + p.h4i2 { + padding-left: 2em; + text-indent: 2em; + } + p.h4i3 { + padding-left: 3em; + text-indent: 1em; + } + p.h4i4 { + padding-left: 4em; + text-indent: 0em; + } + p.h4i5 { + padding-left: 5em; + text-indent: -1em; + } + p.h4i6 { + padding-left: 6em; + text-indent: -2em; + } + p.h4i7 { + padding-left: 7em; + text-indent: -3em; + } + p.h4i8 { + padding-left: 8em; + text-indent: -4em; + } + p.h4i9 { + padding-left: 9em; + text-indent: -5em; + } + + p.h5i0 { + padding-left: 0em; + text-indent: 5em; + } + p.h5i1 { + padding-left: 1em; + text-indent: 4em; + } + p.h5i2 { + padding-left: 2em; + text-indent: 3em; + } + p.h5i3 { + padding-left: 3em; + text-indent: 2em; + } + p.h5i4 { + padding-left: 4em; + text-indent: 1em; + } + p.h5i5 { + padding-left: 5em; + text-indent: 0em; + } + p.h5i6 { + padding-left: 6em; + text-indent: -1em; + } + p.h5i7 { + padding-left: 7em; + text-indent: -2em; + } + p.h5i8 { + padding-left: 8em; + text-indent: -3em; + } + p.h5i9 { + padding-left: 9em; + text-indent: -4em; + } + + p.h6i0 { + padding-left: 0em; + text-indent: 6em; + } + p.h6i1 { + padding-left: 1em; + text-indent: 5em; + } + p.h6i2 { + padding-left: 2em; + text-indent: 4em; + } + p.h6i3 { + padding-left: 3em; + text-indent: 3em; + } + p.h6i4 { + padding-left: 4em; + text-indent: 2em; + } + p.h6i5 { + padding-left: 5em; + text-indent: 1em; + } + p.h6i6 { + padding-left: 6em; + text-indent: 0em; + } + p.h6i7 { + padding-left: 7em; + text-indent: -1em; + } + p.h6i8 { + padding-left: 8em; + text-indent: -2em; + } + p.h6i9 { + padding-left: 9em; + text-indent: -3em; + } + + p.h7i0 { + padding-left: 0em; + text-indent: 7em; + } + p.h7i1 { + padding-left: 1em; + text-indent: 6em; + } + p.h7i2 { + padding-left: 2em; + text-indent: 5em; + } + p.h7i3 { + padding-left: 3em; + text-indent: 4em; + } + p.h7i4 { + padding-left: 4em; + text-indent: 3em; + } + p.h7i5 { + padding-left: 5em; + text-indent: 2em; + } + p.h7i6 { + padding-left: 6em; + text-indent: 1em; + } + p.h7i7 { + padding-left: 7em; + text-indent: 0em; + } + p.h7i8 { + padding-left: 8em; + text-indent: -1em; + } + p.h7i9 { + padding-left: 9em; + text-indent: -2em; + } + + p.h8i0 { + padding-left: 0em; + text-indent: 8em; + } + p.h8i1 { + padding-left: 1em; + text-indent: 7em; + } + p.h8i2 { + padding-left: 2em; + text-indent: 6em; + } + p.h8i3 { + padding-left: 3em; + text-indent: 5em; + } + p.h8i4 { + padding-left: 4em; + text-indent: 4em; + } + p.h8i5 { + padding-left: 5em; + text-indent: 3em; + } + p.h8i6 { + padding-left: 6em; + text-indent: 2em; + } + p.h8i7 { + padding-left: 7em; + text-indent: 1em; + } + p.h8i8 { + padding-left: 8em; + text-indent: 0em; + } + p.h8i9 { + padding-left: 9em; + text-indent: -1em; + } + + p.h9i0 { + padding-left: 0em; + text-indent: 9em; + } + p.h9i1 { + padding-left: 1em; + text-indent: 8em; + } + p.h9i2 { + padding-left: 2em; + text-indent: 7em; + } + p.h9i3 { + padding-left: 3em; + text-indent: 6em; + } + p.h9i4 { + padding-left: 4em; + text-indent: 5em; + } + p.h9i5 { + padding-left: 5em; + text-indent: 4em; + } + p.h9i6 { + padding-left: 6em; + text-indent: 3em; + } + p.h9i7 { + padding-left: 7em; + text-indent: 2em; + } + p.h9i8 { + padding-left: 8em; + text-indent: 1em; + } + p.h9i9 { + padding-left: 9em; + text-indent: 0em; + } p.it0 { margin-left: 0em; @@ -1339,35 +1755,446 @@ WOK text-align: left; } text[class|="indent0"] { - margin-left: 10%; + padding-left: 10%; } text[class|="indent1"] { - margin-left: 15%; + padding-left: 15%; } text[class|="indent2"] { - margin-left: 20%; + padding-left: 20%; } text[class|="indent3"] { - margin-left: 25%; + padding-left: 25%; } text[class|="indent4"] { - margin-left: 30%; + padding-left: 30%; } text[class|="indent5"] { - margin-left: 35%; + padding-left: 35%; } text[class|="indent6"] { - margin-left: 40%; + padding-left: 40%; } text[class|="indent7"] { - margin-left: 45%; + padding-left: 45%; } text[class|="indent8"] { - margin-left: 50%; + padding-left: 50%; } text[class|="indent9"] { - margin-left: 55%; + padding-left: 55%; + } + + text[class|="hang0_indent0"] { + padding-left: 10%; + text-indent: 0%; + } + text[class|="hang0_indent1"] { + padding-left: 15%; + text-indent: -5%; + } + text[class|="hang0_indent2"] { + padding-left: 20%; + text-indent: -10%; + } + text[class|="hang0_indent3"] { + padding-left: 25%; + text-indent: -15%; + } + text[class|="hang0_indent4"] { + padding-left: 30%; + text-indent: -20%; + } + text[class|="hang0_indent5"] { + padding-left: 35%; + text-indent: -25%; + } + text[class|="hang0_indent6"] { + padding-left: 40%; + text-indent: -30%; + } + text[class|="hang0_indent7"] { + padding-left: 45%; + text-indent: -35%; + } + text[class|="hang0_indent8"] { + padding-left: 50%; + text-indent: -40%; + } + text[class|="hang0_indent9"] { + padding-left: 55%; + text-indent: -45%; + } + + text[class|="hang1_indent0"] { + padding-left: 10%; + text-indent: 5%; + } + text[class|="hang1_indent1"] { + padding-left: 15%; + text-indent: 0%; + } + text[class|="hang1_indent2"] { + padding-left: 20%; + text-indent: -5%; + } + text[class|="hang1_indent3"] { + padding-left: 25%; + text-indent: -10%; + } + text[class|="hang1_indent4"] { + padding-left: 30%; + text-indent: -15%; + } + text[class|="hang1_indent5"] { + padding-left: 35%; + text-indent: -20%; + } + text[class|="hang1_indent6"] { + padding-left: 40%; + text-indent: -25%; + } + text[class|="hang1_indent7"] { + padding-left: 45%; + text-indent: -30%; + } + text[class|="hang1_indent8"] { + padding-left: 50%; + text-indent: -35%; + } + text[class|="hang1_indent9"] { + padding-left: 55%; + text-indent: -40%; + } + + text[class|="hang2_indent0"] { + padding-left: 10%; + text-indent: 10%; + } + text[class|="hang2_indent1"] { + padding-left: 15%; + text-indent: 5%; + } + text[class|="hang2_indent2"] { + padding-left: 20%; + text-indent: 0%; + } + text[class|="hang2_indent3"] { + padding-left: 25%; + text-indent: -5%; + } + text[class|="hang2_indent4"] { + padding-left: 30%; + text-indent: -10%; + } + text[class|="hang2_indent5"] { + padding-left: 35%; + text-indent: -15%; + } + text[class|="hang2_indent6"] { + padding-left: 40%; + text-indent: -20%; + } + text[class|="hang2_indent7"] { + padding-left: 45%; + text-indent: -25%; + } + text[class|="hang2_indent8"] { + padding-left: 50%; + text-indent: -30%; + } + text[class|="hang2_indent9"] { + padding-left: 55%; + text-indent: -35%; + } + + text[class|="hang3_indent0"] { + padding-left: 10%; + text-indent: 15%; + } + text[class|="hang3_indent1"] { + padding-left: 15%; + text-indent: 10%; + } + text[class|="hang3_indent2"] { + padding-left: 20%; + text-indent: 5%; + } + text[class|="hang3_indent3"] { + padding-left: 25%; + text-indent: 0%; + } + text[class|="hang3_indent4"] { + padding-left: 30%; + text-indent: -5%; + } + text[class|="hang3_indent5"] { + padding-left: 35%; + text-indent: -10%; + } + text[class|="hang3_indent6"] { + padding-left: 40%; + text-indent: -15%; + } + text[class|="hang3_indent7"] { + padding-left: 45%; + text-indent: -20%; + } + text[class|="hang3_indent8"] { + padding-left: 50%; + text-indent: -25%; + } + text[class|="hang3_indent9"] { + padding-left: 55%; + text-indent: -30%; + } + + text[class|="hang4_indent0"] { + padding-left: 10%; + text-indent: 20%; + } + text[class|="hang4_indent1"] { + padding-left: 15%; + text-indent: 15%; + } + text[class|="hang4_indent2"] { + padding-left: 20%; + text-indent: 10%; + } + text[class|="hang4_indent3"] { + padding-left: 25%; + text-indent: 5%; + } + text[class|="hang4_indent4"] { + padding-left: 30%; + text-indent: 0%; + } + text[class|="hang4_indent5"] { + padding-left: 35%; + text-indent: -5%; + } + text[class|="hang4_indent6"] { + padding-left: 40%; + text-indent: -10%; } + text[class|="hang4_indent7"] { + padding-left: 45%; + text-indent: -15%; + } + text[class|="hang4_indent8"] { + padding-left: 50%; + text-indent: -20%; + } + text[class|="hang4_indent9"] { + padding-left: 55%; + text-indent: -25%; + } + + text[class|="hang5_indent0"] { + padding-left: 10%; + text-indent: 25%; + } + text[class|="hang5_indent1"] { + padding-left: 15%; + text-indent: 20%; + } + text[class|="hang5_indent2"] { + padding-left: 20%; + text-indent: 15%; + } + text[class|="hang5_indent3"] { + padding-left: 25%; + text-indent: 10%; + } + text[class|="hang5_indent4"] { + padding-left: 30%; + text-indent: 5%; + } + text[class|="hang5_indent5"] { + padding-left: 35%; + text-indent: 0%; + } + text[class|="hang5_indent6"] { + padding-left: 40%; + text-indent: -5%; + } + text[class|="hang5_indent7"] { + padding-left: 45%; + text-indent: -10%; + } + text[class|="hang5_indent8"] { + padding-left: 50%; + text-indent: -15%; + } + text[class|="hang5_indent9"] { + padding-left: 55%; + text-indent: -20%; + } + + text[class|="hang6_indent0"] { + padding-left: 10%; + text-indent: 30%; + } + text[class|="hang6_indent1"] { + padding-left: 15%; + text-indent: 25%; + } + text[class|="hang6_indent2"] { + padding-left: 20%; + text-indent: 20%; + } + text[class|="hang6_indent3"] { + padding-left: 25%; + text-indent: 15%; + } + text[class|="hang6_indent4"] { + padding-left: 30%; + text-indent: 10%; + } + text[class|="hang6_indent5"] { + padding-left: 35%; + text-indent: 5%; + } + text[class|="hang6_indent6"] { + padding-left: 40%; + text-indent: 0%; + } + text[class|="hang6_indent7"] { + padding-left: 45%; + text-indent: -5%; + } + text[class|="hang6_indent8"] { + padding-left: 50%; + text-indent: -10%; + } + text[class|="hang6_indent9"] { + padding-left: 55%; + text-indent: -15%; + } + + text[class|="hang7_indent0"] { + padding-left: 10%; + text-indent: 35%; + } + text[class|="hang7_indent1"] { + padding-left: 15%; + text-indent: 30%; + } + text[class|="hang7_indent2"] { + padding-left: 20%; + text-indent: 25%; + } + text[class|="hang7_indent3"] { + padding-left: 25%; + text-indent: 20%; + } + text[class|="hang7_indent4"] { + padding-left: 30%; + text-indent: 15%; + } + text[class|="hang7_indent5"] { + padding-left: 35%; + text-indent: 10%; + } + text[class|="hang7_indent6"] { + padding-left: 40%; + text-indent: 5%; + } + text[class|="hang7_indent7"] { + padding-left: 45%; + text-indent: 0%; + } + text[class|="hang7_indent8"] { + padding-left: 50%; + text-indent: -5%; + } + text[class|="hang7_indent9"] { + padding-left: 55%; + text-indent: -10%; + } + + text[class|="hang8_indent0"] { + padding-left: 10%; + text-indent: 40%; + } + text[class|="hang8_indent1"] { + padding-left: 15%; + text-indent: 35%; + } + text[class|="hang8_indent2"] { + padding-left: 20%; + text-indent: 30%; + } + text[class|="hang8_indent3"] { + padding-left: 25%; + text-indent: 25%; + } + text[class|="hang8_indent4"] { + padding-left: 30%; + text-indent: 20%; + } + text[class|="hang8_indent5"] { + padding-left: 35%; + text-indent: 15%; + } + text[class|="hang8_indent6"] { + padding-left: 40%; + text-indent: 10%; + } + text[class|="hang8_indent7"] { + padding-left: 45%; + text-indent: 5%; + } + text[class|="hang8_indent8"] { + padding-left: 50%; + text-indent: 0%; + } + text[class|="hang8_indent9"] { + padding-left: 55%; + text-indent: -5%; + } + + text[class|="hang9_indent0"] { + padding-left: 10%; + text-indent: 45%; + } + text[class|="hang9_indent1"] { + padding-left: 15%; + text-indent: 40%; + } + text[class|="hang9_indent2"] { + padding-left: 20%; + text-indent: 35%; + } + text[class|="hang9_indent3"] { + padding-left: 25%; + text-indent: 30%; + } + text[class|="hang9_indent4"] { + padding-left: 30%; + text-indent: 25%; + } + text[class|="hang9_indent5"] { + padding-left: 35%; + text-indent: 20%; + } + text[class|="hang9_indent6"] { + padding-left: 40%; + text-indent: 15%; + } + text[class|="hang9_indent7"] { + padding-left: 45%; + text-indent: 10%; + } + text[class|="hang9_indent8"] { + padding-left: 50%; + text-indent: 5%; + } + text[class|="hang9_indent9"] { + padding-left: 55%; + text-indent: 0%; + } + text[class|="indent_bullet"] { text-indent: 0%; } @@ -1645,59 +2472,479 @@ WOK font-weight: bold; text-align: left; } + text[class|="indent0"] { + padding-left: 10%; + } text[class|="indent1"] { - margin-left: 10%; + padding-left: 15%; } text[class|="indent2"] { - margin-left: 15%; + padding-left: 20%; } text[class|="indent3"] { - margin-left: 20%; + padding-left: 25%; } text[class|="indent4"] { - margin-left: 25%; + padding-left: 30%; } text[class|="indent5"] { - margin-left: 30%; + padding-left: 35%; } text[class|="indent6"] { - margin-left: 35%; + padding-left: 40%; } text[class|="indent7"] { - margin-left: 40%; + padding-left: 45%; } text[class|="indent8"] { - margin-left: 45%; + padding-left: 50%; } text[class|="indent9"] { - margin-left: 50%; + padding-left: 55%; + } + + text[class|="hang0_indent0"] { + padding-left: 10%; + text-indent: 0%; + } + text[class|="hang0_indent1"] { + padding-left: 15%; + text-indent: -5%; + } + text[class|="hang0_indent2"] { + padding-left: 20%; + text-indent: -10%; + } + text[class|="hang0_indent3"] { + padding-left: 25%; + text-indent: -15%; + } + text[class|="hang0_indent4"] { + padding-left: 30%; + text-indent: -20%; + } + text[class|="hang0_indent5"] { + padding-left: 35%; + text-indent: -25%; + } + text[class|="hang0_indent6"] { + padding-left: 40%; + text-indent: -30%; + } + text[class|="hang0_indent7"] { + padding-left: 45%; + text-indent: -35%; + } + text[class|="hang0_indent8"] { + padding-left: 50%; + text-indent: -40%; + } + text[class|="hang0_indent9"] { + padding-left: 55%; + text-indent: -45%; + } + + text[class|="hang1_indent0"] { + padding-left: 10%; + text-indent: 5%; + } + text[class|="hang1_indent1"] { + padding-left: 15%; + text-indent: 0%; + } + text[class|="hang1_indent2"] { + padding-left: 20%; + text-indent: -5%; + } + text[class|="hang1_indent3"] { + padding-left: 25%; + text-indent: -10%; + } + text[class|="hang1_indent4"] { + padding-left: 30%; + text-indent: -15%; + } + text[class|="hang1_indent5"] { + padding-left: 35%; + text-indent: -20%; + } + text[class|="hang1_indent6"] { + padding-left: 40%; + text-indent: -25%; + } + text[class|="hang1_indent7"] { + padding-left: 45%; + text-indent: -30%; + } + text[class|="hang1_indent8"] { + padding-left: 50%; + text-indent: -35%; + } + text[class|="hang1_indent9"] { + padding-left: 55%; + text-indent: -40%; + } + + text[class|="hang2_indent0"] { + padding-left: 10%; + text-indent: 10%; + } + text[class|="hang2_indent1"] { + padding-left: 15%; + text-indent: 5%; + } + text[class|="hang2_indent2"] { + padding-left: 20%; + text-indent: 0%; + } + text[class|="hang2_indent3"] { + padding-left: 25%; + text-indent: -5%; + } + text[class|="hang2_indent4"] { + padding-left: 30%; + text-indent: -10%; + } + text[class|="hang2_indent5"] { + padding-left: 35%; + text-indent: -15%; + } + text[class|="hang2_indent6"] { + padding-left: 40%; + text-indent: -20%; + } + text[class|="hang2_indent7"] { + padding-left: 45%; + text-indent: -25%; + } + text[class|="hang2_indent8"] { + padding-left: 50%; + text-indent: -30%; + } + text[class|="hang2_indent9"] { + padding-left: 55%; + text-indent: -35%; + } + + text[class|="hang3_indent0"] { + padding-left: 10%; + text-indent: 15%; + } + text[class|="hang3_indent1"] { + padding-left: 15%; + text-indent: 10%; + } + text[class|="hang3_indent2"] { + padding-left: 20%; + text-indent: 5%; + } + text[class|="hang3_indent3"] { + padding-left: 25%; + text-indent: 0%; + } + text[class|="hang3_indent4"] { + padding-left: 30%; + text-indent: -5%; + } + text[class|="hang3_indent5"] { + padding-left: 35%; + text-indent: -10%; + } + text[class|="hang3_indent6"] { + padding-left: 40%; + text-indent: -15%; + } + text[class|="hang3_indent7"] { + padding-left: 45%; + text-indent: -20%; + } + text[class|="hang3_indent8"] { + padding-left: 50%; + text-indent: -25%; + } + text[class|="hang3_indent9"] { + padding-left: 55%; + text-indent: -30%; + } + + text[class|="hang4_indent0"] { + padding-left: 10%; + text-indent: 20%; + } + text[class|="hang4_indent1"] { + padding-left: 15%; + text-indent: 15%; + } + text[class|="hang4_indent2"] { + padding-left: 20%; + text-indent: 10%; + } + text[class|="hang4_indent3"] { + padding-left: 25%; + text-indent: 5%; + } + text[class|="hang4_indent4"] { + padding-left: 30%; + text-indent: 0%; + } + text[class|="hang4_indent5"] { + padding-left: 35%; + text-indent: -5%; + } + text[class|="hang4_indent6"] { + padding-left: 40%; + text-indent: -10%; + } + text[class|="hang4_indent7"] { + padding-left: 45%; + text-indent: -15%; + } + text[class|="hang4_indent8"] { + padding-left: 50%; + text-indent: -20%; + } + text[class|="hang4_indent9"] { + padding-left: 55%; + text-indent: -25%; + } + + text[class|="hang5_indent0"] { + padding-left: 10%; + text-indent: 25%; + } + text[class|="hang5_indent1"] { + padding-left: 15%; + text-indent: 20%; + } + text[class|="hang5_indent2"] { + padding-left: 20%; + text-indent: 15%; + } + text[class|="hang5_indent3"] { + padding-left: 25%; + text-indent: 10%; + } + text[class|="hang5_indent4"] { + padding-left: 30%; + text-indent: 5%; + } + text[class|="hang5_indent5"] { + padding-left: 35%; + text-indent: 0%; + } + text[class|="hang5_indent6"] { + padding-left: 40%; + text-indent: -5%; + } + text[class|="hang5_indent7"] { + padding-left: 45%; + text-indent: -10%; + } + text[class|="hang5_indent8"] { + padding-left: 50%; + text-indent: -15%; + } + text[class|="hang5_indent9"] { + padding-left: 55%; + text-indent: -20%; + } + + text[class|="hang6_indent0"] { + padding-left: 10%; + text-indent: 30%; + } + text[class|="hang6_indent1"] { + padding-left: 15%; + text-indent: 25%; + } + text[class|="hang6_indent2"] { + padding-left: 20%; + text-indent: 20%; + } + text[class|="hang6_indent3"] { + padding-left: 25%; + text-indent: 15%; + } + text[class|="hang6_indent4"] { + padding-left: 30%; + text-indent: 10%; + } + text[class|="hang6_indent5"] { + padding-left: 35%; + text-indent: 5%; + } + text[class|="hang6_indent6"] { + padding-left: 40%; + text-indent: 0%; + } + text[class|="hang6_indent7"] { + padding-left: 45%; + text-indent: -5%; + } + text[class|="hang6_indent8"] { + padding-left: 50%; + text-indent: -10%; + } + text[class|="hang6_indent9"] { + padding-left: 55%; + text-indent: -15%; + } + + text[class|="hang7_indent0"] { + padding-left: 10%; + text-indent: 35%; + } + text[class|="hang7_indent1"] { + padding-left: 15%; + text-indent: 30%; + } + text[class|="hang7_indent2"] { + padding-left: 20%; + text-indent: 25%; + } + text[class|="hang7_indent3"] { + padding-left: 25%; + text-indent: 20%; + } + text[class|="hang7_indent4"] { + padding-left: 30%; + text-indent: 15%; + } + text[class|="hang7_indent5"] { + padding-left: 35%; + text-indent: 10%; + } + text[class|="hang7_indent6"] { + padding-left: 40%; + text-indent: 5%; + } + text[class|="hang7_indent7"] { + padding-left: 45%; + text-indent: 0%; + } + text[class|="hang7_indent8"] { + padding-left: 50%; + text-indent: -5%; + } + text[class|="hang7_indent9"] { + padding-left: 55%; + text-indent: -10%; + } + + text[class|="hang8_indent0"] { + padding-left: 10%; + text-indent: 40%; + } + text[class|="hang8_indent1"] { + padding-left: 15%; + text-indent: 35%; + } + text[class|="hang8_indent2"] { + padding-left: 20%; + text-indent: 30%; + } + text[class|="hang8_indent3"] { + padding-left: 25%; + text-indent: 25%; + } + text[class|="hang8_indent4"] { + padding-left: 30%; + text-indent: 20%; + } + text[class|="hang8_indent5"] { + padding-left: 35%; + text-indent: 15%; + } + text[class|="hang8_indent6"] { + padding-left: 40%; + text-indent: 10%; + } + text[class|="hang8_indent7"] { + padding-left: 45%; + text-indent: 5%; + } + text[class|="hang8_indent8"] { + padding-left: 50%; + text-indent: 0%; + } + text[class|="hang8_indent9"] { + padding-left: 55%; + text-indent: -5%; + } + + text[class|="hang9_indent0"] { + padding-left: 10%; + text-indent: 45%; + } + text[class|="hang9_indent1"] { + padding-left: 15%; + text-indent: 40%; + } + text[class|="hang9_indent2"] { + padding-left: 20%; + text-indent: 35%; + } + text[class|="hang9_indent3"] { + padding-left: 25%; + text-indent: 30%; + } + text[class|="hang9_indent4"] { + padding-left: 30%; + text-indent: 25%; + } + text[class|="hang9_indent5"] { + padding-left: 35%; + text-indent: 20%; + } + text[class|="hang9_indent6"] { + padding-left: 40%; + text-indent: 15%; + } + text[class|="hang9_indent7"] { + padding-left: 45%; + text-indent: 10%; + } + text[class|="hang9_indent8"] { + padding-left: 50%; + text-indent: 5%; + } + text[class|="hang9_indent9"] { + padding-left: 55%; + text-indent: 0%; + } + + text[class|="indent_bullet"] { + text-indent: 0%; + } + text[class|="indent_bullet0"] { + text-indent: 0%; } text[class|="indent_bullet1"] { - margin-left: 10%; + padding-left: 10%; } text[class|="indent_bullet2"] { - margin-left: 15%; + padding-left: 15%; } text[class|="indent_bullet3"] { - margin-left: 20%; + padding-left: 20%; } text[class|="indent_bullet4"] { - margin-left: 25%; + padding-left: 25%; } text[class|="indent_bullet5"] { - margin-left: 30%; + padding-left: 30%; } text[class|="indent_bullet6"] { - margin-left: 35%; + padding-left: 35%; } text[class|="indent_bullet7"] { - margin-left: 40%; + padding-left: 40%; } text[class|="indent_bullet8"] { - margin-left: 45%; + padding-left: 45%; } text[class|="indent_bullet9"] { - margin-left: 50%; + padding-left: 50%; } text[class|="verse"], text[class|="block"], text[class|="group"], text[class|="code"] { text-align: left; -- cgit v1.2.3 From 1abd2f99b807f9f33d1bd39c0a692e1455bf44f1 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:26:52 -0400 Subject: v3: xhtml, xml sax & dom, indent (partially implemented) ... --- data/doc/sisu/CHANGELOG_v3 | 4 ++-- lib/sisu/v3/xhtml.rb | 7 ++++++- lib/sisu/v3/xml.rb | 7 ++++++- lib/sisu/v3/xml_dom.rb | 8 +++++++- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 3caf06c8..8d50ee88 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -26,8 +26,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.14.orig.tar.gz _[0-9]?_[1-9] initial indent; paragraph text indent - * done: dal, plaintext, css; - not done: html, xhtml, xml sax, xml dom, epub, pdf, odf, man, info + * done: dal, plaintext, css, xhtml, xml sax, xml dom; + not done: html, epub, pdf, odf, man, info check: po4a, html_lite (used in sql search results) * syntax highlighting done: vim (sisu.vim), emacs (sisu-mode.el) diff --git a/lib/sisu/v3/xhtml.rb b/lib/sisu/v3/xhtml.rb index 03415280..569b1dc3 100644 --- a/lib/sisu/v3/xhtml.rb +++ b/lib/sisu/v3/xhtml.rb @@ -321,8 +321,13 @@ WOK and dob.bullet_==true xml_structure(dob,"indent_bullet#{dob.indent}") elsif dob.is =='para' \ - and dob.indent.to_s =~/[1-9]/ + and dob.indent.to_s =~/[1-9]/ \ + and dob.indent == dob.hang xml_structure(dob,"indent#{dob.indent}") + elsif dob.is=='para' \ + and dob.hang.to_s =~/[0-9]/ \ + and dob.indent != dob.hang + xml_structure(dob,"hang#{dob.hang.to_s}_indent#{dob.indent.to_s}") else xml_structure(dob) end end diff --git a/lib/sisu/v3/xml.rb b/lib/sisu/v3/xml.rb index f2751da1..73e9345c 100644 --- a/lib/sisu/v3/xml.rb +++ b/lib/sisu/v3/xml.rb @@ -346,8 +346,13 @@ WOK and dob.bullet_==true xml_structure(dob,"indent_bullet#{dob.indent}") elsif dob.is =~ /^para/ \ - and dob.indent.to_s =~/[1-9]/ + and dob.indent.to_s =~/[1-9]/ \ + and dob.indent == dob.hang xml_structure(dob,"indent#{dob.indent}") + elsif dob.is =~ /^para/ \ + and dob.hang.to_s =~/[0-9]/ \ + and dob.indent != dob.hang + xml_structure(dob,"hang#{dob.hang.to_s}_indent#{dob.indent.to_s}") else xml_structure(dob) end end diff --git a/lib/sisu/v3/xml_dom.rb b/lib/sisu/v3/xml_dom.rb index 7a0d55f3..664bccdc 100644 --- a/lib/sisu/v3/xml_dom.rb +++ b/lib/sisu/v3/xml_dom.rb @@ -412,9 +412,15 @@ WOK type="indent_bullet#{dob.indent.to_s}" xml_markup(dob) elsif dob.is=='para' \ - and dob.indent.to_s =~/[1-9]/ + and dob.indent.to_s =~/[1-9]/ \ + and dob.indent == dob.hang type="indent#{dob.indent.to_s}" xml_markup(dob) + elsif dob.is=='para' \ + and dob.hang.to_s =~/[0-9]/ \ + and dob.indent != dob.hang + type="hang#{dob.hang.to_s}_indent#{dob.indent.to_s}" + xml_markup(dob) else type='norm' xml_markup(dob) -- cgit v1.2.3 From 392f8d5cc7b48dfe27eb1c1034b04e899a54f7bf Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:27:58 -0400 Subject: v3: html, indent ... --- data/doc/sisu/CHANGELOG_v3 | 4 ++-- lib/sisu/v3/html_scroll.rb | 20 +++++++++++++------- lib/sisu/v3/html_segments.rb | 20 +++++++++++++------- 3 files changed, 28 insertions(+), 16 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 8d50ee88..29f166dd 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -26,8 +26,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.14.orig.tar.gz _[0-9]?_[1-9] initial indent; paragraph text indent - * done: dal, plaintext, css, xhtml, xml sax, xml dom; - not done: html, epub, pdf, odf, man, info + * done: dal, plaintext, css, html, xhtml, xml sax, xml dom; + not done: epub, pdf, odf, man, info check: po4a, html_lite (used in sql search results) * syntax highlighting done: vim (sisu.vim), emacs (sisu-mode.el) diff --git a/lib/sisu/v3/html_scroll.rb b/lib/sisu/v3/html_scroll.rb index d58dd502..0a37bcca 100644 --- a/lib/sisu/v3/html_scroll.rb +++ b/lib/sisu/v3/html_scroll.rb @@ -153,16 +153,22 @@ module SiSU_HTML_scroll end elsif dob.is=='para' if dob.indent \ - and dob.indent =~/[1-9]/ + and dob.hang \ + and dob.indent =~/[0-9]/ \ + and dob.hang =~/[0-9]/ if dob.bullet_ - sto.format('li',"i#{dob.indent}") - else sto.format('p',"i#{dob.indent}") - end - else - if dob.bullet_ - sto.format('li','bullet') + if dob.indent =~/[1-9]/ + sto.format('li',"i#{dob.indent}") + else + sto.format('li','bullet') + end + elsif dob.indent == dob.hang + sto.format('p',"i#{dob.indent}") + elsif dob.indent != dob.hang + sto.format('p',"h#{dob.hang}i#{dob.indent}") else sto.para end + else sto.para end elsif dob.is=='block' sto.block diff --git a/lib/sisu/v3/html_segments.rb b/lib/sisu/v3/html_segments.rb index ccd48407..e6dc0d35 100644 --- a/lib/sisu/v3/html_segments.rb +++ b/lib/sisu/v3/html_segments.rb @@ -389,16 +389,22 @@ module SiSU_HTML_seg end elsif dob.is=='para' if dob.indent \ - and dob.indent =~/[1-9]/ + and dob.hang \ + and dob.indent =~/[0-9]/ \ + and dob.hang =~/[0-9]/ if dob.bullet_ - sto.format('li',"i#{dob.indent}") - else sto.format('p',"i#{dob.indent}") - end - else - if dob.bullet_ - sto.format('li','bullet') + if dob.indent =~/[1-9]/ + sto.format('li',"i#{dob.indent}") + else + sto.format('li','bullet') + end + elsif dob.indent == dob.hang + sto.format('p',"i#{dob.indent}") + elsif dob.indent != dob.hang + sto.format('p',"h#{dob.hang}i#{dob.indent}") else sto.para end + else sto.para end end elsif dob.is=='block' -- cgit v1.2.3 From 727db14c20acedb648b127976e6e0ed104d8515a Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:28:55 -0400 Subject: v3: epub, indent ... --- data/doc/sisu/CHANGELOG_v3 | 4 +- lib/sisu/v3/epub_format.rb | 430 ++++++++++++++++++++++++++++++++++++++++++- lib/sisu/v3/epub_segments.rb | 28 ++- 3 files changed, 442 insertions(+), 20 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 29f166dd..98a6380d 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -26,8 +26,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.14.orig.tar.gz _[0-9]?_[1-9] initial indent; paragraph text indent - * done: dal, plaintext, css, html, xhtml, xml sax, xml dom; - not done: epub, pdf, odf, man, info + * done: dal, plaintext, css, html, epub, xhtml, xml sax, xml dom; + not done: pdf, odf, man, info check: po4a, html_lite (used in sql search results) * syntax highlighting done: vim (sisu.vim), emacs (sisu-mode.el) diff --git a/lib/sisu/v3/epub_format.rb b/lib/sisu/v3/epub_format.rb index 6879c933..2a9af20e 100644 --- a/lib/sisu/v3/epub_format.rb +++ b/lib/sisu/v3/epub_format.rb @@ -161,6 +161,7 @@ module SiSU_EPUB_Format margin-right: 2em; margin-top: 10px; margin-bottom: 0px; + padding-left: 0em; text-indent: 0mm; } p, h0, h1, h2, h3, h4, h5, h6 { @@ -177,15 +178,426 @@ module SiSU_EPUB_Format margin-bottom: 3px; } p.norm { } - p.i1 {margin-left: 1em;} - p.i2 {margin-left: 2em;} - p.i3 {margin-left: 3em;} - p.i4 {margin-left: 4em;} - p.i5 {margin-left: 5em;} - p.i6 {margin-left: 6em;} - p.i7 {margin-left: 7em;} - p.i8 {margin-left: 8em;} - p.i9 {margin-left: 9em;} + p.i1 {padding-left: 1em;} + p.i2 {padding-left: 2em;} + p.i3 {padding-left: 3em;} + p.i4 {padding-left: 4em;} + p.i5 {padding-left: 5em;} + p.i6 {padding-left: 6em;} + p.i7 {padding-left: 7em;} + p.i8 {padding-left: 8em;} + p.i9 {padding-left: 9em;} + + p.h0i0 { + padding-left: 0em; + text-indent: 0em; + } + p.h0i1 { + padding-left: 1em; + text-indent: -1em; + } + p.h0i2 { + padding-left: 2em; + text-indent: -2em; + } + p.h0i3 { + padding-left: 3em; + text-indent: -3em; + } + p.h0i4 { + padding-left: 4em; + text-indent: -4em; + } + p.h0i5 { + padding-left: 5em; + text-indent: -5em; + } + p.h0i6 { + padding-left: 6em; + text-indent: -6em; + } + p.h0i7 { + padding-left: 7em; + text-indent: -7em; + } + p.h0i8 { + padding-left: 8em; + text-indent: -8em; + } + p.h0i9 { + padding-left: 9em; + text-indent: -9em; + } + + p.h1i0 { + padding-left: 0em; + text-indent: 1em; + } + p.h1i1 { + padding-left: 1em; + text-indent: 0em; + } + p.h1i2 { + padding-left: 2em; + text-indent: -1em; + } + p.h1i3 { + padding-left: 3em; + text-indent: -2em; + } + p.h1i4 { + padding-left: 4em; + text-indent: -3em; + } + p.h1i5 { + padding-left: 5em; + text-indent: -4em; + } + p.h1i6 { + padding-left: 6em; + text-indent: -5em; + } + p.h1i7 { + padding-left: 7em; + text-indent: -6em; + } + p.h1i8 { + padding-left: 8em; + text-indent: -7em; + } + p.h1i9 { + padding-left: 9em; + text-indent: -8em; + } + + p.h2i0 { + padding-left: 0em; + text-indent: 2em; + } + p.h2i1 { + padding-left: 1em; + text-indent: 1em; + } + p.h2i2 { + padding-left: 2em; + text-indent: 0em; + } + p.h2i3 { + padding-left: 3em; + text-indent: -1em; + } + p.h2i4 { + padding-left: 4em; + text-indent: -2em; + } + p.h2i5 { + padding-left: 5em; + text-indent: -3em; + } + p.h2i6 { + padding-left: 6em; + text-indent: -4em; + } + p.h2i7 { + padding-left: 7em; + text-indent: -5em; + } + p.h2i8 { + padding-left: 8em; + text-indent: -6em; + } + p.h2i9 { + padding-left: 9em; + text-indent: -7em; + } + + p.h3i0 { + padding-left: 0em; + text-indent: 3em; + } + p.h3i1 { + padding-left: 1em; + text-indent: 2em; + } + p.h3i2 { + padding-left: 2em; + text-indent: 1em; + } + p.h3i3 { + padding-left: 3em; + text-indent: 0em; + } + p.h3i4 { + padding-left: 4em; + text-indent: -1em; + } + p.h3i5 { + padding-left: 5em; + text-indent: -2em; + } + p.h3i6 { + padding-left: 6em; + text-indent: -3em; + } + p.h3i7 { + padding-left: 7em; + text-indent: -4em; + } + p.h3i8 { + padding-left: 8em; + text-indent: -5em; + } + p.h3i9 { + padding-left: 9em; + text-indent: -6em; + } + + p.h4i0 { + padding-left: 0em; + text-indent: 4em; + } + p.h4i1 { + padding-left: 1em; + text-indent: 3em; + } + p.h4i2 { + padding-left: 2em; + text-indent: 2em; + } + p.h4i3 { + padding-left: 3em; + text-indent: 1em; + } + p.h4i4 { + padding-left: 4em; + text-indent: 0em; + } + p.h4i5 { + padding-left: 5em; + text-indent: -1em; + } + p.h4i6 { + padding-left: 6em; + text-indent: -2em; + } + p.h4i7 { + padding-left: 7em; + text-indent: -3em; + } + p.h4i8 { + padding-left: 8em; + text-indent: -4em; + } + p.h4i9 { + padding-left: 9em; + text-indent: -5em; + } + + p.h5i0 { + padding-left: 0em; + text-indent: 5em; + } + p.h5i1 { + padding-left: 1em; + text-indent: 4em; + } + p.h5i2 { + padding-left: 2em; + text-indent: 3em; + } + p.h5i3 { + padding-left: 3em; + text-indent: 2em; + } + p.h5i4 { + padding-left: 4em; + text-indent: 1em; + } + p.h5i5 { + padding-left: 5em; + text-indent: 0em; + } + p.h5i6 { + padding-left: 6em; + text-indent: -1em; + } + p.h5i7 { + padding-left: 7em; + text-indent: -2em; + } + p.h5i8 { + padding-left: 8em; + text-indent: -3em; + } + p.h5i9 { + padding-left: 9em; + text-indent: -4em; + } + + p.h6i0 { + padding-left: 0em; + text-indent: 6em; + } + p.h6i1 { + padding-left: 1em; + text-indent: 5em; + } + p.h6i2 { + padding-left: 2em; + text-indent: 4em; + } + p.h6i3 { + padding-left: 3em; + text-indent: 3em; + } + p.h6i4 { + padding-left: 4em; + text-indent: 2em; + } + p.h6i5 { + padding-left: 5em; + text-indent: 1em; + } + p.h6i6 { + padding-left: 6em; + text-indent: 0em; + } + p.h6i7 { + padding-left: 7em; + text-indent: -1em; + } + p.h6i8 { + padding-left: 8em; + text-indent: -2em; + } + p.h6i9 { + padding-left: 9em; + text-indent: -3em; + } + + p.h7i0 { + padding-left: 0em; + text-indent: 7em; + } + p.h7i1 { + padding-left: 1em; + text-indent: 6em; + } + p.h7i2 { + padding-left: 2em; + text-indent: 5em; + } + p.h7i3 { + padding-left: 3em; + text-indent: 4em; + } + p.h7i4 { + padding-left: 4em; + text-indent: 3em; + } + p.h7i5 { + padding-left: 5em; + text-indent: 2em; + } + p.h7i6 { + padding-left: 6em; + text-indent: 1em; + } + p.h7i7 { + padding-left: 7em; + text-indent: 0em; + } + p.h7i8 { + padding-left: 8em; + text-indent: -1em; + } + p.h7i9 { + padding-left: 9em; + text-indent: -2em; + } + + p.h8i0 { + padding-left: 0em; + text-indent: 8em; + } + p.h8i1 { + padding-left: 1em; + text-indent: 7em; + } + p.h8i2 { + padding-left: 2em; + text-indent: 6em; + } + p.h8i3 { + padding-left: 3em; + text-indent: 5em; + } + p.h8i4 { + padding-left: 4em; + text-indent: 4em; + } + p.h8i5 { + padding-left: 5em; + text-indent: 3em; + } + p.h8i6 { + padding-left: 6em; + text-indent: 2em; + } + p.h8i7 { + padding-left: 7em; + text-indent: 1em; + } + p.h8i8 { + padding-left: 8em; + text-indent: 0em; + } + p.h8i9 { + padding-left: 9em; + text-indent: -1em; + } + + p.h9i0 { + padding-left: 0em; + text-indent: 9em; + } + p.h9i1 { + padding-left: 1em; + text-indent: 8em; + } + p.h9i2 { + padding-left: 2em; + text-indent: 7em; + } + p.h9i3 { + padding-left: 3em; + text-indent: 6em; + } + p.h9i4 { + padding-left: 4em; + text-indent: 5em; + } + p.h9i5 { + padding-left: 5em; + text-indent: 4em; + } + p.h9i6 { + padding-left: 6em; + text-indent: 3em; + } + p.h9i7 { + padding-left: 7em; + text-indent: 2em; + } + p.h9i8 { + padding-left: 8em; + text-indent: 1em; + } + p.h9i9 { + padding-left: 9em; + text-indent: 0em; + } + p.it0 { margin-left: 0em; diff --git a/lib/sisu/v3/epub_segments.rb b/lib/sisu/v3/epub_segments.rb index 7bddf917..b9b75b9c 100644 --- a/lib/sisu/v3/epub_segments.rb +++ b/lib/sisu/v3/epub_segments.rb @@ -360,8 +360,11 @@ WOK @p_num=SiSU_EPUB_Format::Paragraph_number.new(@md,dob.ocn) end sto=SiSU_EPUB_Format::Format_text_object.new(@md,dob) - dob_xhtml=if dob.is=='heading' or dob.is=='heading_insert' or dob.is=='para' - dob_xhtml=if dob.is=='heading' or dob.is=='heading_insert' + dob_xhtml=if dob.is=='heading' \ + or dob.is=='heading_insert' \ + or dob.is=='para' + dob_xhtml=if dob.is=='heading' \ + or dob.is=='heading_insert' if dob.ln==4 sto.seg_heading4 # work on see Split_text_object elsif dob.ln==5 @@ -369,16 +372,23 @@ WOK elsif dob.ln==6; sto.seg_heading6 end elsif dob.is=='para' - if dob.indent and dob.indent =~/[1-9]/ + if dob.indent \ + and dob.hang \ + and dob.indent =~/[0-9]/ \ + and dob.hang =~/[0-9]/ if dob.bullet_ - sto.format('li',"i#{dob.indent}") - else sto.format('p',"i#{dob.indent}") - end - else - if dob.bullet_ - sto.format('li','bullet') + if dob.indent =~/[1-9]/ + sto.format('li',"i#{dob.indent}") + else + sto.format('li','bullet') + end + elsif dob.indent == dob.hang + sto.format('p',"i#{dob.indent}") + elsif dob.indent != dob.hang + sto.format('p',"h#{dob.hang}i#{dob.indent}") else sto.para end + else sto.para end end elsif dob.is =~/^(?:block|group|alt)$/ -- cgit v1.2.3 From dba6d8b359e626a30d613685b0a686c29df4e98b Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:30:47 -0400 Subject: v3: texpdf, indent ... --- data/doc/sisu/CHANGELOG_v3 | 4 +- lib/sisu/v3/texpdf.rb | 8 ++- lib/sisu/v3/texpdf_format.rb | 148 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 157 insertions(+), 3 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 98a6380d..73d1062d 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -26,8 +26,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.14.orig.tar.gz _[0-9]?_[1-9] initial indent; paragraph text indent - * done: dal, plaintext, css, html, epub, xhtml, xml sax, xml dom; - not done: pdf, odf, man, info + * done: dal, plaintext, css, html, epub, xhtml, xml sax, xml dom, pdf; + not done: odf, man, info check: po4a, html_lite (used in sql search results) * syntax highlighting done: vim (sisu.vim), emacs (sisu-mode.el) diff --git a/lib/sisu/v3/texpdf.rb b/lib/sisu/v3/texpdf.rb index 22269fc2..9e223920 100644 --- a/lib/sisu/v3/texpdf.rb +++ b/lib/sisu/v3/texpdf.rb @@ -515,8 +515,14 @@ module SiSU_TeX if dob.bullet_ dob.tmp=tst.bullet elsif dob.indent \ - and dob.indent =~/[1-9]/ + and dob.hang \ + and dob.indent =~/[1-9]/ \ + and dob.indent == dob.hang dob.tmp=tst.indent + elsif dob.hang \ + and dob.hang =~/[0-9]/ \ + and (dob.indent != dob.hang or dob.indent =~/[1-9]/) + dob.tmp=tst.hang else dob.tmp.strip! dob=enclose(dob) unless dob.tmp =~/^$/ diff --git a/lib/sisu/v3/texpdf_format.rb b/lib/sisu/v3/texpdf_format.rb index cd63cd4e..76f0630a 100644 --- a/lib/sisu/v3/texpdf_format.rb +++ b/lib/sisu/v3/texpdf_format.rb @@ -293,6 +293,141 @@ module SiSU_TeX_Pdf # '\subsubsection*{\1}') dob end + def hang + case @dob.indent + when /0/ + case @dob.hang + when /0/; indent,hang='0mm', '0mm' + when /1/; indent,hang='0mm','10mm' + when /2/; indent,hang='0mm','20mm' + when /3/; indent,hang='0mm','30mm' + when /4/; indent,hang='0mm','40mm' + when /5/; indent,hang='0mm','50mm' + when /6/; indent,hang='0mm','60mm' + when /7/; indent,hang='0mm','70mm' + when /8/; indent,hang='0mm','80mm' + when /9/; indent,hang='0mm','90mm' + end + when /1/ + case @dob.hang + when /0/; indent,hang='10mm','-10mm' + when /1/; indent,hang='10mm', '0mm' + when /2/; indent,hang='10mm', '10mm' + when /3/; indent,hang='10mm', '20mm' + when /4/; indent,hang='10mm', '30mm' + when /5/; indent,hang='10mm', '40mm' + when /6/; indent,hang='10mm', '50mm' + when /7/; indent,hang='10mm', '60mm' + when /8/; indent,hang='10mm', '70mm' + when /9/; indent,hang='10mm', '80mm' + end + when /2/ + case @dob.hang + when /0/; indent,hang='20mm','-20mm' + when /1/; indent,hang='20mm','-10mm' + when /2/; indent,hang='20mm', '0mm' + when /3/; indent,hang='20mm', '10mm' + when /4/; indent,hang='20mm', '20mm' + when /5/; indent,hang='20mm', '30mm' + when /6/; indent,hang='20mm', '40mm' + when /7/; indent,hang='20mm', '50mm' + when /8/; indent,hang='20mm', '60mm' + when /9/; indent,hang='20mm', '70mm' + end + when /3/ + case @dob.hang + when /0/; indent,hang='30mm','-30mm' + when /1/; indent,hang='30mm','-20mm' + when /2/; indent,hang='30mm','-10mm' + when /3/; indent,hang='30mm', '0mm' + when /4/; indent,hang='30mm', '10mm' + when /5/; indent,hang='30mm', '20mm' + when /6/; indent,hang='30mm', '30mm' + when /7/; indent,hang='30mm', '40mm' + when /8/; indent,hang='30mm', '50mm' + when /9/; indent,hang='30mm', '60mm' + end + when /4/ + case @dob.hang + when /0/; indent,hang='40mm','-40mm' + when /1/; indent,hang='40mm','-30mm' + when /2/; indent,hang='40mm','-20mm' + when /3/; indent,hang='40mm','-10mm' + when /4/; indent,hang='40mm', '0mm' + when /5/; indent,hang='40mm', '10mm' + when /6/; indent,hang='40mm', '20mm' + when /7/; indent,hang='40mm', '30mm' + when /8/; indent,hang='40mm', '40mm' + when /9/; indent,hang='40mm', '50mm' + end + when /5/ + case @dob.hang + when /0/; indent,hang='50mm','-50mm' + when /1/; indent,hang='50mm','-40mm' + when /2/; indent,hang='50mm','-30mm' + when /3/; indent,hang='50mm','-20mm' + when /4/; indent,hang='50mm','-10mm' + when /5/; indent,hang='50mm', '0mm' + when /6/; indent,hang='50mm', '10mm' + when /7/; indent,hang='50mm', '20mm' + when /8/; indent,hang='50mm', '30mm' + when /9/; indent,hang='50mm', '40mm' + end + when /6/ + case @dob.hang + when /0/; indent,hang='60mm','-60mm' + when /1/; indent,hang='60mm','-50mm' + when /2/; indent,hang='60mm','-40mm' + when /3/; indent,hang='60mm','-30mm' + when /4/; indent,hang='60mm','-20mm' + when /5/; indent,hang='60mm','-10mm' + when /6/; indent,hang='60mm', '0mm' + when /7/; indent,hang='60mm', '10mm' + when /8/; indent,hang='60mm', '20mm' + when /9/; indent,hang='60mm', '30mm' + end + when /7/ + case @dob.hang + when /0/; indent,hang='70mm','-70mm' + when /1/; indent,hang='70mm','-60mm' + when /2/; indent,hang='70mm','-50mm' + when /3/; indent,hang='70mm','-40mm' + when /4/; indent,hang='70mm','-30mm' + when /5/; indent,hang='70mm','-20mm' + when /6/; indent,hang='70mm','-10mm' + when /7/; indent,hang='70mm', '0mm' + when /8/; indent,hang='70mm', '10mm' + when /9/; indent,hang='70mm', '20mm' + end + when /8/ + case @dob.hang + when /0/; indent,hang='80mm','-80mm' + when /1/; indent,hang='80mm','-70mm' + when /2/; indent,hang='80mm','-60mm' + when /3/; indent,hang='80mm','-50mm' + when /4/; indent,hang='80mm','-40mm' + when /5/; indent,hang='80mm','-30mm' + when /6/; indent,hang='80mm','-20mm' + when /7/; indent,hang='80mm','-10mm' + when /8/; indent,hang='80mm', '0mm' + when /9/; indent,hang='80mm', '10mm' + end + when /9/ + case @dob.hang + when /0/; indent,hang='90mm','-90mm' + when /1/; indent,hang='90mm','-80mm' + when /2/; indent,hang='90mm','-70mm' + when /3/; indent,hang='90mm','-60mm' + when /4/; indent,hang='90mm','-50mm' + when /5/; indent,hang='90mm','-40mm' + when /6/; indent,hang='90mm','-30mm' + when /7/; indent,hang='90mm','-20mm' + when /8/; indent,hang='90mm','-10mm' + when /9/; indent,hang='90mm', '0mm' + end + end + "\\begin{ParagraphHang}{#{indent}}{#{hang}}#{@dob.tmp} \\end{ParagraphHang}}" + end def indent indent=case @dob.indent when /1/; '0mm' @@ -928,6 +1063,19 @@ WOK \\item[] } {\\end{list}} + +\\newenvironment{ParagraphHang}[2]% +{ +\\begin{list}{}{% +\\setlength\\topsep{0pt}% +\\addtolength{\\leftmargin}{#1} +\\itemindent=#2 +\\setlength\\parsep{0pt plus 1pt}% +} +\\item[] +} +{\\end{list}} + \\newenvironment{Bullet}[1]% { \\begin{list}{}{% -- cgit v1.2.3 From e3330f16f31ccc9cd62d5d1f15e76cec4e45485d Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:32:10 -0400 Subject: v3: sql (pg, sqlite), indent ... --- data/doc/sisu/CHANGELOG_v3 | 2 +- lib/sisu/v3/db_import.rb | 10 +++++++++- lib/sisu/v3/shared_html_lite.rb | 6 ++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 73d1062d..b10bf30d 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -26,7 +26,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.14.orig.tar.gz _[0-9]?_[1-9] initial indent; paragraph text indent - * done: dal, plaintext, css, html, epub, xhtml, xml sax, xml dom, pdf; + * done: dal, plaintext, css, html, epub, xhtml, xml sax, xml dom, pdf, sql; not done: odf, man, info check: po4a, html_lite (used in sql search results) * syntax highlighting done: vim (sisu.vim), emacs (sisu-mode.el) diff --git a/lib/sisu/v3/db_import.rb b/lib/sisu/v3/db_import.rb index 541399a9..ac6f0104 100644 --- a/lib/sisu/v3/db_import.rb +++ b/lib/sisu/v3/db_import.rb @@ -393,8 +393,16 @@ module SiSU_DB_import SiSU_Format_Shared::CSS_Format.new(@md,data).html_table elsif data.is=='code' SiSU_Format_Shared::CSS_Format.new(@md,data).code - elsif defined? data.indent and data.indent =~/[1-9]/ + elsif defined? data.indent \ + and defined? data.hang \ + and data.indent =~/[1-9]/ \ + and data.indent == data.hang SiSU_Format_Shared::CSS_Format.new(@md,data).indent(data.indent) + elsif defined? data.indent \ + and defined? data.hang \ + and data.hang =~/[0-9]/ \ + and data.indent != data.hang + SiSU_Format_Shared::CSS_Format.new(@md,data).hang_indent(data.hang,data.indent) else SiSU_Format_Shared::CSS_Format.new(@md,data).norm end diff --git a/lib/sisu/v3/shared_html_lite.rb b/lib/sisu/v3/shared_html_lite.rb index fca0cfb8..0dd13a34 100644 --- a/lib/sisu/v3/shared_html_lite.rb +++ b/lib/sisu/v3/shared_html_lite.rb @@ -236,6 +236,12 @@ GSUB h={ txt: txt, class: "indent#{t}", type: 'substantive', id: @ocn } tag_para(h) end + def hang_indent(f,t) + txt=markup_object(@t_o) + h={ txt: txt, class: "hang#{f}indent#{t}", type: 'substantive', id: @ocn } + #h={ txt: txt, class: "h#{f}i#{t}", type: 'substantive', id: @ocn } + tag_para(h) + end def para_table %{

} end -- cgit v1.2.3 From d9dcd8911f88949c268683beb925642a5f2e1035 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:33:39 -0400 Subject: v3: odf, manpage, "new" indent not implemented --- lib/sisu/v3/manpage.rb | 6 +++++- lib/sisu/v3/odf.rb | 8 +++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/sisu/v3/manpage.rb b/lib/sisu/v3/manpage.rb index 0a2c2fcc..e23caa76 100644 --- a/lib/sisu/v3/manpage.rb +++ b/lib/sisu/v3/manpage.rb @@ -202,11 +202,15 @@ WOK or dob.is=='heading' paragraph=dob.obj if dob.is=='para' - if dob.indent =~/[1-9]/ + if dob.indent =~/[1-9]/ \ + and dob.indent == dob.hang util=if dob.bullet_ SiSU_text_utils::Wrap.new("* #{paragraph}",78,dob.indent.to_i*2) else SiSU_text_utils::Wrap.new(paragraph,78,dob.indent.to_i*2) end + elsif dob.hang =~/[0-9]/ \ + and dob.indent != dob.hang # NOT yet implemented + util=SiSU_text_utils::Wrap.new(paragraph,78,dob.indent.to_i*2) else util=if dob.bullet_ SiSU_text_utils::Wrap.new("* #{paragraph}",78,0) diff --git a/lib/sisu/v3/odf.rb b/lib/sisu/v3/odf.rb index c42ce349..49856a87 100644 --- a/lib/sisu/v3/odf.rb +++ b/lib/sisu/v3/odf.rb @@ -308,7 +308,13 @@ module SiSU_ODF %{#{@brace_url.xml_open}\\1#{@brace_url.xml_close}}) dob.obj.gsub!(/#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/, %{#{@brace_url.xml_open}\\1#{@brace_url.xml_close}}) #http ftp matches with decoration - dob.obj= if dob.is=='para' and dob.indent.to_s =~/[0-9]/ # and t_o.bullet_==true + dob.obj= if dob.is=='para' \ + and dob.indent.to_s =~/[0-9]/ \ + and dob.indent == dob.hang + %{#{dob.obj}#{p_num}} + elsif dob.is=='para' \ + and dob.hang.to_s =~/[0-9]/ \ + and dob.indent != dob.hang # NOT yet implemented %{#{dob.obj}#{p_num}} else %{#{dob.obj}#{p_num}} end -- cgit v1.2.3 From d613c9786784d6ff948d11dc248564ccca6ed469 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:34:37 -0400 Subject: v3: po4a, indent (check for breakage) --- lib/sisu/v3/po4a.rb | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/lib/sisu/v3/po4a.rb b/lib/sisu/v3/po4a.rb index dd2aff7a..c87da346 100644 --- a/lib/sisu/v3/po4a.rb +++ b/lib/sisu/v3/po4a.rb @@ -498,8 +498,8 @@ GSUB #puts z unless z.empty? end end - def pot_structure(desc,orig,trans,indent=0) - SiSU_po4a_utils::Wrap.new(@md,orig,trans,desc,@wrap_width,indent) + def pot_structure(desc,orig,trans,indent=0,hang=0) + SiSU_po4a_utils::Wrap.new(@md,orig,trans,desc,@wrap_width,indent,hang) end def pot_structure_heading(dob_src='',notes_s='',dob_trn='',notes_t='') #% Used to extract the structure of a document lv=n=n3=nil @@ -533,7 +533,8 @@ GSUB end def pot_structure_para(dob_src='',notes_s='',dob_trn='',notes_t='') #% Used to extract the structure of a document util=nil - wrapped=if dob_src.indent =~/[1-9]/ + wrapped=if dob_src.indent =~/[1-9]/ \ + and dob_src.indent == dob_src.hang s_mark=desc=orig=trans='' if dob_src.bullet_ mark="_#{dob_src.indent}* " @@ -557,6 +558,20 @@ GSUB orig="#{s_mark}#{dob_src.obj}" trans=(dob_trn=='') ? '' : "#{s_mark}#{dob_trn.obj}" util=pot_structure(desc,orig,trans) + elsif dob_src.hang =~/[0-9]/ \ + and dob_src.indent != dob_src.hang + s_mark=desc=orig=trans='' + mark="_#{dob_src.hang}_#{dob_src.indent} " + d="#{dob_src.is}: hang #{dob_src.hang} indent #{dob_src.indent}" + instruct=s_mark='' + if @md.opt.cmd=~/M/ + instruct=%{\n# markup for indented text with a first line indented to a different level from the rest of the paragraph, is at the start of the line/object, an underscore and the first indent level a second underscore and the indent level for the rest of the paragraph, "#{mark1}"} + s_mark="\n# " + %{"\\n\\n#{mark}...\\n\\n"} + end + desc="#{d}#{s_mark}#{instruct}" + orig="#{s_mark}#{dob_src.obj}" + trans=(dob_trn=='') ? '' : "#{s_mark}#{dob_trn.obj}" + util=pot_structure(desc,orig,trans) else s_mark=desc=orig=trans='' if dob_src.bullet_ -- cgit v1.2.3 From bd65e8adf156439b93c01a89b2e6269817c883fb Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:35:12 -0400 Subject: v2 v3: sisu_manual * sisu_commands: --qrcode -Q; update shortcut options; line-breaks use \\ * sisu_markup.sst: indent update; publisher --- data/doc/sisu/CHANGELOG_v3 | 4 + .../markup-samples/sisu_manual/sisu_commands.sst | 230 +++++++++++---------- .../markup-samples/sisu_manual/sisu_markup.sst | 29 ++- 3 files changed, 150 insertions(+), 113 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index b10bf30d..7234637e 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -43,6 +43,10 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.14.orig.tar.gz * sql db, constants, cgi-sql, structure changed, creator editor field added + * sisu_manual + * sisu_commands: --qrcode -Q; update shortcut options; line-breaks use \\ + * sisu_markup.sst: indent update; publisher + * vim sisu syntax highlighting * markers for hanging indent added * added header for @creator: :editor: diff --git a/data/doc/sisu/markup-samples/sisu_manual/sisu_commands.sst b/data/doc/sisu/markup-samples/sisu_manual/sisu_commands.sst index a5f380a9..86ac41cf 100644 --- a/data/doc/sisu/markup-samples/sisu_manual/sisu_commands.sst +++ b/data/doc/sisu/markup-samples/sisu_manual/sisu_commands.sst @@ -1,4 +1,4 @@ -% SiSU 2.0 +% SiSU 3.0 @title: SiSU :subtitle: Commands @@ -57,276 +57,282 @@ SiSU is a document publishing system, that from a simple single marked-up docume 2~ Document Processing Command Flags -!_ -a [filename/wildcard]
+!_ -a [filename/wildcard] \\ produces plaintext with Unix linefeeds and without markup, (object numbers are omitted), has footnotes at end of each paragraph that contains them [ -A for equivalent dos (linefeed) output file] [see -e for endnotes]. (Options include: --endnotes for endnotes --footnotes for footnotes at the end of each paragraph --unix for unix linefeed (default) --msdos for msdos linefeed) -!_ -b [filename/wildcard]
+!_ -b [filename/wildcard] \\ see --xhtml -!_ --color-toggle [filename/wildcard]
+!_ --color-toggle [filename/wildcard] \\ screen toggle ansi screen colour on or off depending on default set (unless -c flag is used: if sisurc colour default is set to 'true', output to screen will be with colour, if sisurc colour default is set to 'false' or is undefined screen output will be without colour). Alias -c -!_ --concordance [filename/wildcard]
+!_ --concordance [filename/wildcard] \\ produces concordance (wordmap) a rudimentary index of all the words in a document. (Concordance files are not generated for documents of over 260,000 words unless this limit is increased in the file sisurc.yml). Alias -w -!_ -C [--init-site]
+!_ -C [--init-site] \\ configure/initialise shared output directory files initialize shared output directory (config files such as css and dtd files are not updated if they already exist unless modifier is used). -C --init-site configure/initialise site more extensive than -C on its own, shared output directory files/force update, existing shared output config files such as css and dtd files are updated if this modifier is used. -!_ -CC
+!_ -CC \\ configure/initialise shared output directory files initialize shared output directory (config files such as css and dtd files are not updated if they already exist unless modifier is used). The equivalent of: -C --init-site configure/initialise site, more extensive than -C on its own, shared output directory files/force update, existing shared output config files such as css and dtd files are updated if -CC is used. -!_ -c [filename/wildcard]
+!_ -c [filename/wildcard] \\ see --color-toggle -!_ --dal [filename/wildcard/url]
+!_ --dal [filename/wildcard/url] \\ assumed for most other flags, creates new intermediate files for processing (document abstraction) that is used in all subsequent processing of other output. This step is assumed for most processing flags. To skip it see -n. Alias -m -!_ --delete [filename/wildcard]
+!_ --delete [filename/wildcard] \\ see --zap -!_ -D [instruction] [filename]
+!_ -D [instruction] [filename] \\ see --pg -!_ -d [--db-[database type (sqlite|pg)]] --[instruction] [filename]
+!_ -d [--db-[database type (sqlite|pg)]] --[instruction] [filename] \\ see --sqlite -!_ --epub [filename/wildcard]
+!_ --epub [filename/wildcard] \\ produces an epub document, [sisu version >=2 ] (filename.epub). Alias -e -!_ -e [filename/wildcard]
+!_ -e [filename/wildcard] \\ see --epub -!_ --find [optional string part of filename]
+!_ --find [optional string part of filename] \\ without match string, glob all .sst .ssm files in directory (including language subdirectories). With match string, find files that match given string in directory (including language subdirectories). Alias -f, --glob, -G -!_ -F [--webserv=webrick]
+!_ -F [--webserv=webrick] \\ see --sample-search-form -!_ -f [optional string part of filename]
+!_ -f [optional string part of filename] \\ see --find -!_ --git [filename/wildcard]
+!_ --git [filename/wildcard] \\ produces or updates markup source file structure in a git repo (experimental and subject to change). Alias -g -!_ --glob [optional string part of filename]
+!_ --glob [optional string part of filename] \\ see --find -!_ -G [optional string part of filename]
+!_ -G [optional string part of filename] \\ see --find -!_ -g [filename/wildcard]
+!_ -g [filename/wildcard] \\ see --git -!_ --harvest *.ss[tm]
+!_ --harvest *.ss[tm] \\ makes two lists of sisu output based on the sisu markup documents in a directory: list of author and authors works (year and titles), and; list by topic with titles and author. Makes use of header metadata fields (author, title, date, topic_register). Can be used with maintenance (-M) and remote placement (-R) flags. -!_ --help [topic]
+!_ --help [topic] \\ provides help on the selected topic, where topics (keywords) include: list, (com)mands, short(cuts), (mod)ifiers, (env)ironment, markup, syntax, headers, headings, endnotes, tables, example, customise, skin, (dir)ectories, path, (lang)uage, db, install, setup, (conf)igure, convert, termsheet, search, sql, features, license -!_ --html [filename/wildcard]
+!_ --html [filename/wildcard] \\ produces html output, segmented text with table of contents (toc.html and index.html) and the document in a single file (scroll.html). Alias -h -!_ -h [filename/wildcard]
+!_ -h [filename/wildcard] \\ see --html -!_ -I [filename/wildcard]
+!_ -I [filename/wildcard] \\ see --texinfo -!_ -i [filename/wildcard]
+!_ -i [filename/wildcard] \\ see --manpage -!_ --keep-processing-files [filename/wildcard/url]
+!_ --keep-processing-files [filename/wildcard/url] \\ see --maintenance -!_ -L
+!_ -L \\ prints license information. -!_ --machine [filename/wildcard/url]
+!_ --machine [filename/wildcard/url] \\ see --dal (document abstraction level/layer) -!_ --maintenance [filename/wildcard/url]
+!_ --maintenance [filename/wildcard/url] \\ maintenance mode, interim processing files are preserved and their locations indicated. (also see -V). Aliases -M and --keep-processing-files -!_ --manpage [filename/wildcard]
+!_ --manpage [filename/wildcard] \\ produces man page of file, not suitable for all outputs. Alias -i -!_ -M [filename/wildcard/url]
+!_ -M [filename/wildcard/url] \\ see --maintenance -!_ -m [filename/wildcard/url]
+!_ -m [filename/wildcard/url] \\ see --dal (document abstraction level/layer) -!_ --no-ocn
+!_ --no-ocn \\ [with --html --pdf or --epub] switches off object citation numbering. Produce output without identifying numbers in margins of html or LaTeX/pdf output. -!_ -N [filename/wildcard/url]
+!_ -N [filename/wildcard/url] \\ document digest or document content certificate ( DCC ) as md5 digest tree of the document: the digest for the document, and digests for each object contained within the document (together with information on software versions that produced it) (digest.txt). -NV for verbose digest output to screen. -!_ -n [filename/wildcard/url]
+!_ -n [filename/wildcard/url] \\ skip the creation of intermediate processing files (document abstraction) if they already exist, this skips the equivalent of -m which is otherwise assumed by most processing flags. -!_ --odf [filename/wildcard/url]
+!_ --odf [filename/wildcard/url] \\ see --odt -!_ --odt [filename/wildcard/url]
+!_ --odt [filename/wildcard/url] \\ output basic document in opendocument file format (opendocument.odt). Alias -o -!_ -o [filename/wildcard/url]
+!_ -o [filename/wildcard/url] \\ see --odt -!_ --pdf [filename/wildcard]
+!_ --pdf [filename/wildcard] \\ produces LaTeX pdf (portrait.pdf & landscape.pdf). Default paper size is set in config file, or document header, or provided with additional command line parameter, e.g. --papersize-a4 preset sizes include: 'A4', U.S. 'letter' and 'legal' and book sizes 'A5' and 'B5' (system defaults to A4). Alias -p -!_ --pg [instruction] [filename]
+!_ --pg [instruction] [filename] \\ database postgresql ( --pgsql may be used instead) possible instructions, include: --createdb; --create; --dropall; --import [filename]; --update [filename]; --remove [filename]; see database section below. Alias -D -!_ --po [language_directory/filename language_directory]
+!_ --po [language_directory/filename language_directory] \\ see --po4a -!_ --po4a [language_directory/filename language_directory]
+!_ --po4a [language_directory/filename language_directory] \\ produces .pot and po files for the file in the languages specified by the language directory. SiSU markup is placed in subdirectories named with the language code, e.g. en/ fr/ es/. The sisu config file must set the output directory structure to multilingual. v3, experimental -!_ -P [language_directory/filename language_directory]
+!_ -P [language_directory/filename language_directory] \\ see --po4a -!_ -p [filename/wildcard]
+!_ -p [filename/wildcard] \\ see --pdf -!_ --quiet [filename/wildcard]
+!_ --qrcode [filename/wildcard] \\ +generate QR code image of metadata (used in manifest). v3 only. + +!_ --quiet [filename/wildcard] \\ quiet less output to screen. -!_ -q [filename/wildcard]
+!_ -Q [filename/wildcard] \\ +see --qrcode + +!_ -q [filename/wildcard] \\ see --quiet -!_ --rsync [filename/wildcard]
+!_ --rsync [filename/wildcard] \\ copies sisu output files to remote host using rsync. This requires that sisurc.yml has been provided with information on hostname and username, and that you have your "keys" and ssh agent in place. Note the behavior of rsync different if -R is used with other flags from if used alone. Alone the rsync --delete parameter is sent, useful for cleaning the remote directory (when -R is used together with other flags, it is not). Also see --scp. Alias -R -!_ -R [filename/wildcard]
+!_ -R [filename/wildcard] \\ see --rsync -!_ -r [filename/wildcard]
+!_ -r [filename/wildcard] \\ see --scp -!_ --sample-search-form [--webserv=webrick]
+!_ --sample-search-form [--webserv=webrick] \\ generate examples of (naive) cgi search form for sqlite and pgsql depends on your already having used sisu to populate an sqlite and/or pgsql database, (the sqlite version scans the output directories for existing sisu_sqlite databases, so it is first necessary to create them, before generating the search form) see -d -D and the database section below. If the optional parameter --webserv=webrick is passed, the cgi examples created will be set up to use the default port set for use by the webrick server, (otherwise the port is left blank and the system setting used, usually 80). The samples are dumped in the present work directory which must be writable, (with screen instructions given that they be copied to the cgi-bin directory). Alias -F -!_ --scp [filename/wildcard]
+!_ --scp [filename/wildcard] \\ copies sisu output files to remote host using scp. This requires that sisurc.yml has been provided with information on hostname and username, and that you have your "keys" and ssh agent in place. Also see --rsync. Alias -r -!_ --sqlite --[instruction] [filename]
+!_ --sqlite --[instruction] [filename] \\ database type default set to sqlite, (for which --sqlite may be used instead) or to specify another database --db-[pgsql, sqlite] (however see -D) possible instructions include: --createdb; --create; --dropall; --import [filename]; --update [filename]; --remove [filename]; see database section below. Alias -d -!_ --sisupod
+!_ --sisupod \\ produces a sisupod a zipped sisu directory of markup files including sisu markup source files and the directories local configuration file, images and skins. Note: this only includes the configuration files or skins contained in ./_sisu not those in ~/.sisu -S [filename/wildcard] option. Note: (this option is tested only with zsh). Alias -S -!_ --sisupod [filename/wildcard]
+!_ --sisupod [filename/wildcard] \\ produces a zipped file of the prepared document specified along with associated images, by default named sisupod.zip they may alternatively be named with the filename extension .ssp This provides a quick way of gathering the relevant parts of a sisu document which can then for example be emailed. A sisupod includes sisu markup source file, (along with associated documents if a master file, or available in multilingual versions), together with related images and skin. SiSU commands can be run directly against a sisupod contained in a local directory, or provided as a url on a remote site. As there is a security issue with skins provided by other users, they are not applied unless the flag --trust or --trusted is added to the command instruction, it is recommended that file that are not your own are treated as untrusted. The directory structure of the unzipped file is understood by sisu, and sisu commands can be run within it. Note: if you wish to send multiple files, it quickly becomes more space efficient to zip the sisu markup directory, rather than the individual files for sending). See the -S option without [filename/wildcard]. Alias -S -!_ --source [filename/wildcard]
+!_ --source [filename/wildcard] \\ copies sisu markup file to output directory. Alias -s -!_ -S
+!_ -S \\ see --sisupod -!_ -S [filename/wildcard]
+!_ -S [filename/wildcard] \\ see --sisupod -!_ -s [filename/wildcard]
+!_ -s [filename/wildcard] \\ see --source -!_ --texinfo [filename/wildcard]
+!_ --texinfo [filename/wildcard] \\ produces texinfo and info file, (view with pinfo). Alias -I -!_ --txt [filename/wildcard]
+!_ --txt [filename/wildcard] \\ produces plaintext with Unix linefeeds and without markup, (object numbers are omitted), has footnotes at end of each paragraph that contains them [ -A for equivalent dos (linefeed) output file] [see -e for endnotes]. (Options include: --endnotes for endnotes --footnotes for footnotes at the end of each paragraph --unix for unix linefeed (default) --msdos for msdos linefeed). Alias -t -!_ -T [filename/wildcard (*.termsheet.rb)]
+!_ -T [filename/wildcard (*.termsheet.rb)] \\ standard form document builder, preprocessing feature -!_ -t [filename/wildcard]
+!_ -t [filename/wildcard] \\ see --txt -!_ --urls [filename/wildcard]
+!_ --urls [filename/wildcard] \\ prints url output list/map for the available processing flags options and resulting files that could be requested, (can be used to get a list of processing options in relation to a file, together with information on the output that would be produced), -u provides url output mapping for those flags requested for processing. The default assumes sisu_webrick is running and provides webrick url mappings where appropriate, but these can be switched to file system paths in sisurc.yml. Alias -U -!_ -U [filename/wildcard]
+!_ -U [filename/wildcard] \\ see --urls -!_ -u [filename/wildcard]
+!_ -u [filename/wildcard] \\ provides url mapping of output files for the flags requested for processing, also see -U -!_ --v2 [filename/wildcard]
+!_ --v2 [filename/wildcard] \\ invokes the sisu v2 document parser/generator. This is the default and is normally omitted. -!_ --v3 [filename/wildcard]
+!_ --v3 [filename/wildcard] \\ invokes the sisu v3 document parser/generator. Currently under development and incomplete, v3 requires >= ruby1.9.2p180. You may run sisu3 instead. -!_ --verbose [filename/wildcard]
+!_ --verbose [filename/wildcard] \\ provides verbose output of what is being generated, where output is placed (and error messages if any), as with -u flag provides a url mapping of files created for each of the processing flag requests. Alias -v -!_ -V
+!_ -V \\ on its own, provides SiSU version and environment information (sisu --help env) -!_ -V [filename/wildcard]
+!_ -V [filename/wildcard] \\ even more verbose than the -v flag. -!_ -v
+!_ -v \\ on its own, provides SiSU version information -!_ -v [filename/wildcard]
+!_ -v [filename/wildcard] \\ see --verbose -!_ --webrick
+!_ --webrick \\ starts ruby's webrick webserver points at sisu output directories, the default port is set to 8081 and can be changed in the resource configuration files. [tip: the webrick server requires link suffixes, so html output should be created using the -h option rather than -H ; also, note -F webrick ]. Alias -W -!_ -W
+!_ -W \\ see --webrick -!_ --wordmap [filename/wildcard]
+!_ --wordmap [filename/wildcard] \\ see --concordance -!_ -w [filename/wildcard]
+!_ -w [filename/wildcard] \\ see --concordance -!_ --xhtml [filename/wildcard]
+!_ --xhtml [filename/wildcard] \\ produces xhtml/XML output for browser viewing (sax parsing). Alias -b -!_ --xml-dom [filename/wildcard]
+!_ --xml-dom [filename/wildcard] \\ produces XML output with deep document structure, in the nature of dom. Alias -X -!_ --xml-sax [filename/wildcard]
+!_ --xml-sax [filename/wildcard] \\ produces XML output shallow structure (sax parsing). Alias -x -!_ -X [filename/wildcard]
+!_ -X [filename/wildcard] \\ see --xml-dom -!_ -x [filename/wildcard]
+!_ -x [filename/wildcard] \\ see --xml-sax -!_ -Y [filename/wildcard]
+!_ -Y [filename/wildcard] \\ produces a short sitemap entry for the document, based on html output and the sisu_manifest. --sitemaps generates/updates the sitemap index of existing sitemaps. (Experimental, [g,y,m announcement this week]) -!_ -y [filename/wildcard]
+!_ -y [filename/wildcard] \\ produces an html summary of output generated (hyperlinked to content) and document specific metadata (sisu_manifest.html). This step is assumed for most processing flags. -!_ --zap [filename/wildcard]
+!_ --zap [filename/wildcard] \\ Zap, if used with other processing flags deletes output files of the type about to be processed, prior to processing. If -Z is used as the lone processing related flag (or in conjunction with a combination of -[mMvVq]), will remove the related document output directory. Alias -Z -!_ -Z [filename/wildcard]
+!_ -Z [filename/wildcard] \\ see --zap 1~command_modifiers command line modifiers -!_ --no-ocn
+!_ --no-ocn \\ [with --html --pdf or --epub] switches off object citation numbering. Produce output without identifying numbers in margins of html or LaTeX/pdf output. -!_ --no-annotate
+!_ --no-annotate \\ strips output text of editor endnotes~[* square brackets ]~ denoted by asterisk or dagger/plus sign -!_ --no-asterisk
+!_ --no-asterisk \\ strips output text of editor endnotes~[* square brackets ]~ denoted by asterisk sign -!_ --no-dagger
+!_ --no-dagger \\ strips output text of editor endnotes~[+ square brackets ]~ denoted by dagger/plus sign 1~commands_database database commands @@ -335,50 +341,50 @@ dbi - database interface -D or --pgsql set for postgresql -d or --sqlite default set for sqlite -d is modifiable with --db=[database type (pgsql or sqlite)] -!_ --pg -v --createall
+!_ --pg -v --createall \\ initial step, creates required relations (tables, indexes) in existing postgresql database (a database should be created manually and given the same name as working directory, as requested) (rb.dbi) [ -dv --createall sqlite equivalent] it may be necessary to run sisu -Dv --createdb initially NOTE: at the present time for postgresql it may be necessary to manually create the database. The command would be 'createdb [database name]' where database name would be SiSU_[present working directory name (without path)]. Please use only alphanumerics and underscores. -!_ --pg -v --import
+!_ --pg -v --import \\ [filename/wildcard] imports data specified to postgresql db (rb.dbi) [ -dv --import sqlite equivalent] -!_ --pg -v --update
+!_ --pg -v --update \\ [filename/wildcard] updates/imports specified data to postgresql db (rb.dbi) [ -dv --update sqlite equivalent] -!_ --pg --remove
+!_ --pg --remove \\ [filename/wildcard] removes specified data to postgresql db (rb.dbi) [ -d --remove sqlite equivalent] -!_ --pg --dropall
+!_ --pg --dropall \\ kills data" and drops (postgresql or sqlite) db, tables & indexes [ -d --dropall sqlite equivalent] The -v is for verbose output. 1~command_shorcuts Shortcuts, Shorthand for multiple flags -!_ --update [filename/wildcard]
+!_ --update [filename/wildcard] \\ Checks existing file output and runs the flags required to update this output. This means that if only html and pdf output was requested on previous runs, only the -hp files will be applied, and only these will be generated this time, together with the summary. This can be very convenient, if you offer different outputs of different files, and just want to do the same again. -!_ -0 to -5 [filename or wildcard]
-Default shorthand mappings (note that the defaults can be changed/configured in the sisurc.yml file): +!_ -0 to -5 [filename or wildcard] \\ +Default shorthand mappings (for v3, note that the defaults can be changed/configured in the sisurc.yml file): -!_ -0
--mNhwpAobxXyYv [this is the default action run when no options are give, i.e. on 'sisu [filename]'] +!_ -0 \\ +-NQhewpotbxXyYv [this is the default action run when no options are give, i.e. on 'sisu [filename]'] -!_ -1
--mhewpy +!_ -1 \\ +-Qhewpoty -!_ -2
--mhewpaoy +!_ -2 \\ +-NQhewpotbxXy -!_ -3
--mhewpAobxXyY +!_ -3 \\ +-NQhewpotbxXyY -!_ -4
--mhewpAobxXDyY --import +!_ -4 \\ +-NQhewpotbxXDyY --update -!_ -5
--mhewpAobxXDyY --update +!_ -5 \\ +-NQhewpotbxXDyYv --update -add -v for verbose mode and -c for color, e.g. sisu -2vc [filename or wildcard] +add -v for verbose mode and -c to toggle color state, e.g. sisu -2vc [filename or wildcard] consider -u for appended url info or -v for verbose output diff --git a/data/doc/sisu/markup-samples/sisu_manual/sisu_markup.sst b/data/doc/sisu/markup-samples/sisu_manual/sisu_markup.sst index a246d160..735f00ea 100644 --- a/data/doc/sisu/markup-samples/sisu_manual/sisu_markup.sst +++ b/data/doc/sisu/markup-samples/sisu_manual/sisu_markup.sst @@ -123,7 +123,10 @@ code{ @title: SiSU :subtitle: Manual -@creator: :author: Amissah, Ralph +@creator: + :author: Amissah, Ralph + +@publisher: [publisher name] @rights: Copyright (C) Ralph Amissah 2007, part of SiSU documentation, License GPL 3 @@ -440,6 +443,30 @@ _# numbered list numbered list indented a., b., c., d., etc. }code +2~ Hanging Indents + +!_ markup example: + +code{ + +_0_1 first line no indent, +rest of paragraph indented one step + +_1_0 first line indented, +rest of paragraph no indent + +in each case level may be 0-9 + +}code + +!_ resulting output: + +_0_1 first line no indent, rest of paragraph indented one step + +_1_0 first line indented, rest of paragraph no indent + +in each case level may be 0-9 + 2~ Footnotes / Endnotes Footnotes and endnotes are marked up at the location where they would be indicated within a text. They are automatically numbered. The output type determines whether footnotes or endnotes will be produced -- cgit v1.2.3 From 520128d4486320eca4efbc6cefb208004d2ec4f0 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:36:23 -0400 Subject: v2 v3: manpage * commands: --qrcode -Q; update shortcut options * markup.sst: indent update; publisher --- data/doc/sisu/CHANGELOG_v3 | 2 +- man/man1/sisu.1 | 627 ++++++++++++++++++++++++++------------------- 2 files changed, 364 insertions(+), 265 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 7234637e..a27a7070 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -43,7 +43,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.14.orig.tar.gz * sql db, constants, cgi-sql, structure changed, creator editor field added - * sisu_manual + * sisu_manual, manpage * sisu_commands: --qrcode -Q; update shortcut options; line-breaks use \\ * sisu_markup.sst: indent update; publisher diff --git a/man/man1/sisu.1 b/man/man1/sisu.1 index 2994ef64..0b9a2fce 100644 --- a/man/man1/sisu.1 +++ b/man/man1/sisu.1 @@ -1,4 +1,4 @@ -.TH "sisu" "1" "2011-06-24" "3.0.13-beta-rb1.9.2p180" "SiSU" +.TH "sisu" "1" "2011-07-26" "3.0.14-beta-rb1.9.2p180" "SiSU" .br .SH NAME .br @@ -34,18 +34,18 @@ RALPH AMISSAH .br .B SiSU -is a framework for document structuring, publishing (in multiple open -standard formats) and search, comprising of: (a) a lightweight document -structure and presentation markup syntax; and (b) an accompanying engine for -generating standard document format outputs from documents prepared in sisu -markup syntax, which is able to produce multiple standard outputs (including -the population of sql databases) that (can) share a common numbering system for -the citation of text within a document. +is a framework for document structuring, publishing (in multiple open standard +formats) and search, comprising of: (a) a lightweight document structure and +presentation markup syntax; and (b) an accompanying engine for generating +standard document format outputs from documents prepared in sisu markup syntax, +which is able to produce multiple standard outputs (including the population of +sql databases) that (can) share a common numbering system for the citation of +text within a document. .br .B SiSU -is developed under an open source, software libre license (GPL3). Its use -case for development is work with medium to large document sets and cope with +is developed under an open source, software libre license (GPL3). Its use case +for development is work with medium to large document sets and cope with evolving document formats/ representation technologies. Documents are prepared once, and generated as need be to update the technical presentation or add additional output formats. Various output formats (including search related @@ -94,28 +94,28 @@ content. .br In preparing a .B SiSU -document you optionally provide semantic information related to the document -in a document header, and in marking up the substantive text provide -information on the structure of the document, primarily indicating heading -levels and footnotes. You also provide information on basic text attributes -where used. The rest is automatic, sisu from this information custom builds[^2] -the different forms of output requested. +document you optionally provide semantic information related to the document in +a document header, and in marking up the substantive text provide information +on the structure of the document, primarily indicating heading levels and +footnotes. You also provide information on basic text attributes where used. +The rest is automatic, sisu from this information custom builds[^2] the +different forms of output requested. .br .B SiSU works with an abstraction of the document based on its structure which is comprised of its headings[^3] and objects[^4], which enables .B SiSU -to represent the document in many different ways, and to take advantage of -the strengths of different ways of presenting documents. The objects are -numbered, and these numbers can be used to provide a common basis for citing -material within a document across the different output format types. This is -significant as page numbers are not well suited to the digital age, in web -publishing, changing a browser's default font or using a different browser can -mean that text will appear on a different page; and publishing in different -formats, html, landscape and portrait pdf etc. again page numbers are not -useful to cite text. Dealing with documents at an object level together with -object numbering also has implications for search that +to represent the document in many different ways, and to take advantage of the +strengths of different ways of presenting documents. The objects are numbered, +and these numbers can be used to provide a common basis for citing material +within a document across the different output format types. This is significant +as page numbers are not well suited to the digital age, in web publishing, +changing a browser's default font or using a different browser can mean that +text will appear on a different page; and publishing in different formats, +html, landscape and portrait pdf etc. again page numbers are not useful to cite +text. Dealing with documents at an object level together with object numbering +also has implications for search that .B SiSU is able to take advantage of. @@ -134,8 +134,8 @@ relies on software, the markup is uncomplicated and minimalistic which guarantees that future engines can be written to run against it. It is also easily converted to other formats, which means documents prepared in .B SiSU -can be migrated to other document formats. Further security is provided by -the fact that the software itself, +can be migrated to other document formats. Further security is provided by the +fact that the software itself, .B SiSU is available under GPL3 a licence that guarantees that the source code will always be open, and free as in libre, which means that that code base can be @@ -189,19 +189,19 @@ content prepared in .br .B SiSU -is a document publishing system, that from a simple single marked\-up -document, produces multiple output formats including: plaintext, html, xhtml, -XML, epub, odt (odf text), LaTeX, pdf, info, and SQL (PostgreSQL and SQLite), -which share text object numbers ("object citation numbering") and the same -document structure information. For more see: +is a document publishing system, that from a simple single marked\-up document, +produces multiple output formats including: plaintext, html, xhtml, XML, epub, +odt (odf text), LaTeX, pdf, info, and SQL (PostgreSQL and SQLite), which share +text object numbers ("object citation numbering") and the same document +structure information. For more see: .SH 2.2 DOCUMENT PROCESSING COMMAND FLAGS .TP .B \-a [filename/wildcard] -produces plaintext with Unix linefeeds and without markup, (object numbers -are omitted), has footnotes at end of each paragraph that contains them [ \ \-A -\ for \ equivalent \ dos \ (linefeed) \ output \ file] [see \ \-e \ for \ +produces plaintext with Unix linefeeds and without markup, (object numbers are +omitted), has footnotes at end of each paragraph that contains them [ \ \-A \ +for \ equivalent \ dos \ (linefeed) \ output \ file] [see \ \-e \ for \ endnotes]. (Options include: \-\-endnotes for endnotes \-\-footnotes for footnotes at the end of each paragraph \-\-unix for unix linefeed (default) \-\-msdos for msdos linefeed) @@ -212,9 +212,9 @@ see \-\-xhtml .TP .B \-\-color\-toggle [filename/wildcard] -screen toggle ansi screen colour on or off depending on default set (unless -\-c flag is used: if sisurc colour default is set to 'true', output to screen -will be with colour, if sisurc colour default is set to 'false' or is undefined +screen toggle ansi screen colour on or off depending on default set (unless \-c +flag is used: if sisurc colour default is set to 'true', output to screen will +be with colour, if sisurc colour default is set to 'false' or is undefined screen output will be without colour). Alias \-c .TP @@ -266,8 +266,7 @@ see \-\-sqlite .TP .B \-\-epub [filename/wildcard] -produces an epub document, [sisu \ version \ >=2 \ ] (filename.epub). Alias -\-e +produces an epub document, [sisu \ version \ >=2 \ ] (filename.epub). Alias \-e .TP .B \-e [filename/wildcard] @@ -391,8 +390,7 @@ see \-\-odt .TP .B \-\-odt [filename/wildcard/url] -output basic document in opendocument file format (opendocument.odt). Alias -\-o +output basic document in opendocument file format (opendocument.odt). Alias \-o .TP .B \-o [filename/wildcard/url] @@ -400,8 +398,8 @@ see \-\-odt .TP .B \-\-pdf [filename/wildcard] -produces LaTeX pdf (portrait.pdf & landscape.pdf). Default paper size is set -in config file, or document header, or provided with additional command line +produces LaTeX pdf (portrait.pdf & landscape.pdf). Default paper size is set in +config file, or document header, or provided with additional command line parameter, e.g. \-\-papersize\-a4 preset sizes include: 'A4', U.S. 'letter' and 'legal' and book sizes 'A5' and 'B5' (system defaults to A4). Alias \-p @@ -433,10 +431,18 @@ see \-\-po4a .B \-p [filename/wildcard] see \-\-pdf +.TP +.B \-\-qrcode [filename/wildcard] +generate QR code image of metadata (used in manifest). v3 only. + .TP .B \-\-quiet [filename/wildcard] quiet less output to screen. +.TP +.B \-Q [filename/wildcard] +see \-\-qrcode + .TP .B \-q [filename/wildcard] see \-\-quiet @@ -469,8 +475,7 @@ so it is first necessary to create them, before generating the search form) see the default port set for use by the webrick server, (otherwise the port is left blank and the system setting used, usually 80). The samples are dumped in the present work directory which must be writable, (with screen instructions given -that they be copied to the cgi\-bin directory). \-Fv (in addition to the above) -provides some information on setting up hyperestraier for sisu. Alias \-F +that they be copied to the cgi\-bin directory). Alias \-F .TP .B \-\-scp [filename/wildcard] @@ -480,9 +485,9 @@ that you have your "keys" and ssh agent in place. Also see \-\-rsync. Alias \-r .TP .B \-\-sqlite \-\-[instruction] [filename] -database type default set to sqlite, (for which \-\-sqlite may be used -instead) or to specify another database \-\-db\-[pgsql, \ sqlite] (however see -\-D) possible instructions include: \-\-createdb; \-\-create; \-\-dropall; +database type default set to sqlite, (for which \-\-sqlite may be used instead) +or to specify another database \-\-db\-[pgsql, \ sqlite] (however see \-D) +possible instructions include: \-\-createdb; \-\-create; \-\-dropall; \-\-import [filename]; \-\-update [filename]; \-\-remove [filename]; see database section below. Alias \-d @@ -496,24 +501,23 @@ option is tested only with zsh). Alias \-S .TP .B \-\-sisupod [filename/wildcard] -produces a zipped file of the prepared document specified along with -associated images, by default named sisupod.zip they may alternatively be named -with the filename extension \.ssp This provides a quick way of gathering the -relevant parts of a sisu document which can then for example be emailed. A -sisupod includes sisu markup source file, (along with associated documents if a -master file, or available in multilingual versions), together with related -images and skin. +produces a zipped file of the prepared document specified along with associated +images, by default named sisupod.zip they may alternatively be named with the +filename extension \.ssp This provides a quick way of gathering the relevant +parts of a sisu document which can then for example be emailed. A sisupod +includes sisu markup source file, (along with associated documents if a master +file, or available in multilingual versions), together with related images and +skin. .B SiSU -commands can be run directly against a sisupod contained in a local -directory, or provided as a url on a remote site. As there is a security issue -with skins provided by other users, they are not applied unless the flag -\-\-trust or \-\-trusted is added to the command instruction, it is recommended -that file that are not your own are treated as untrusted. The directory -structure of the unzipped file is understood by sisu, and sisu commands can be -run within it. Note: if you wish to send multiple files, it quickly becomes -more space efficient to zip the sisu markup directory, rather than the -individual files for sending). See the \-S option without [filename/wildcard]. -Alias \-S +commands can be run directly against a sisupod contained in a local directory, +or provided as a url on a remote site. As there is a security issue with skins +provided by other users, they are not applied unless the flag \-\-trust or +\-\-trusted is added to the command instruction, it is recommended that file +that are not your own are treated as untrusted. The directory structure of the +unzipped file is understood by sisu, and sisu commands can be run within it. +Note: if you wish to send multiple files, it quickly becomes more space +efficient to zip the sisu markup directory, rather than the individual files +for sending). See the \-S option without [filename/wildcard]. Alias \-S .TP .B \-\-source [filename/wildcard] @@ -537,9 +541,9 @@ produces texinfo and info file, (view with pinfo). Alias \-I .TP .B \-\-txt [filename/wildcard] -produces plaintext with Unix linefeeds and without markup, (object numbers -are omitted), has footnotes at end of each paragraph that contains them [ \ \-A -\ for \ equivalent \ dos \ (linefeed) \ output \ file] [see \ \-e \ for \ +produces plaintext with Unix linefeeds and without markup, (object numbers are +omitted), has footnotes at end of each paragraph that contains them [ \ \-A \ +for \ equivalent \ dos \ (linefeed) \ output \ file] [see \ \-e \ for \ endnotes]. (Options include: \-\-endnotes for endnotes \-\-footnotes for footnotes at the end of each paragraph \-\-unix for unix linefeed (default) \-\-msdos for msdos linefeed). Alias \-t @@ -578,13 +582,13 @@ normally omitted. .TP .B \-\-v3 [filename/wildcard] -invokes the sisu v3 document parser/generator. Currently under development -and incomplete, v3 requires >= ruby1.9.2p180. You may run sisu3 instead. +invokes the sisu v3 document parser/generator. Currently under development and +incomplete, v3 requires >= ruby1.9.2p180. You may run sisu3 instead. .TP .B \-\-verbose [filename/wildcard] -provides verbose output of what is being generated, where output is placed -(and error messages if any), as with \-u flag provides a url mapping of files +provides verbose output of what is being generated, where output is placed (and +error messages if any), as with \-u flag provides a url mapping of files created for each of the processing flag requests. Alias \-v .TP @@ -609,10 +613,10 @@ see \-\-verbose .TP .B \-\-webrick -starts ruby's webrick webserver points at sisu output directories, the -default port is set to 8081 and can be changed in the resource configuration -files. [tip: \ the \ webrick \ server \ requires \ link \ suffixes, \ so \ html -\ output \ should \ be \ created \ using \ the \ \-h \ option \ rather \ than \ +starts ruby's webrick webserver points at sisu output directories, the default +port is set to 8081 and can be changed in the resource configuration files. +[tip: \ the \ webrick \ server \ requires \ link \ suffixes, \ so \ html \ +output \ should \ be \ created \ using \ the \ \-h \ option \ rather \ than \ \-H \ ; \ also, \ note \ \-F \ webrick \ ]. Alias \-W .TP @@ -662,10 +666,10 @@ processing flags. .TP .B \-\-zap [filename/wildcard] -Zap, if used with other processing flags deletes output files of the type -about to be processed, prior to processing. If \-Z is used as the lone -processing related flag (or in conjunction with a combination of \-[mMvVq]), -will remove the related document output directory. Alias \-Z +Zap, if used with other processing flags deletes output files of the type about +to be processed, prior to processing. If \-Z is used as the lone processing +related flag (or in conjunction with a combination of \-[mMvVq]), will remove +the related document output directory. Alias \-Z .TP .B \-Z [filename/wildcard] @@ -716,18 +720,18 @@ where database name would be SiSU_[present \ working \ directory \ name \ .TP .B \-\-pg \-v \-\-import -[filename/wildcard] imports data specified to postgresql db (rb.dbi) [ \ \-dv -\ \-\-import \ sqlite \ equivalent] +[filename/wildcard] imports data specified to postgresql db (rb.dbi) [ \ \-dv \ +\-\-import \ sqlite \ equivalent] .TP .B \-\-pg \-v \-\-update -[filename/wildcard] updates/imports specified data to postgresql db (rb.dbi) -[ \ \-dv \ \-\-update \ sqlite \ equivalent] +[filename/wildcard] updates/imports specified data to postgresql db (rb.dbi) [ +\ \-dv \ \-\-update \ sqlite \ equivalent] .TP .B \-\-pg \-\-remove -[filename/wildcard] removes specified data to postgresql db (rb.dbi) [ \ \-d -\ \-\-remove \ sqlite \ equivalent] +[filename/wildcard] removes specified data to postgresql db (rb.dbi) [ \ \-d \ +\-\-remove \ sqlite \ equivalent] .TP .B \-\-pg \-\-dropall @@ -742,45 +746,45 @@ The \-v is for verbose output. .TP .B \-\-update [filename/wildcard] -Checks existing file output and runs the flags required to update this -output. This means that if only html and pdf output was requested on previous -runs, only the \-hp files will be applied, and only these will be generated -this time, together with the summary. This can be very convenient, if you offer +Checks existing file output and runs the flags required to update this output. +This means that if only html and pdf output was requested on previous runs, +only the \-hp files will be applied, and only these will be generated this +time, together with the summary. This can be very convenient, if you offer different outputs of different files, and just want to do the same again. .TP .B \-0 to \-5 [filename \ or \ wildcard] -Default shorthand mappings (note that the defaults can be changed/configured -in the sisurc.yml file): +Default shorthand mappings (for v3, note that the defaults can be +changed/configured in the sisurc.yml file): .TP .B \-0 -\-mNhwpAobxXyYv [this \ is \ the \ default \ action \ run \ when \ no \ +\-NQhewpotbxXyYv [this \ is \ the \ default \ action \ run \ when \ no \ options \ are \ give, \ i.e. \ on \ 'sisu \ [filename]'] .TP .B \-1 -\-mhewpy +\-Qhewpoty .TP .B \-2 -\-mhewpaoy +\-NQhewpotbxXy .TP .B \-3 -\-mhewpAobxXyY +\-NQhewpotbxXyY .TP .B \-4 -\-mhewpAobxXDyY \-\-import +\-NQhewpotbxXDyY \-\-update .TP .B \-5 -\-mhewpAobxXDyY \-\-update +\-NQhewpotbxXDyYv \-\-update .br -add \-v for verbose mode and \-c for color, e.g. sisu \-2vc [filename \ or \ -wildcard] +add \-v for verbose mode and \-c to toggle color state, e.g. sisu \-2vc +[filename \ or \ wildcard] .br consider \-u for appended url info or \-v for verbose output @@ -998,8 +1002,8 @@ an alternative presentation of markup syntax: .br With .B SiSU -installed sample skins may be found in: /usr/share/doc/sisu/markup\-samples -(or equivalent directory) and if sisu\-markup\-samples is installed also under: +installed sample skins may be found in: /usr/share/doc/sisu/markup\-samples (or +equivalent directory) and if sisu\-markup\-samples is installed also under: /usr/share/doc/sisu/markup\-samples\-non\-free .SH 8. MARKUP OF HEADERS @@ -1029,7 +1033,9 @@ to this one: % SiSU master 2.0 @title: SiSU :subtitle: Manual - @creator: :author: Amissah, Ralph + @creator: + :author: Amissah, Ralph + @publisher: \ [publisher \ name] @rights: Copyright (C) Ralph Amissah 2007, License GPL 3 @classify: :type: information @@ -1191,9 +1197,9 @@ another) .br .B :A~ [heading \ text] -Top level heading [this \ usually \ has \ similar \ content \ to \ the \ -title \ @title: \ ] NOTE: the heading levels described here are in 0.38 -notation, see heading +Top level heading [this \ usually \ has \ similar \ content \ to \ the \ title +\ @title: \ ] NOTE: the heading levels described here are in 0.38 notation, see +heading .br .B :B~ [heading \ text] @@ -1205,22 +1211,22 @@ Third level heading [this \ is \ a \ heading \ level \ divider] .br .B 1~ [heading \ text] -Top level heading preceding substantive text of document or sub\-heading 2, -the heading level that would normally be marked 1. or 2. or 3. etc. in a -document, and the level on which sisu by default would break html output into -named segments, names are provided automatically if none are given (a number), +Top level heading preceding substantive text of document or sub\-heading 2, the +heading level that would normally be marked 1. or 2. or 3. etc. in a document, +and the level on which sisu by default would break html output into named +segments, names are provided automatically if none are given (a number), otherwise takes the form 1~my_filename_for_this_segment .br .B 2~ [heading \ text] -Second level heading preceding substantive text of document or sub\-heading 3 -, the heading level that would normally be marked 1.1 or 1.2 or 1.3 or 2.1 etc. +Second level heading preceding substantive text of document or sub\-heading 3, +the heading level that would normally be marked 1.1 or 1.2 or 1.3 or 2.1 etc. in a document. .br .B 3~ [heading \ text] -Third level heading preceding substantive text of document, that would -normally be marked 1.1.1 or 1.1.2 or 1.2.1 or 2.1.1 etc. in a document +Third level heading preceding substantive text of document, that would normally +be marked 1.1.1 or 1.1.2 or 1.2.1 or 2.1.1 etc. in a document .nf 1~filename level 1 heading, @@ -1255,7 +1261,7 @@ normally be marked 1.1.1 or 1.1.2 or 1.2.1 or 2.1.1 etc. in a document .br +{inserted text}+ .br - \\-{strikethrough}\\- + \-{strikethrough}\- .br #{monospace}# .fi @@ -1268,8 +1274,8 @@ normal text, .B emphasis, .B bold text, .I italics, -.I underscore -, "citation", ^superscript^, [subscript], ++inserted text++, +.I underscore, +"citation", ^superscript^, [subscript], ++inserted text++, \-\-strikethrough\-\-, monospace .br @@ -1277,8 +1283,8 @@ normal text .br .B emphasis -[note: \ can \ be \ configured \ to \ be \ represented \ by \ bold, \ italics -\ or \ underscore] +[note: \ can \ be \ configured \ to \ be \ represented \ by \ bold, \ italics \ +or \ underscore] .br .B bold text @@ -1372,7 +1378,32 @@ Numbered List (not to be confused with headings/titles, (document structure)) _# numbered list numbered list indented a., b., c., d., etc. .fi -.SH 9.4 FOOTNOTES / ENDNOTES +.SH 9.4 HANGING INDENTS + +.br +.B markup example: + +.nf + _0_1 first line no indent, + rest of paragraph indented one step + _1_0 first line indented, + rest of paragraph no indent + in each case level may be 0\-9 +.fi + +.br +.B resulting output: + +.br + first line no indent, rest of paragraph indented one step + +.br +first line indented, rest of paragraph no indent + +.br +in each case level may be 0\-9 + +.SH 9.5 FOOTNOTES / ENDNOTES .br Footnotes and endnotes are marked up at the location where they would be @@ -1454,9 +1485,9 @@ normal text [^+2] continues .br the standard and pair notation cannot be mixed in the same document -.SH 9.5 LINKS +.SH 9.6 LINKS -.SH 9.5.1 NAKED URLS WITHIN TEXT, DEALING WITH URLS +.SH 9.6.1 NAKED URLS WITHIN TEXT, DEALING WITH URLS .br urls found within text are marked up automatically. A url within text is @@ -1511,7 +1542,7 @@ blocks are discussed later in this document deb\-src http://www.jus.uio.no/sisu/archive unstable main non\-free .fi -.SH 9.5.2 LINKING TEXT +.SH 9.6.2 LINKING TEXT .br To link text or an image to a url the markup is as follows @@ -1546,8 +1577,6 @@ automatically as a footnote .br about SiSU [^14] markup -.SH 9.5.3 LINKING IMAGES - .br .B markup example: @@ -1602,9 +1631,9 @@ note at a heading level the same is automatically achieved by providing names to headings 1, 2 and 3 i.e. 2~[name] and 3~[name] or in the case of auto\-heading numbering, without further intervention. -.SH 9.6 GROUPED TEXT +.SH 9.7 GROUPED TEXT -.SH 9.6.1 TABLES +.SH 9.7.1 TABLES .br Tables may be prepared in two either of two forms @@ -1645,7 +1674,7 @@ information in each column Very active contributors*** | 0| 31| 190| 692| 1,639| 3,016 No. of English language articles| 25| 16,000| 101,000| 190,000| 320,000| 630,000 No. of articles, all languages | 25| 19,000| 138,000| 490,000| 862,000|1,600,000 - \\* Contributed at least ten times; \\** at least 5 times in last month; \\*\** more than 100 times in last month. + \e* Contributed at least ten times; \e** at least 5 times in last month; \e*\e** more than 100 times in last month. .fi .br @@ -1660,7 +1689,7 @@ information in each column * Contributed at least ten times; ** at least 5 times in last month; *** more than 100 times in last month. -.SH 9.6.2 POEM +.SH 9.7.2 POEM .br .B basic markup: @@ -1816,7 +1845,7 @@ than 100 times in last month. death."' .br -.SH 9.6.3 GROUP +.SH 9.7.3 GROUP .br .B basic markup: @@ -1976,15 +2005,15 @@ than 100 times in last month. death."' .br -.SH 9.6.4 CODE +.SH 9.7.4 CODE .br Code tags code{ \... }code (used as with other group tags described above) are used to escape regular sisu markup, and have been used extensively within this document to provide examples of .B SiSU -markup. You cannot however use code tags to escape code tags. They are -however used in the same way as group or poem tags. +markup. You cannot however use code tags to escape code tags. They are however +used in the same way as group or poem tags. .br A code\-block is treated as an object and given a single object number. [an \ @@ -2044,8 +2073,8 @@ some \ later \ time] .br From .B SiSU -2.7.7 on you can number codeblocks by placing a hash after the opening code -tag code{# as demonstrated here: +2.7.7 on you can number codeblocks by placing a hash after the opening code tag +code{# as demonstrated here: .nf 1 | `Fury said to a @@ -2094,9 +2123,9 @@ tag code{# as demonstrated here: 44 | death."' .fi -.SH 9.7 ADDITIONAL BREAKS \- LINEBREAKS WITHIN OBJECTS, COLUMN AND PAGE\-BREAKS +.SH 9.8 ADDITIONAL BREAKS \- LINEBREAKS WITHIN OBJECTS, COLUMN AND PAGE\-BREAKS -.SH 9.7.1 LINE\-BREAKS +.SH 9.8.1 LINE\-BREAKS .br To break a line within a "paragraph object", two backslashes \e\e @@ -2115,7 +2144,7 @@ The html break br enclosed in angle brackets (though undocumented) is available in versions prior to 3.0.13 and 2.9.7 (it remains available for the time being, but is depreciated). -.SH 9.7.2 PAGE BREAKS +.SH 9.8.2 PAGE BREAKS .br Page breaks are only relevant and honored in some output formats. A page break @@ -2140,7 +2169,7 @@ page new <:pn> breaks the page, starts a new page. page break <:pb> breaks a column, starts a new column, if using columns, else breaks the page, starts a new page. -.SH 9.8 BOOK INDEX +.SH 9.9 BOOK INDEX .br To make an index append to paragraph the book index term relates to it, using @@ -2216,15 +2245,15 @@ easily available to be placed within another text. If the calling document is a master document (built from other documents), it should be named with the suffix .B \.ssm -Within this document you would provide information on the other documents -that should be included within the text. These may be other documents that -would be processed in a regular way, or markup bits prepared only for inclusion -within a master document +Within this document you would provide information on the other documents that +should be included within the text. These may be other documents that would be +processed in a regular way, or markup bits prepared only for inclusion within a +master document .B \.sst regular markup file, or .B \.ssi -(insert/information) A secondary file of the composite document is built -prior to processing with the same prefix and the suffix +(insert/information) A secondary file of the composite document is built prior +to processing with the same prefix and the suffix .B \._sst .br @@ -2418,8 +2447,7 @@ which numerically increments an asterisk and plus respectively .br .B SiSU -0.38 introduced alternative experimental header and heading/structure -markers, +0.38 introduced alternative experimental header and heading/structure markers, .nf @headername: and headers :A~ :B~ :C~ 1~ 2~ 3~ @@ -2470,9 +2498,9 @@ those levels this is captured by the following file 'rename' instruction: .nf - rename 's/\.s[123]$/\.sst/' *.s{1,2,3} - rename 's/\.r[123]$/\.ssm/' *.r{1,2,3} - rename 's/\.si$/\.ssi/' *.si + rename 's/\e.s[123]$/\e.sst/' *.s{1,2,3} + rename 's/\e.r[123]$/\e.ssm/' *.r{1,2,3} + rename 's/\e.si$/\e.ssi/' *.si .fi .br @@ -2500,8 +2528,8 @@ relied upon .br .B 0.16 (2005w25/2) substantial changes introduced to make markup cleaner, header -0~title type, and headings [1\-6]~ introduced, also percentage sign (%) at start -of a text line as comment marker +0~title type, and headings [1\-6]~ introduced, also percentage sign (%) at +start of a text line as comment marker .br .B SiSU @@ -2531,19 +2559,19 @@ has plaintext and binary filetypes, and can process either type of document. .B SiSU documents are prepared as plain\-text (utf\-8) files with .B SiSU -markup. They may make reference to and contain images (for example), which -are stored in the directory beneath them _sisu/image. +markup. They may make reference to and contain images (for example), which are +stored in the directory beneath them _sisu/image. .B SiSU -plaintext markup files are of three types that may be distinguished by the -file extension used: regular text \.sst; master documents, composite documents -that incorporate other text, which can be any regular text or text insert; and +plaintext markup files are of three types that may be distinguished by the file +extension used: regular text \.sst; master documents, composite documents that +incorporate other text, which can be any regular text or text insert; and inserts the contents of which are like regular text except these are marked \.ssi and are not processed. .br .B SiSU -processing can be done directly against a sisu documents; which may be -located locally or on a remote server for which a url is provided. +processing can be done directly against a sisu documents; which may be located +locally or on a remote server for which a url is provided. .br .B SiSU @@ -2556,8 +2584,8 @@ source markup can be shared with the command: .br The most common form of document in -.B SiSU -, see the section on +.B SiSU, +see the section on .B SiSU markup. @@ -2574,8 +2602,8 @@ Composite documents which incorporate other .B SiSU documents which may be either regular .B SiSU -text \.sst which may be generated independently, or inserts prepared solely -for the purpose of being incorporated into one or more master documents. +text \.sst which may be generated independently, or inserts prepared solely for +the purpose of being incorporated into one or more master documents. .br The mechanism by which master files incorporate other documents is described as @@ -2609,8 +2637,8 @@ into one or more master documents. They resemble regular .B SiSU text files except they are ignored by the .B SiSU -processor. Making a file a \.ssi file is a quick and convenient way of -flagging that it is not intended that the file should be processed on its own. +processor. Making a file a \.ssi file is a quick and convenient way of flagging +that it is not intended that the file should be processed on its own. .SH 12.2 SISUPOD, ZIPPED BINARY CONTAINER (SISUPOD.ZIP, \.SSP) @@ -2624,8 +2652,8 @@ to include sound and multimedia\-files) .br .B SiSU -plaintext files rely on a recognised directory structure to find contents -such as images associated with documents, but all images for example for all +plaintext files rely on a recognised directory structure to find contents such +as images associated with documents, but all images for example for all documents contained in a directory are located in the sub\-directory _sisu/image. Without the ability to create a sisupod it can be inconvenient to manually identify all other files associated with a document. A sisupod @@ -2654,8 +2682,8 @@ Alternatively, make a pod of the contents of a whole directory: .br .B SiSU -processing can be done directly against a sisupod; which may be located -locally or on a remote server for which a url is provided. +processing can be done directly against a sisupod; which may be located locally +or on a remote server for which a url is provided. .br @@ -2797,8 +2825,8 @@ configuration file is a yaml file, which means indentation is significant. .br .B SiSU -resource configuration is determined by looking at the following files if -they exist: +resource configuration is determined by looking at the following files if they +exist: .br ./_sisu/sisurc.yml @@ -2920,8 +2948,8 @@ list) may be found in: .br CSS files to modify the appearance of .B SiSU -html, XHTML or XML may be placed in the configuration directory: \./_sisu/css -; ~/.sisu/css or; /etc/sisu/css and these will be copied to the output +html, XHTML or XML may be placed in the configuration directory: \./_sisu/css; +~/.sisu/css or; /etc/sisu/css and these will be copied to the output directories with the command sisu \-CC. .br @@ -3081,8 +3109,8 @@ has richer text markup. .br In addition to this .B SiSU -has the ability to populate a relational sql type database with documents at -an object level, with objects numbers that are shared across different output +has the ability to populate a relational sql type database with documents at an +object level, with objects numbers that are shared across different output types, which make them searchable with that degree of granularity. Basically, your match criteria is met by these documents and at these locations within each document, which can be viewed within the database directly or in various @@ -3109,8 +3137,8 @@ four tables: subject, (the Dublin Core...); .br - * another the substantive texts by individual "paragraph" (or object) \- along - with structural information, each paragraph being identifiable by its + * another the substantive texts by individual "paragraph" (or object) \- + along with structural information, each paragraph being identifiable by its paragraph number (if it has one which almost all of them do), and the substantive text of each paragraph quite naturally being searchable (both in formatted and clean text versions for searching); and @@ -3130,10 +3158,10 @@ There is of course the possibility to add further structures. .br At this level .B SiSU -loads a relational database with documents chunked into objects, their -smallest logical structurally constituent parts, as text objects, with their -object citation number and all other structural information needed to construct -the document. Text is stored (at this text object level) with and without +loads a relational database with documents chunked into objects, their smallest +logical structurally constituent parts, as text objects, with their object +citation number and all other structural information needed to construct the +document. Text is stored (at this text object level) with and without elementary markup tagging, the stripped version being so as to facilitate ease of searching. @@ -3141,8 +3169,8 @@ of searching. Being able to search a relational database at an object level with the .B SiSU citation system is an effective way of locating content generated by -.B SiSU -. As individual text objects of a document stored (and indexed) together with +.B SiSU. +As individual text objects of a document stored (and indexed) together with object numbers, and all versions of the document have the same numbering, complex searches can be tailored to return just the locations of the search results relevant for all available output formats, with live links to the @@ -3259,7 +3287,8 @@ to populate an sqlite database, this being part of sisu \-d [instruction] [filename/wildcard \ if \ required] .br - sisu \-d \-\-(sqlite|pg) \-\-[instruction] [filename/wildcard \ if \ required] + sisu \-d \-\-(sqlite|pg) \-\-[instruction] [filename/wildcard \ if \ + required] .SH 23.4 COMMANDS @@ -3277,9 +3306,9 @@ may be used interchangeably. .TP .B \-\-sqlite \-\-createall -initial step, creates required relations (tables, indexes) in existing -(sqlite) database (a database should be created manually and given the same -name as working directory, as requested) (rb.dbi) +initial step, creates required relations (tables, indexes) in existing (sqlite) +database (a database should be created manually and given the same name as +working directory, as requested) (rb.dbi) .TP .B sisu \-d \-\-createdb @@ -3484,9 +3513,9 @@ Ralph Amissah or .br .B SiSU -processing instructions can be run against remote source documents by -providing the url of the documents against which the processing instructions -are to be carried out. The remote +processing instructions can be run against remote source documents by providing +the url of the documents against which the processing instructions are to be +carried out. The remote .B SiSU documents can either be sisu marked up files in plaintext \.sst or \.ssm or; zipped sisu files, sisupod.zip or filename.ssp @@ -3552,8 +3581,8 @@ machine using either rsync, or scp. .br In order to do this some ssh authentication agent and keychain or similar tool will need to be configured. Once that is done the placement on a remote host -can be done seamlessly with the \-r (for scp) or \-R (for rsync) flag, which may -be used in conjunction with other processing flags, e.g. +can be done seamlessly with the \-r (for scp) or \-R (for rsync) flag, which +may be used in conjunction with other processing flags, e.g. .nf sisu \-3R sisu_remote.sst @@ -3567,8 +3596,8 @@ copies sisu output files to remote host using rsync. This requires that sisurc.yml has been provided with information on hostname and username, and that you have your "keys" and ssh agent in place. Note the behavior of rsync different if \-R is used with other flags from if used alone. Alone the rsync -\-\-delete parameter is sent, useful for cleaning the remote directory (when \-R -is used together with other flags, it is not). Also see \-r +\-\-delete parameter is sent, useful for cleaning the remote directory (when +\-R is used together with other flags, it is not). Also see \-r .TP .B \-r [filename/wildcard] @@ -3715,11 +3744,11 @@ is only dependent on the programming language in which it is written .B Ruby, and .B SiSU -will be able to generate html, EPUB, various XMLs, including ODF (and will -also produce LaTeX). Dependencies required for further actions, though it -relies on the installation of additional dependencies which the source tarball -does not take care of, for things like using a database (postgresql or -sqlite)[^24] or converting LaTeX to pdf. +will be able to generate html, EPUB, various XMLs, including ODF (and will also +produce LaTeX). Dependencies required for further actions, though it relies on +the installation of additional dependencies which the source tarball does not +take care of, for things like using a database (postgresql or sqlite)[^24] or +converting LaTeX to pdf. .br .B setup.rb @@ -3945,9 +3974,8 @@ Additional markup samples are packaged separately in the file: .br On .B Debian -they are available in non\-free[^28] to include them it is necessary to -include non\-free in your /etc/apt/source.list or obtain them from the sisu home -site. +they are available in non\-free[^28] to include them it is necessary to include +non\-free in your /etc/apt/source.list or obtain them from the sisu home site. .SH 30. EDITOR FILES, SYNTAX HIGHLIGHTING .br @@ -3956,10 +3984,10 @@ site. The directory: .br - \./data/sisu/v2/conf/editor\-syntax\-etc/ + ./data/sisu/v2/conf/editor\-syntax\-etc/ .br - \./data/sisu/v3/conf/editor\-syntax\-etc/ + ./data/sisu/v3/conf/editor\-syntax\-etc/ .br /usr/share/sisu/v2/conf/editor\-syntax\-etc @@ -4159,8 +4187,8 @@ ways of representing documents, (or indeed to create new ones). .br .br -* sparse/minimal markup (clean utf\-8 source texts). Documents are prepared in a -single UTF\-8 file using a minimalistic mnemonic syntax. Typical literature, +* sparse/minimal markup (clean utf\-8 source texts). Documents are prepared in +a single UTF\-8 file using a minimalistic mnemonic syntax. Typical literature, documents like "War and Peace" require almost no markup, and most of the headers are optional. @@ -4177,11 +4205,11 @@ semantic information related to the document (header information, extended beyond the Dublin core and easily further extended as required); the headers may also contain processing instructions. .B SiSU -markup is primarily an abstraction of document structure and document -metadata to permit taking advantage of the basic strengths of existing -alternative practical standard ways of representing documents [be \ that \ -browser \ viewing, \ paper \ publication, \ sql \ search \ etc.] (html, epub, -xml, odf, latex, pdf, sql) +markup is primarily an abstraction of document structure and document metadata +to permit taking advantage of the basic strengths of existing alternative +practical standard ways of representing documents [be \ that \ browser \ +viewing, \ paper \ publication, \ sql \ search \ etc.] (html, epub, xml, odf, +latex, pdf, sql) .br * for output produces reasonably elegant output of established industry and @@ -4212,8 +4240,8 @@ amongst the output formats currently supported are: * pdf (via LaTeX) .br - * sql \- population of an sql database, (at the same object level that is used - to cite text within a document) + * sql \- population of an sql database, (at the same object level that is + used to cite text within a document) .br Also produces: concordance files; document content certificates (md5 or sha256 @@ -4277,8 +4305,8 @@ may be processed locally to produce the desired document outputs .br * for basic document generation, the only software dependency is -.B Ruby -, and a few standard Unix tools (this covers plaintext, HTML, EPUB, XML, ODF, +.B Ruby, +and a few standard Unix tools (this covers plaintext, HTML, EPUB, XML, ODF, LaTeX). To use a database you of course need that, and to convert the LaTeX generated to pdf, a latex processor like tetex or texlive. @@ -4292,8 +4320,8 @@ markup is available for a number of text editors. .br .B SiSU -is less about document layout than about finding a way with little markup to -be able to construct an abstract representation of a document that makes it +is less about document layout than about finding a way with little markup to be +able to construct an abstract representation of a document that makes it possible to produce multiple representations of it which may be rather different from each other and used for different purposes, whether layout and publishing, or search of content @@ -4381,8 +4409,8 @@ Note .B SiSU documentation is prepared in .B SiSU -and output is available in multiple formats including amongst others html, -pdf, odf and epub, which may be also be accessed via the html pages[^29] +and output is available in multiple formats including amongst others html, pdf, +odf and epub, which may be also be accessed via the html pages[^29] .SH 33.2.1 WWW.SISUDOC.ORG @@ -4437,111 +4465,174 @@ file:///usr/share/doc/sisu/html/sisu.1.html .br -1. objects include: headings, paragraphs, verse, tables, images, but not +.TP +.BI 1. +objects include: headings, paragraphs, verse, tables, images, but not footnotes/endnotes which are numbered separately and tied to the object from which they are referenced. .br -2. i.e. the html, pdf, epub, odf outputs are each built individually and +.TP +.BI 2. +i.e. the html, pdf, epub, odf outputs are each built individually and optimised for that form of presentation, rather than for example the html being a saved version of the odf, or the pdf being a saved version of the html. .br -3. the different heading levels +.TP +.BI 3. +the different heading levels .br -4. units of text, primarily paragraphs and headings, also any tables, poems, -code\-blocks +.TP +.BI 4. +units of text, primarily paragraphs and headings, also any tables, poems, +code-blocks .br -5. Specification submitted by Adobe to ISO to become a full open ISO +.TP +.BI 5. +Specification submitted by Adobe to ISO to become a full open ISO specification - .br -6. ISO standard ISO/IEC 26300:2006 + .br -7. An open standard format for e\-books +.TP +.BI 6. +ISO standard ISO/IEC 26300:2006 .br -*1. square brackets +.TP +.BI 7. +An open standard format for e-books .br -*2. square brackets +.TP +.BI *1. +square brackets .br -+1. square brackets +.TP +.BI *2. +square brackets .br -8. +.TP +.BI +1. +square brackets .br -9. +.TP +.BI 8. + .br -10. From sometime after SiSU 0.58 it should be possible to describe SiSU -markup using SiSU, which though not an original design goal is useful. +.TP +.BI 9. + .br -11. files should be prepared using UTF\-8 character encoding +.TP +.BI 10. +From sometime after SiSU 0.58 it should be possible to describe SiSU markup +using SiSU, which though not an original design goal is useful. .br -12. a footnote or endnote +.TP +.BI 11. +files should be prepared using UTF-8 character encoding .br -13. self contained endnote marker & endnote in one +.TP +.BI 12. +a footnote or endnote + +.br +.TP +.BI 13. +self contained endnote marker & endnote in one .br -* unnumbered asterisk footnote/endnote, insert multiple asterisks if -required +.TP +.BI *. +unnumbered asterisk footnote/endnote, insert multiple asterisks if required + +.br +.TP +.BI **. +another unnumbered asterisk footnote/endnote .br -** another unnumbered asterisk footnote/endnote +.TP +.BI *3. +editors notes, numbered asterisk footnote/endnote series .br -*3. editors notes, numbered asterisk footnote/endnote series +.TP +.BI +2. +editors notes, numbered asterisk footnote/endnote series .br -+2. editors notes, numbered asterisk footnote/endnote series +.TP +.BI 14. + .br -14 +.TP +.BI 15. + .br -15. +.TP +.BI 16. +Table from the Wealth of Networks by Yochai Benkler .br -16. Table from the Wealth of Networks by Yochai Benkler .br -17. .ssc (for composite) is under consideration but ._sst makes clear that -this is not a regular file to be worked on, and thus less likely that people -will have \"accidents\", working on a .ssc file that is overwritten by -subsequent processing. It may be however that when the resulting file is shared -.ssc is an appropriate suffix to use. +.TP +.BI 17. +\.ssc (for composite) is under consideration but \._sst makes clear that this +is not a regular file to be worked on, and thus less likely that people will +have "accidents", working on a \.ssc file that is overwritten by subsequent +processing. It may be however that when the resulting file is shared \.ssc is an +appropriate suffix to use. .br -19. +.TP +.BI 19. + + .br .br .br -20. +.TP +.BI 20. + + .br .br -21. +.TP +.BI 21. + .br -22. (which could be extended further with current back\-end). As regards -scaling of the database, it is as scalable as the database (here Postgresql) -and hardware allow. +.TP +.BI 22. +(which could be extended further with current back-end). As regards scaling +of the database, it is as scalable as the database (here Postgresql) and +hardware allow. .br -23. of this feature when demonstrated to an IBM software innovations evaluator +.TP +.BI 23. +of this feature when demonstrated to an IBM software innovations evaluator in 2004 he said to paraphrase: this could be of interest to us. We have large document management systems, you can search hundreds of thousands of documents and we can tell you which documents meet your search criteria, but there is no @@ -4549,16 +4640,24 @@ way we can tell you without opening each document where within each your matches are found. .br -24. There is nothing to stop MySQL support being added in future. +.TP +.BI 24. +There is nothing to stop MySQL support being added in future. .br -25. +.TP +.BI 25. + .br -26. +.TP +.BI 26. + .br -27. +.TP +.BI 27. + .br 28. the -- cgit v1.2.3 From 3c0b56d9b72b3fbc1a482b1da1dcca23b5676a24 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:37:49 -0400 Subject: v2 v3: manpage html (man2html) * commands: --qrcode -Q; update shortcut options * markup.sst: indent update; publisher --- data/doc/sisu/CHANGELOG_v3 | 2 +- data/doc/sisu/html/sisu.1.html | 515 +++++++++++++++++++++++------------------ 2 files changed, 290 insertions(+), 227 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index a27a7070..7978dc09 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -43,7 +43,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.14.orig.tar.gz * sql db, constants, cgi-sql, structure changed, creator editor field added - * sisu_manual, manpage + * sisu_manual, manpage, manpage html (man2html) * sisu_commands: --qrcode -Q; update shortcut options; line-breaks use \\ * sisu_markup.sst: indent update; publisher diff --git a/data/doc/sisu/html/sisu.1.html b/data/doc/sisu/html/sisu.1.html index fb74b10d..33529bfc 100644 --- a/data/doc/sisu/html/sisu.1.html +++ b/data/doc/sisu/html/sisu.1.html @@ -179,39 +179,39 @@ and the same document structure information. For more see: <9.4 Footnotes / Endnotes +

9.4 Hanging Indents

+ +


+markup example: +


+

  _0_1 first line no indent,
+  rest of paragraph indented one step
+  _1_0 first line indented,
+  rest of paragraph no indent
+  in each case level may be 0-9
+
+


+resulting output: +


+ first line no indent, rest of paragraph indented one step
+ +


+first line indented, rest of paragraph no indent +


+ +

in each case level may be 0-9 +

+

9.5 Footnotes / Endnotes


Footnotes and endnotes are marked up at the location where they would be @@ -1428,11 +1454,11 @@ normal text [^+2] continues

the standard and pair notation cannot be mixed in the same document

-

9.5 +

9.6 Links

-

9.5.1 Naked Urls Within Text, Dealing with Urls

+

9.6.1 Naked Urls Within Text, Dealing with Urls


urls found within text are marked up automatically. A url within text is @@ -1479,7 +1505,7 @@ where a code block is used there is neither decoration nor hyperlinking, deb-src http://www.jus.uio.no/sisu/archive unstable main non-free

-

9.5.2 Linking Text

+

9.6.2 Linking Text


@@ -1509,9 +1535,6 @@ aboutSiSU <http://www.sisudoc.org/


about SiSU <http://www.sisudoc.org/ > [^14] markup -

-

9.5.3 Linking Images

-


markup example:


@@ -1561,10 +1584,10 @@ note at a heading level the same is automatically achieved by providing names to headings 1, 2 and 3 i.e. 2~[name] and 3~[name] or in the case of auto-heading numbering, without further intervention.

-

9.6 Grouped Text

+

9.7 Grouped Text

-

9.6.1 +

9.7.1 Tables


@@ -1609,7 +1632,7 @@ Tables

No. of articles, all languages | 25| 19,000| 138,000| 490,000| 862,000|1,600,000 \* Contributed at least ten times; \** at least 5 times in last month; -\* more than 100 times in last month. +\*\** more than 100 times in last month.


resulting output: @@ -1622,7 +1645,7 @@ Tables * Contributed at least ten times; ** at least 5 times in last month; *** more than 100 times in last month.

-

9.6.2 Poem

+

9.7.2 Poem


basic markup: @@ -1774,7 +1797,7 @@ more than 100 times in last month.

-

9.6.3 Group

+

9.7.3 Group


basic markup: @@ -1930,7 +1953,7 @@ more than 100 times in last month.

-

9.6.4 Code

+

9.7.4 Code


Code tags code{ ... }code (used as with other group tags described above) @@ -2040,11 +2063,11 @@ opening code tag code{# as demonstrated here: 44 | death."’

-

9.7 Additional Breaks - Linebreaks Within Objects, Column and Page-breaks

+

9.8 Additional Breaks - Linebreaks Within Objects, Column and Page-breaks

-

9.7.1 Line-breaks

+

9.8.1 Line-breaks


To break a line within a "paragraph object", two backslashes \\ with a space @@ -2060,7 +2083,7 @@ The html break br enclosed in angle brackets (though undocumented) is available in versions prior to 3.0.13 and 2.9.7 (it remains available for the time being, but is depreciated).

-

9.7.2 Page Breaks

+

9.8.2 Page Breaks


Page breaks are only relevant and honored in some output formats. A page @@ -2081,7 +2104,7 @@ page new <:pn> breaks the page, starts a new page. page break <:pb> breaks a column, starts a new column, if using columns, else breaks the page, starts a new page.

-

9.8 Book Index

+

9.9 Book Index


To make an index append to paragraph the book index term relates to it, @@ -2337,9 +2360,9 @@ text follows levels 1,2,3 and it is ’nice’ to do most work in those


this is captured by the following file ’rename’ instruction:


-

  rename ’s/.s[123]$/.sst/’ *.s{1,2,3}
-  rename ’s/.r[123]$/.ssm/’ *.r{1,2,3}
-  rename ’s/.si$/.ssi/’ *.si
+
  rename ’s/\.s[123]$/\.sst/’ *.s{1,2,3}
+  rename ’s/\.r[123]$/\.ssm/’ *.r{1,2,3}
+  rename ’s/\.si$/\.ssi/’ *.si
 


The internal document markup remains unchanged, from SiSU 0.16 @@ -2398,7 +2421,7 @@ be located locally or on a remote server for which a url is provided.

12.1.1 Sisu Text - Regular Files (.sst)


-The most common form of document in SiSU , see the section on SiSU markup. +The most common form of document in SiSU, see the section on SiSU markup.


<http://www.sisudoc.org/sisu/sisu_markup @@ -2716,7 +2739,7 @@ list) may be found in:


CSS files to modify the appearance of SiSU html, XHTML or XML may be placed -in the configuration directory: ./_sisu/css ; ~/.sisu/css or; /etc/sisu/css +in the configuration directory: ./_sisu/css; ~/.sisu/css or; /etc/sisu/css and these will be copied to the output directories with the command sisu -CC.


@@ -2889,8 +2912,9 @@ streamed to four tables:


* another the substantive texts by individual "paragraph" (or object) -- along
- with structural information, each paragraph being identifiable by its
+-
+ along with structural information, each paragraph being identifiable +by its
paragraph number (if it has one which almost all of them do), and the
substantive text of each paragraph quite naturally being searchable (both in
@@ -2918,14 +2942,15 @@ so as to facilitate ease of searching.


Being able to search a relational database at an object level with the SiSU citation system is an effective way of locating content generated -by SiSU object numbers, and all versions of the document have the same -numbering, complex searches can be tailored to return just the locations -of the search results relevant for all available output formats, with live -links to the precise locations in the database or in html/xml documents; -or, the structural information provided makes it possible to search the -full contents of the database and have headings in which search content -appears, or to search only headings etc. (as the Dublin Core is incorporated -it is easy to make use of that as well). +by SiSU. As individual text objects of a document stored (and indexed) together +with object numbers, and all versions of the document have the same numbering, +complex searches can be tailored to return just the locations of the search +results relevant for all available output formats, with live links to the +precise locations in the database or in html/xml documents; or, the structural +information provided makes it possible to search the full contents of the +database and have headings in which search content appears, or to search +only headings etc. (as the Dublin Core is incorporated it is easy to make +use of that as well).

22. Postgresql


@@ -3050,7 +3075,8 @@ for SiSU to populate an sqlite database, this being part of SiSU - sisu -d [instruction] [filename/wildcard  if  required]


- sisu -d --(sqlite|pg) --[instruction] [filename/wildcard  if  required]
+ sisu -d --(sqlite|pg) --[instruction] [filename/wildcard  if
+ required]

23.4 Commands

@@ -3890,8 +3916,9 @@ the


NOTE:


-[  .B  SiSU  parses  files  with  long  lines  or  line  breaks,  display  linewrap - (without  line-breaks)  is  a  convenient +[  .B  SiSU  parses  files  with  long  lines  or  line  breaks, but,  display  linewrap + (without  line-breaks)  is  a  convenient editor  feature  to  have  for  sisu  markup] +

31. How Does Sisu Work?


@@ -3937,8 +3964,8 @@ beyond the Dublin core and easily further extended as required); the headers may also contain processing instructions. SiSU markup is primarily an abstraction of document structure and document metadata to permit taking advantage of the basic strengths of existing alternative practical standard ways -of representing documents [be  that  paper  publication,  sql  search  etc.] (html, -epub, xml, odf, latex, pdf, sql) +of representing documents [be  that  browser viewing,  paper  publication, + sql  search  etc.] (html, epub, xml, odf, latex, pdf, sql)


* for output produces reasonably elegant output of established industry and institutionally accepted open standard formats.[3] takes advantage of @@ -3969,8 +3996,7 @@ as


* sql - population of an sql database, (at the same object level that -is used
- to cite text within a document)
+is used to cite text within a document)


Also produces: concordance files; document content certificates (md5 or @@ -4029,7 +4055,7 @@ and images and sent as a zip file called a sisupod, if shared on the net * generated document outputs may automatically be posted to remote sites.


-* for basic document generation, the only software dependency is Ruby , +* for basic document generation, the only software dependency is Ruby, and a few standard Unix tools (this covers plaintext, HTML, EPUB, XML, ODF, LaTeX). To use a database you of course need that, and to convert the LaTeX generated to pdf, a latex processor like tetex or texlive. @@ -4191,108 +4217,143 @@ may be also be accessed via the html pages[^29] <http://www.jus.uio.no/sisu/man/sisu_webrick.1.html >
-

1. objects include: headings, paragraphs, verse, tables, images, but not +

+

    +.
  1. objects include: headings, paragraphs, verse, tables, images, but not footnotes/endnotes which are numbered separately and tied to the object from which they are referenced.


    -2. i.e. the html, pdf, epub, odf outputs are each built individually and optimised +

  2. .
  3. i.e. the html, pdf, epub, odf outputs are each built individually and optimised for that form of presentation, rather than for example the html being a saved version of the odf, or the pdf being a saved version of the html.


    -3. the different heading levels +

  4. .
  5. +

    the different heading levels


    -4. units of text, primarily paragraphs and headings, also any tables, poems, +

  6. .
  7. units of text, primarily paragraphs and headings, also any tables, poems,

    code-blocks


    -5. Specification submitted by Adobe to ISO to become a full open ISO specification +

  8. .
  9. +

    Specification submitted by Adobe to ISO to become a full open ISO specification + +


    <http://www.linux-watch.com/news/NS7542722606.html >


    -6. ISO standard ISO/IEC 26300:2006 +

  10. .
  11. +

    ISO standard ISO/IEC 26300:2006


    -7. An open standard format for e-books +

  12. .
  13. +

    An open standard format for e-books


    -*1. square brackets + + +

    *1.
    +
    square brackets


    -*2. square brackets +

    + +
    *2.
    +
    square brackets


    -+1. square brackets +

    + +
    +1.
    +
    square brackets


    -8. <http://www.jus.uio.no/sisu/man/ +

  14. .
  15. <http://www.jus.uio.no/sisu/man/ >


    -9. <http://www.jus.uio.no/sisu/man/sisu.1.html +

  16. .
  17. <http://www.jus.uio.no/sisu/man/sisu.1.html >


    -10. From sometime after SiSU 0.58 it should be possible to describe SiSU -markup using SiSU, which though not an original design goal is useful. -

    -
    -11. files should be prepared using UTF-8 character encoding +

  18. .
  19. From sometime after SiSU 0.58 it should be possible to describe SiSU markup +using SiSU, which though not an original design goal is useful.


    -12. a footnote or endnote +

  20. .
  21. +

    files should be prepared using UTF-8 character encoding


    -13. self contained endnote marker & endnote in one +

  22. .
  23. +

    a footnote or endnote


    -* unnumbered asterisk footnote/endnote, insert multiple asterisks if required +

  24. .
  25. self contained endnote marker & endnote in one +


    + + +

    *.
    +
    unnumbered asterisk footnote/endnote, insert multiple asterisks if required


    -** another unnumbered asterisk footnote/endnote +

    + +
    **.
    +
    another unnumbered asterisk footnote/endnote


    -*3. editors notes, numbered asterisk footnote/endnote series +

    + +
    *3.
    +
    editors notes, numbered asterisk footnote/endnote series


    -+2. editors notes, numbered asterisk footnote/endnote series +

    + +
    +2.
    +
    editors notes, numbered asterisk footnote/endnote series


    -14 <http://www.sisudoc.org/ +

  26. .
  27. <http://www.sisudoc.org/ >


    -15. <http://www.ruby-lang.org/en/ +

  28. .
  29. <http://www.ruby-lang.org/en/ >


    -16. Table from the Wealth of Networks by Yochai Benkler <http://www.jus.uio.no/sisu/the_wealth_of_networks.yochai_benkler +

  30. .
  31. +

    Table from the Wealth of Networks by Yochai Benkler +


    +<http://www.jus.uio.no/sisu/the_wealth_of_networks.yochai_benkler > -


    -17. .ssc (for composite) is under consideration but ._sst makes clear that -this is not a regular file to be worked on, and thus less likely that people -will have subsequent processing. It may be however that when the resulting -file is shared +

  32. .
  33. .ssc (for composite) is under consideration but ._sst makes clear that this +is not a regular file to be worked on, and thus less likely that people +will have "accidents", working on a .ssc file that is overwritten by subsequent +processing. It may be however that when the resulting file is shared .ssc +is an appropriate suffix to use. +


    +

  34. .
  35. <http://www.postgresql.org/ +>


    -19. <http://www.postgresql.org/ ->
    <http://advocacy.postgresql.org/ >
    <http://en.wikipedia.org/wiki/Postgresql >
    -20. <http://www.hwaci.com/sw/sqlite/ ->
    +

  36. .
  37. <http://www.hwaci.com/sw/sqlite/ +> +


    <http://en.wikipedia.org/wiki/Sqlite >
    -21. <http://search.sisudoc.org +

  38. .
  39. <http://search.sisudoc.org >


    -22. (which could be extended further with current back-end). As regards scaling +

  40. .
  41. (which could be extended further with current back-end). As regards scaling of the database, it is as scalable as the database (here Postgresql) and hardware allow.


    -23. of this feature when demonstrated to an IBM software innovations evaluator +

  42. .
  43. of this feature when demonstrated to an IBM software innovations evaluator in 2004 he said to paraphrase: this could be of interest to us. We have large document management systems, you can search hundreds of thousands of documents and we can tell you which documents meet your search criteria, but there is no way we can tell you without opening each document where within each your matches are found.


    -24. There is nothing to stop MySQL support being added in future. +

  44. .
  45. There is nothing to stop MySQL support being added in future.


    -25. <http://www.jus.uio.no/sisu/man/sisu.1.html +

  46. .
  47. <http://www.jus.uio.no/sisu/man/sisu.1.html >


    -26. <http://www.jus.uio.no/sisu/man/sisu.8.html +

  48. .
  49. <http://www.jus.uio.no/sisu/man/sisu.8.html >


    -27. <http://www.jus.uio.no/sisu/man +

  50. .
  51. <http://www.jus.uio.no/sisu/man >


    28. the Debian Free Software guidelines require that everything distributed @@ -4301,7 +4362,9 @@ while freely distributable are not freely changeable.


    29. named index.html or more extensively through sisu_manifest.html
    -

    +

  52. +
+

See Also


sisu(1) @@ -4366,20 +4429,20 @@ More information about SiSU can be found at <9.1 Heading Levels
  • 9.2 Font Attributes
  • 9.3 Indentation and Bullets
  • -
  • 9.4 Footnotes / Endnotes
  • -
  • 9.5 Links
  • -
  • 9.5.1 Naked Urls Within Text, Dealing with Urls
  • -
  • 9.5.2 Linking Text
  • -
  • 9.5.3 Linking Images
  • -
  • 9.6 Grouped Text
  • -
  • 9.6.1 Tables
  • -
  • 9.6.2 Poem
  • -
  • 9.6.3 Group
  • -
  • 9.6.4 Code
  • -
  • 9.7 Additional Breaks - Linebreaks Within Objects, Column and Page-breaks
  • -
  • 9.7.1 Line-breaks
  • -
  • 9.7.2 Page Breaks
  • -
  • 9.8 Book Index
  • +
  • 9.4 Hanging Indents
  • +
  • 9.5 Footnotes / Endnotes
  • +
  • 9.6 Links
  • +
  • 9.6.1 Naked Urls Within Text, Dealing with Urls
  • +
  • 9.6.2 Linking Text
  • +
  • 9.7 Grouped Text
  • +
  • 9.7.1 Tables
  • +
  • 9.7.2 Poem
  • +
  • 9.7.3 Group
  • +
  • 9.7.4 Code
  • +
  • 9.8 Additional Breaks - Linebreaks Within Objects, Column and Page-breaks
  • +
  • 9.8.1 Line-breaks
  • +
  • 9.8.2 Page Breaks
  • +
  • 9.9 Book Index
  • 10. Composite Documents Markup
  • Markup Syntax History
  • 11. Notes Related to Files-types and Markup Syntax
  • -- cgit v1.2.3