From a62893a7ebcefb5973dee88707a1ac4fe841179a Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 9 Jul 2010 11:01:35 -0400 Subject: sisu_manual, minor cleaning --- .../markup-samples/sisu_manual/sisu_commands.sst | 6 +++-- .../v2/markup-samples/sisu_manual/sisu_markup.sst | 26 +++++++++++----------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/data/doc/sisu/v2/markup-samples/sisu_manual/sisu_commands.sst b/data/doc/sisu/v2/markup-samples/sisu_manual/sisu_commands.sst index a406dc57..33c7ca46 100644 --- a/data/doc/sisu/v2/markup-samples/sisu_manual/sisu_commands.sst +++ b/data/doc/sisu/v2/markup-samples/sisu_manual/sisu_commands.sst @@ -3,9 +3,11 @@ @title: SiSU :subtitle: Commands -@creator: :author: Amissah, Ralph +@creator: + :author: Amissah, Ralph -@rights: Copyright (C) Ralph Amissah 2007, part of SiSU documentation, License GPL 3 +@rights: + :copyright: Copyright (C) Ralph Amissah 2007, part of SiSU documentation, License GPL 3 @classify: :type: information diff --git a/data/doc/sisu/v2/markup-samples/sisu_manual/sisu_markup.sst b/data/doc/sisu/v2/markup-samples/sisu_manual/sisu_markup.sst index 331e6af5..275d736e 100644 --- a/data/doc/sisu/v2/markup-samples/sisu_manual/sisu_markup.sst +++ b/data/doc/sisu/v2/markup-samples/sisu_manual/sisu_markup.sst @@ -308,10 +308,10 @@ Second level heading [this is a heading level divider] Third level heading [this is a heading level divider] !_ 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), otherwise takes the form 1~my\_filename\_for\_this\_segment +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 !_ 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. in a document. +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. !_ 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 @@ -331,7 +331,7 @@ code{ code{ normal text, *{emphasis}*, !{bold text}!, /{italics}/, _{underscore}_, "{citation}", -^{superscript}^, ,{subscript},, +{inserted text}+, -{strikethrough}- #{monospace}# +^{superscript}^, ,{subscript},, +{inserted text}+, -{strikethrough}-, #{monospace}# normal text @@ -360,7 +360,7 @@ _{underscore}_ !_ resulting output: normal text, *{emphasis}*, !{bold text}!, /{italics}/, _{underscore}_, "{citation}", -^{superscript}^, ,{subscript},, +{inserted text}+, -{strikethrough}- #{monospace}# +^{superscript}^, ,{subscript},, +{inserted text}+, -{strikethrough}-, #{monospace}# normal text @@ -613,13 +613,13 @@ Shared document collection link code{ -about { SiSU book markup examples }../SiSU/examples.html +about { SiSU book markup examples }:SiSU/examples.html }code !_ resulting output: -about { SiSU book markup examples }../SiSU/examples.html +about { SiSU book markup examples }:SiSU/examples.html 3~ Linking Images @@ -746,19 +746,19 @@ No. of articles, all languages | 25| 19,000| 138,000| 490,000| 862,0 % code{ -% + % test -% + % ~# -% + % % unnumbered paragraph (place marker at end of paragraph) -% + % -# -% + % % unnumbered paragraph, delete when not required (place marker at end of paragraph) [used in dummy headings, eg. for segmented html] -% + % % add a comment to text, that will be removed prior to processing (place marker at beginning of line) -% + % }code 3~ Poem -- cgit v1.2.3 From b00b98bbfc0d254b6949bd7f9da52d4be14b36f0 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 9 Jul 2010 11:02:28 -0400 Subject: dal, manifest & metadata headings, non-substantive, ocn removed --- lib/sisu/v2/dal_doc_str.rb | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/sisu/v2/dal_doc_str.rb b/lib/sisu/v2/dal_doc_str.rb index 1dc6076e..2d4ee192 100644 --- a/lib/sisu/v2/dal_doc_str.rb +++ b/lib/sisu/v2/dal_doc_str.rb @@ -422,16 +422,14 @@ module SiSU_document_structure_extract h={:obj=>'Index'} end tuned_file << @pb - h={:obj=>'Metadata'} - h={:ln=>2,:obj=>'Metadata',:autonum_=>false} + h={:ln=>2,:obj=>'Metadata',:autonum_=>false,:ocn_=>false} tuned_file << SiSU_document_structure::Object_heading.new.heading_insert(h) - h={:ln=>4,:obj=>'SiSU Metadata, document information',:name=>'metadata',:autonum_=>false} + h={:ln=>4,:obj=>'SiSU Metadata, document information',:name=>'metadata',:autonum_=>false,:ocn_=>false} tuned_file << SiSU_document_structure::Object_heading.new.heading_insert(h) tuned_file << @pb - h={:obj=>'Manifest'} - h={:ln=>2,:obj=>'Manifest',:autonum_=>false} + h={:ln=>2,:obj=>'Manifest',:autonum_=>false,:ocn_=>false} tuned_file << SiSU_document_structure::Object_heading.new.heading_insert(h) - h={:ln=>4,:obj=>'SiSU Manifest, alternative outputs etc.',:name=>'sisu_manifest',:autonum_=>false} + h={:ln=>4,:obj=>'SiSU Manifest, alternative outputs etc.',:name=>'sisu_manifest',:autonum_=>false,:ocn_=>false} tuned_file << SiSU_document_structure::Object_heading.new.heading_insert(h) tuned_file h={:obj=>'eof'} @@ -462,9 +460,9 @@ module SiSU_document_structure_extract language=l[:l] tr=SiSU_Translate::Source.new(@md,language) meta << @pb - h={:ln=>2,:obj=>'Metadata'} + h={:ln=>2,:obj=>'Metadata',:ocn_=>false} meta << SiSU_document_structure::Object_heading.new.heading(h) - h={:ln=>4,:name=>'metadata',:obj=>'Metadata',:autonum_=>false} + h={:ln=>4,:name=>'metadata',:obj=>'Metadata',:autonum_=>false,:ocn_=>false} meta << SiSU_document_structure::Object_heading.new.heading(h) #add ocnm s="Document Manifest @\n #{base_html}/#{@md.fn[:manifest]}" meta << meta_para(s) -- cgit v1.2.3 From 788e0a8bb4c7259a0a5b6d85df4cc3c4ef0280cd Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 9 Jul 2010 11:42:50 -0400 Subject: html_scroll, deals with index & endnotes --- data/sisu/v2/v/version.yml | 6 +++--- lib/sisu/v2/html_scroll.rb | 44 ++++++++++++++++++++++++++------------------ 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/data/sisu/v2/v/version.yml b/data/sisu/v2/v/version.yml index e328bd68..6e8d23f7 100644 --- a/data/sisu/v2/v/version.yml +++ b/data/sisu/v2/v/version.yml @@ -1,5 +1,5 @@ --- -:version: 2.6.0 -:date_stamp: 2010w27/3 -:date: "2010-07-07" +:version: 2.6.1 +:date_stamp: 2010w27/5 +:date: "2010-07-09" :project: SiSU diff --git a/lib/sisu/v2/html_scroll.rb b/lib/sisu/v2/html_scroll.rb index b0581ead..049eb922 100644 --- a/lib/sisu/v2/html_scroll.rb +++ b/lib/sisu/v2/html_scroll.rb @@ -81,17 +81,18 @@ module SiSU_HTML_scroll @rcdc=false @scr={ :body=>[],:metadata=>[],:owner_details=>[] } data.each do |dob| - if defined? dob.name and dob.name =~/^meta/ and dob.obj =~/Document Information/ + if defined? dob.name and dob.name =~/^meta/ \ + and dob.obj =~/Document Information/ dob.obj.gsub!(/(Document Information(?: \(metadata\))?)/,'\1') end - if defined? dob.name and dob.name =~/^metadata/ and dob.obj =~/Metadata/ - dob.obj.gsub!(/(Metadata)/,'\1') + if dob.obj =~/^Metadata$/ \ + and dob.lv =='B' + dob.obj.gsub!(/Metadata/,'') end - if @rcdc==false \ - and dob.is =='heading_insert' \ - and dob.ln ==1 \ + if defined? dob.name \ and dob.name =~/^metadata/ \ - and dob.obj =~/Document Information/ #fix no current match + and dob.lv =='1' \ + and dob.obj =~/SiSU Metadata, document information/ @rcdc=true end dob.obj.gsub!(/href="[a-z0-9._-]+(#\S+?")/m,'href="\1') # internal document links @@ -125,11 +126,26 @@ module SiSU_HTML_scroll sto.heading_body2 elsif dob.ln==3 sto.heading_body3 - elsif dob.ln==4 + elsif dob.ln==4 \ + and dob.obj !~/^(?:Endnotes|Index|Metadata|Manifest)$/ + sto.heading_body4 + elsif dob.ln==4 \ + and dob.obj=='Endnotes' sto.heading_body4 - if dob.obj=='Endnotes' - @endnotes.join("\n") + '
' + @endnotes.join("\n") + elsif dob.ln==4 \ + and dob.obj=='Index' + sto.heading_body4 + book_idx=SiSU_Particulars::Combined_singleton.instance.get_idx_html(@md.opt).html_idx + book_idx.each do |x| #takes book index prepared for segments and strips segment identifying info + x.gsub!(/(\1(?:-\d+)?)<\/a>/,'\2') end + book_idx.join("\n") + #elsif dob.ln==4 \ + #and dob.obj=~/Meta/ + #p __LINE__ + ##and dob.obj=='Metadata' + #metadata=Metadata::Summary.new(@md).xhtml.metadata elsif dob.ln==5 sto.heading_body5 elsif dob.ln==6 @@ -158,14 +174,6 @@ module SiSU_HTML_scroll sto.code elsif dob.is=='table' sto.table - elsif dob.is=='insert' and dob.obj=='Index' - book_idx=SiSU_Particulars::Combined_singleton.instance.get_idx_html(@md.opt).html_idx - book_idx.each do |x| #takes book index prepared for segments and strips segment identifying info - x.gsub!(/(\1(?:-\d+)?)<\/a>/,'\2') - end - book_idx.join("\n") + '
' - elsif dob.is=='insert' and dob.obj=='Metadata' #use for metadata inject - metadata=Metadata::Summary.new(@md).xhtml.metadata end if dob =~// \ and dob =~/^(?:\^~\d+\s|)/ # hmmm re-adjusted 200507, for alt endnote which should again be matched ^~ ... not in response to problem though -- cgit v1.2.3 From 0e550ce034299ec718366c0e34c5ff7bb6c7ca54 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 9 Jul 2010 12:38:37 -0400 Subject: sysenv default output path fix --- lib/sisu/v2/sysenv.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sisu/v2/sysenv.rb b/lib/sisu/v2/sysenv.rb index 3a532d65..8f330343 100644 --- a/lib/sisu/v2/sysenv.rb +++ b/lib/sisu/v2/sysenv.rb @@ -1350,7 +1350,7 @@ WOK man_path=if defined? @rc['webserv']['path'] \ and @rc['webserv']['path'] =~/\S\S+/ man_path=@@man_path=File.expand_path(@rc['webserv']['path']) - else nil + else defaults[:webserv_path] end else @@man_path end -- cgit v1.2.3 From 07db68742ecf208143d68cbc9ca3e5d96b695e8f Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 9 Jul 2010 14:42:31 -0400 Subject: monospace (avoid url match false positive) --- lib/sisu/v2/dal_syntax.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/sisu/v2/dal_syntax.rb b/lib/sisu/v2/dal_syntax.rb index 713bc886..2f78fbe6 100644 --- a/lib/sisu/v2/dal_syntax.rb +++ b/lib/sisu/v2/dal_syntax.rb @@ -243,6 +243,8 @@ module SiSU_Syntax "\\1#{Mx[:fa_italics_o]}\\2#{Mx[:fa_italics_c]}") #italics dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|#{Mx[:lnk_o]}|#{Mx[:br_line]}|#{Mx[:br_paragraph]}|[\(\[\{]|\>)_\{(.+?)\}_/, "\\1#{Mx[:fa_underscore_o]}\\2#{Mx[:fa_underscore_c]}") #underscore + dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|#{Mx[:lnk_o]}|#{Mx[:br_line]}|#{Mx[:br_paragraph]}|[\(\[\{]|\>)#\{(.+?)\}#/, + "\\1#{Mx[:fa_monospace_o]}\\2#{Mx[:fa_monospace_c]}") #monospace dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|\(|\>)\"\{(.+?)\}\"/, "\\1#{Mx[:fa_cite_o]}\\2#{Mx[:fa_c_o]}cite#{Mx[:fa_c]}") #cite /blockquote? dob.obj.gsub!(/(^|[^\\])\^\{(.+?)\}\^/, @@ -253,8 +255,6 @@ module SiSU_Syntax "\\1#{Mx[:fa_subscript_o]}\\2#{Mx[:fa_subscript_c]}") #subscript dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|\(|\>)6\{(.+?)\}6/, "\\1#{Mx[:fa_subscript_o]}\\2#{Mx[:fa_subscript_c]}") #subscript - dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|\(|\>)#\{(.+?)\}#/, - "\\1#{Mx[:fa_monospace_o]}\\2#{Mx[:fa_monospace_c]}") #monospace text dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|\(|\>)\+\{(.+?)\}\+/, "\\1#{Mx[:fa_insert_o]}\\2#{Mx[:fa_insert_c]}") #inserted text dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|\(|\>)v\{(.+?)\}v/, @@ -380,8 +380,8 @@ module SiSU_Syntax dob.obj.gsub!(/(^|[#{Mx[:gl_c]}#{Mx[:nbsp]} ])\{~\^ (.+?)\s*\}((?:https?:|ftp:|:|[.]{1,2}\/)\S+?)([;,.]?)(?=\s|[#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:br_nl]}]|$)/m, "\\1#{Mx[:lnk_o]}\\2#{Mx[:lnk_c]}\\3\\4 #{Mx[:en_a_o]}\\3#{Mx[:en_a_c]} ") end - dob.obj.gsub!(/\{\s*([^{}]+?)\s*\}((?:https?:|:|[.]{2}\/|#)\S+?)(?=\s|[#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:br_nl]}#{Mx[:en_a_o]}#{Mx[:en_b_o]}]|$)/, - "#{Mx[:lnk_o]}\\1#{Mx[:lnk_c]}\\2") #linked (text or image, however text cannot include modified face, e.g. bold, ital, underline) + dob.obj.gsub!(/(^|[^#])\{\s*([^{}]+?)\s*\}((?:https?:|:|[.]{2}\/|#)\S+?)(?=\s|[#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:br_nl]}#{Mx[:en_a_o]}#{Mx[:en_b_o]}]|$)/, + "\\1#{Mx[:lnk_o]}\\2#{Mx[:lnk_c]}\\3") #linked (text or image, however text cannot include modified face, e.g. bold, ital, underline) dob.obj.gsub!(/(^|[#{Mx[:gl_c]}#{Mx[:lnk_c]}#{Mx[:en_a_o]}#{Mx[:en_b_o]}(\s])((?:https?|ftp):\/\/\S+?\.[^>< ]+?)([,.;'"]?)(?=[\s#{Mx[:en_a_c]}#{Mx[:en_b_c]}#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:br_nl]}]|$)/m, %{\\1#{Mx[:url_o]}\\2#{Mx[:url_c]}\\3}) dob.obj.gsub!(/#{Mx[:lnk_c]}#(\S+?[^>< ]+?)([,.;'"]?)(?=[\s#{Mx[:en_a_c]}#{Mx[:en_b_c]}#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:br_nl]}]|$)/m, -- cgit v1.2.3 From 628f1f2ba1be897aecfb03a249450df93fc9b7d9 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 9 Jul 2010 14:51:13 -0400 Subject: texpdf, monospace fix --- lib/sisu/v2/texpdf.rb | 1 + lib/sisu/v2/texpdf_format.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/sisu/v2/texpdf.rb b/lib/sisu/v2/texpdf.rb index 9aa82927..0d77d65b 100644 --- a/lib/sisu/v2/texpdf.rb +++ b/lib/sisu/v2/texpdf.rb @@ -568,6 +568,7 @@ module SiSU_TeX \\chardef\\tilde="7E \\definecolor{Light}{gray}{.92} \\newcommand{\\Codeblock}[1]{\\normaltext\\raggedright\\tiny\\ttfamily\\texbackslash#1} +\\newcommand{\\monosp}[1]{\\normaltext\\ttfamily\\texbackslash#1} % \\sloppy \\begin{document} WOK diff --git a/lib/sisu/v2/texpdf_format.rb b/lib/sisu/v2/texpdf_format.rb index 637271a0..4e489466 100644 --- a/lib/sisu/v2/texpdf_format.rb +++ b/lib/sisu/v2/texpdf_format.rb @@ -1064,7 +1064,7 @@ WOK str.gsub!(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/,'\sout{\1}') # ulem str.gsub!(/#{Mx[:fa_superscript_o]}(.+?)#{Mx[:fa_superscript_c]}/,"\$^{\\textrm{\\1}}\$") str.gsub!(/#{Mx[:fa_subscript_o]}(.+?)#{Mx[:fa_subscript_c]}/,"\$_{\\textrm{\\1}}\$") - str.gsub!(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/,' \monosp{ \1 } ') + str.gsub!(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/,'\begin{monosp}\1\end{monosp}') unless is=='code' str.gsub!(/"(.+?)"/,'“\1”') # quote marks / quotations open & close " need condition exclude for code str.gsub!(/\s+"/,' “') # open " -- cgit v1.2.3 From b1c9cbe9d0dd57573ac313aa14f768b1d10ba2c5 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 9 Jul 2010 14:57:39 -0400 Subject: changelog update --- CHANGELOG_v2 | 10 ++++++++++ data/doc/sisu/v2/CHANGELOG | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/CHANGELOG_v2 b/CHANGELOG_v2 index b3d49617..615063fd 100644 --- a/CHANGELOG_v2 +++ b/CHANGELOG_v2 @@ -20,6 +20,16 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.6.1.orig.tar.gz * markup samples moved to data/doc/sisu/v2/markup-samples + * dal, manifest & metadata headings, non-substantive, ocn removed + + * dal_syntax, monospace (avoid url match false positive) + + * texpdf, monospace fix + + * html_scroll, index & endnotes + + * sysenv, default output path, fix + %% 2.6.0.orig.tar.gz (2010-07-07:27/3) http://www.jus.uio.no/sisu/pkg/src/sisu_2.6.0.orig.tar.gz 2a02d475c12398e5cc66e961c96e65f79951c4c2863a5e88f986692563fda983 2770986 sisu_2.6.0.orig.tar.gz diff --git a/data/doc/sisu/v2/CHANGELOG b/data/doc/sisu/v2/CHANGELOG index 382916a1..f2772393 100644 --- a/data/doc/sisu/v2/CHANGELOG +++ b/data/doc/sisu/v2/CHANGELOG @@ -20,6 +20,16 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.6.1.orig.tar.gz * markup samples moved to data/doc/sisu/v2/markup-samples + * dal, manifest & metadata headings, non-substantive, ocn removed + + * dal_syntax, monospace (avoid url match false positive) + + * texpdf, monospace fix + + * html_scroll, index & endnotes + + * sysenv, default output path, fix + %% 2.6.0.orig.tar.gz (2010-07-07:27/3) http://www.jus.uio.no/sisu/pkg/src/sisu_2.6.0.orig.tar.gz 2a02d475c12398e5cc66e961c96e65f79951c4c2863a5e88f986692563fda983 2770986 sisu_2.6.0.orig.tar.gz -- cgit v1.2.3