diff options
| -rw-r--r-- | conf/sisu/rc/sisurc_by_fn.yml | 12 | ||||
| -rw-r--r-- | conf/sisu/rc/sisurc_by_ft.yml | 12 | ||||
| -rw-r--r-- | data/doc/sisu/CHANGELOG_v4 | 20 | ||||
| -rw-r--r-- | data/doc/sisu/CHANGELOG_v5 | 22 | ||||
| -rw-r--r-- | data/doc/sisu/markup-samples/sisu_manual/_sisu/rc/sisurc_by_fn.yml | 2 | ||||
| -rw-r--r-- | data/doc/sisu/markup-samples/sisu_manual/_sisu/rc/sisurc_by_ft.yml | 2 | ||||
| -rw-r--r-- | data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim | 6 | ||||
| -rw-r--r-- | data/sisu/v4/v/version.yml | 6 | ||||
| -rw-r--r-- | data/sisu/v5/v/version.yml | 6 | ||||
| -rw-r--r-- | lib/sisu/v4/dal_doc_str.rb | 35 | ||||
| -rw-r--r-- | lib/sisu/v4/dal_misc_arrange.rb | 6 | ||||
| -rw-r--r-- | lib/sisu/v4/manifest.rb | 5 | ||||
| -rw-r--r-- | lib/sisu/v4/odf.rb | 8 | ||||
| -rw-r--r-- | lib/sisu/v4/texpdf_format.rb | 3 | ||||
| -rw-r--r-- | lib/sisu/v5/dal_doc_str.rb | 35 | ||||
| -rw-r--r-- | lib/sisu/v5/dal_misc_arrange.rb | 6 | ||||
| -rw-r--r-- | lib/sisu/v5/dal_syntax.rb | 35 | ||||
| -rw-r--r-- | lib/sisu/v5/manifest.rb | 5 | ||||
| -rw-r--r-- | lib/sisu/v5/odf.rb | 8 | ||||
| -rw-r--r-- | lib/sisu/v5/texpdf_format.rb | 3 | 
20 files changed, 181 insertions, 56 deletions
| diff --git a/conf/sisu/rc/sisurc_by_fn.yml b/conf/sisu/rc/sisurc_by_fn.yml index fca18fd2..ce9a9109 100644 --- a/conf/sisu/rc/sisurc_by_fn.yml +++ b/conf/sisu/rc/sisurc_by_fn.yml @@ -49,16 +49,16 @@ show_output_on: 'filesystem_url'  #% flag - set (non-default) processing flag shortcuts -1, -2 etc. (here adding colour and verbosity as default)  flag:    color:        true                        # making colour default -c is toggle, and will now toggle colour off -# default:      '-NQhewpotbxXyYv'            # includes verbose; -m would in any event be run by default -# i:            '-NQhewpoty'                 # -m run by default -# ii:           '-NQhewpotbxXy'              # -m run by default -# iii:          '-NQhewpotbxXyY'             # -m run by default +# default:      '-NQdhewpotbxXyYv'            # includes verbose; -m would in any event be run by default +# i:            '-NQdhewpoty'                 # -m run by default +# ii:           '-NQdhewpotbxXy'              # -m run by default +# iii:          '-NQdhewpotbxXyY'             # -m run by default  # iv:           '-NQhewpotbxXYDy  --update'  # -m run by default  # v:            '-NQhewpotbxXYDyv --update'  # includes verbose; -m run by default  #% papersize, (LaTeX/pdf) available values: A4, US_letter, book_b5, book_a5, US_legal  default: -  papersize:    'A4,letter' +  papersize:    'a4,letter'    #language:      'en'    #texpdf_font:       'Liberation Sans' # 'Liberation Sans' 'Liberation Serif'    #texpdf_font_mono:  'Liberation Mono' #'Inconsolata' @@ -106,6 +106,8 @@ default:  #% output_dir_structure_by: language (language_and_filetype); filetype; or filename (original v1 & v2)  output_dir_structure_by: filename +#% lingual: 'multi' | 'mono' (multi default) +#lingual: mono  permission_set:    zap:               true diff --git a/conf/sisu/rc/sisurc_by_ft.yml b/conf/sisu/rc/sisurc_by_ft.yml index d3c250f7..3afdbdc6 100644 --- a/conf/sisu/rc/sisurc_by_ft.yml +++ b/conf/sisu/rc/sisurc_by_ft.yml @@ -49,16 +49,16 @@ show_output_on: 'filesystem_url'  #% flag - set (non-default) processing flag shortcuts -1, -2 etc. (here adding colour and verbosity as default)  flag:    color:        true                        # making colour default -c is toggle, and will now toggle colour off -# default:      '-NQhewpotbxXyYv'            # includes verbose; -m would in any event be run by default -# i:            '-NQhewpoty'                 # -m run by default -# ii:           '-NQhewpotbxXy'              # -m run by default -# iii:          '-NQhewpotbxXyY'             # -m run by default +# default:      '-NQdhewpotbxXyYv'            # includes verbose; -m would in any event be run by default +# i:            '-NQdhewpoty'                 # -m run by default +# ii:           '-NQdhewpotbxXy'              # -m run by default +# iii:          '-NQdhewpotbxXyY'             # -m run by default  # iv:           '-NQhewpotbxXYDy  --update'  # -m run by default  # v:            '-NQhewpotbxXYDyv --update'  # includes verbose; -m run by default  #% papersize, (LaTeX/pdf) available values: A4, US_letter, book_b5, book_a5, US_legal  default: -  papersize:    'A4,letter' +  papersize:    'a4,letter'    #language:      'en'    #texpdf_font:       'Liberation Sans' # 'Liberation Sans' 'Liberation Serif'    #texpdf_font_mono:  'Liberation Mono' #'Inconsolata' @@ -106,6 +106,8 @@ default:  #% output_dir_structure_by: language (language_and_filetype); filetype; or filename (original v1 & v2)  output_dir_structure_by: filetype +#% lingual: 'multi' | 'mono' (multi default) +#lingual: mono  permission_set:    zap:               true diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 12d19140..d84e0dab 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -23,6 +23,26 @@ v2 branch is removed; it is available in sisu =< 3.3.2  %% Reverse Chronological: +%% 4.2.1.orig.tar.xz (2013-08-28:34/3) +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.2.1 +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.2.1-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_4.2.1.orig.tar.xz +  sisu_4.2.1.orig.tar.xz +  sisu_4.2.1-1.dsc + +* config files (by filetype & filename) touched + +* manifest, output organised by, info, minor touch + +* vim syntax, sisu.vim, fix typo +  * ocn (object numbering) on, off, text block using "--~#" "---#" "--+#" + +* pdf (latex) tables, bugfix + +* odf:odt, footnotes, fix + +* dal, text blocks, tuning +  %% 4.2.0.orig.tar.xz (2013-08-25:33/7)  http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.2.0  http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.2.0-1 diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index 86274ec8..e7a27cc6 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -23,6 +23,28 @@ v2 branch is removed; it is available in sisu =< 3.3.2  %% Reverse Chronological: +%% 5.0.14.orig.tar.xz (2013-08-28:34/3) +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.0.14 +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.0.14-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_5.0.14.orig.tar.xz +  sisu_5.0.14.orig.tar.xz +  sisu_5.0.14-1.dsc + +* config files (by filetype & filename) touched + +* manifest, output organised by, info, minor touch + +* vim syntax, sisu.vim, fix typo +  * ocn (object numbering) on, off, text block using "--~#" "---#" "--+#" + +* dal +  * grouped text with fontface spanning newlines, partial solution, test +  * text blocks, tuning + +* pdf (latex) tables, bugfix + +* odf:odt, footnotes, fix +  %% 5.0.13.orig.tar.xz (2013-08-25:33/7)  http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.0.13  http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.0.13-1 diff --git a/data/doc/sisu/markup-samples/sisu_manual/_sisu/rc/sisurc_by_fn.yml b/data/doc/sisu/markup-samples/sisu_manual/_sisu/rc/sisurc_by_fn.yml index 9bcc416e..bf88977f 100644 --- a/data/doc/sisu/markup-samples/sisu_manual/_sisu/rc/sisurc_by_fn.yml +++ b/data/doc/sisu/markup-samples/sisu_manual/_sisu/rc/sisurc_by_fn.yml @@ -97,7 +97,7 @@ db:  #% output_dir_structure_by: language (language_and_filetype); filetype; or filename (original v1 & v2)  output_dir_structure_by: filename  #% lingual: 'multi' | 'mono' (multi default) -#lingual: multi +#lingual: mono  permission_set:    zap:               true diff --git a/data/doc/sisu/markup-samples/sisu_manual/_sisu/rc/sisurc_by_ft.yml b/data/doc/sisu/markup-samples/sisu_manual/_sisu/rc/sisurc_by_ft.yml index bf34d249..0963780c 100644 --- a/data/doc/sisu/markup-samples/sisu_manual/_sisu/rc/sisurc_by_ft.yml +++ b/data/doc/sisu/markup-samples/sisu_manual/_sisu/rc/sisurc_by_ft.yml @@ -97,7 +97,7 @@ db:  #% output_dir_structure_by: language (language_and_filetype); filetype; or filename (original v1 & v2)  output_dir_structure_by: filetype  #% lingual: 'multi' | 'mono' (multi default) -#lingual: multi +#lingual: mono  permission_set:    zap:               true diff --git a/data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim b/data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim index 87d8c973..7666b75f 100644 --- a/data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim +++ b/data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim @@ -1,7 +1,7 @@  " SiSU Vim syntax file  " SiSU Maintainer: Ralph Amissah <ralph@amissah.com> -" SiSU Markup:     SiSU (sisu-4.2.0) -" Last Change:     2013-08-25 +" SiSU Markup:     SiSU (sisu-4.2.1) +" Last Change:     2013-08-28  " URL: <http://git.sisudoc.org/?p=code/sisu.git;a=blob;f=data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim;hb=HEAD>  "(originally looked at Ruby Vim by Mirko Nasato) @@ -23,7 +23,7 @@ if !exists("sisu_no_identifiers")    syn match   sisu_break               contains=@NoSpell                  " \\\\\( \|$\)\|<br>\|<br />"    syn match   sisu_control             contains=@NoSpell                  "^\(-\\\\-\|=\\\\=\|-\.\.-\|<:p[bn]>\)\s*$"    syn match   sisu_control             contains=@NoSpell                  "^<:\(bo\|---\)>\s*$" -  syn match   sisu_markail             contains=@NoSpell                  "^--[+~-]#\s*$" +  syn match   sisu_marktail            contains=@NoSpell                  "^--[+~-]#\s*$"    syn match   sisu_marktail                                               "[~-]#"    syn match   sisu_control                                                "\""    syn match   sisu_underline                                              "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)" diff --git a/data/sisu/v4/v/version.yml b/data/sisu/v4/v/version.yml index 8ca5949d..b8b4ff72 100644 --- a/data/sisu/v4/v/version.yml +++ b/data/sisu/v4/v/version.yml @@ -1,5 +1,5 @@  --- -:version: 4.2.0 -:date_stamp: 2013w33/7 -:date: "2013-08-25" +:version: 4.2.1 +:date_stamp: 2013w34/3 +:date: "2013-08-28"  :project: SiSU diff --git a/data/sisu/v5/v/version.yml b/data/sisu/v5/v/version.yml index 1435d3fd..50a3185d 100644 --- a/data/sisu/v5/v/version.yml +++ b/data/sisu/v5/v/version.yml @@ -1,5 +1,5 @@  --- -:version: 5.0.13 -:date_stamp: 2013w33/7 -:date: "2013-08-25" +:version: 5.0.14 +:date_stamp: 2013w34/3 +:date: "2013-08-28"  :project: SiSU diff --git a/lib/sisu/v4/dal_doc_str.rb b/lib/sisu/v4/dal_doc_str.rb index 6c588a8a..e7d9917b 100644 --- a/lib/sisu/v4/dal_doc_str.rb +++ b/lib/sisu/v4/dal_doc_str.rb @@ -194,7 +194,7 @@ module SiSU_DAL_DocumentStructureExtract          end          t_o=t_o.gsub(/(?:\n\s*\n)+/m,"\n") if @@flag[:code]==:off          if t_o !~/^(?:code|poem|alt|group|block)\{|^\}(?:code|poem|alt|group|block)|^(?:table\{|\{table)[ ~]/ \ -        and t_o !~/^[`]{3}\s+(?:code|poem|alt|group|block)|^[`]{3}(?:\s+[~-][#]|\s+\~\{.+?\}\~)?\s*$/ \ +        and t_o !~/^[`]{3}\s+(?:code|poem|alt|group|block|table)|^[`]{3}(?:\s+[~-][#]|\s+\~\{.+?\}\~)?\s*$/ \          and @@flag[:code]==:off \          and @@flag[:poem]==:off \          and @@flag[:group]==:off \ @@ -391,7 +391,7 @@ module SiSU_DAL_DocumentStructureExtract              h={ obj: 'alt text start' }                     #introduce a counter              t_o=SiSU_DAL_DocumentStructure::ObjectComment.new.comment(h)              tuned_file << t_o -          elsif t_o =~/^(?:table\{|\{table)[ ~]/ +          elsif t_o =~/^(?:table\{|[`]{3}\s+table|\{table)[ ~]/              h={ obj: 'table start' }                        #introduce a counter              ins=SiSU_DAL_DocumentStructure::ObjectComment.new.comment(h)              tuned_file << ins @@ -409,15 +409,15 @@ module SiSU_DAL_DocumentStructureExtract                  heading=false                end                @h={ head_: heading, cols: cols, widths: col, idx: idx } -            elsif t_o=~/^[`]{3}\s+table(?:~h)?\s+/ +            elsif t_o=~/^[`]{3}\s+table(?:~h)?\s+c\d+/                @@flag[:table]=:tics                @rows=''                case t_o -              when /table\{~h\s+c(\d+);\s+(.+)/ +              when /^[`]{3}\s+table~h\s+c(\d+);\s+(.+)/                  cols=$1                  col=$2.scan(/\d+/)                  heading=true -              when /table\{\s+c(\d+);\s+(.+)/ +              when /^[`]{3}\s+table\s+c(\d+);\s+(.+)/                  cols=$1                  col=$2.scan(/\d+/)                  heading=false @@ -425,7 +425,7 @@ module SiSU_DAL_DocumentStructureExtract                @h={ head_: heading, cols: cols, widths: col, idx: idx }              elsif t_o=~/^\{table(?:~h)?(?:\s+\d+;?)?\}\n.+\Z/m                m1,m2,hd=nil,nil,nil -              tbl=/^\{table(?:~h)?(?:\s+\d+;?)?\}\n(.+)\Z/m.match(t_o)[1]            #two table representations should be consolidated as one +              tbl=/^\{table(?:~h)?(?:\s+\d+;?)?\}\n(.+)\Z/m.match(t_o)[1]                hd=((t_o =~/^\{table~h/) ? true : false)                tbl,tags=extract_tags(tbl)                rws=tbl.split(/\n/) @@ -452,6 +452,29 @@ module SiSU_DAL_DocumentStructureExtract                h={ obj: 'table end' }                        #introduce a counter                t_o=SiSU_DAL_DocumentStructure::ObjectComment.new.comment(h)                t_o +            elsif t_o=~/^[`]{3}\s+table(?:~h)?\s+/ +              m1,m2,hd=nil,nil,nil +              h=case t_o +              when /^[`]{3}\s+table~h\s+(.+?)\n(.+)\Z/m          #two table representations should be consolidated as one +                m1,tbl,hd=$1,$2,true +              when /^[`]{3}\s+table\s+(.+?)\n(.+)\Z/m            #two table representations should be consolidated as one +                m1,tbl,hd=$1,$2,false +              else nil +              end +              tbl,tags=extract_tags(tbl) +              col=m1.scan(/\d+/) +              rws=tbl.split(/\n/) +              rows='' +              rws.each do |r| +                r=r.gsub(/\s*\|\s*/m,"#{Mx[:tc_p]}")        #r.gsub!(/\|/m,"#{Mx[:tc_p]}") +                rows += r + Mx[:tc_c] +              end +              h={ head_: hd, cols: col.length, widths: col, obj: rows, idx: idx, tags: tags } +              t_o=SiSU_DAL_DocumentStructure::ObjectTable.new.table(h) unless h.nil? +              tuned_file << t_o +              h={ obj: 'table end' }                        #introduce a counter +              t_o=SiSU_DAL_DocumentStructure::ObjectComment.new.comment(h) +              t_o              elsif t_o=~/^\{table(?:~h)?\s+/                m1,m2,hd=nil,nil,nil                h=case t_o diff --git a/lib/sisu/v4/dal_misc_arrange.rb b/lib/sisu/v4/dal_misc_arrange.rb index ab4f3ea4..e6cc72db 100644 --- a/lib/sisu/v4/dal_misc_arrange.rb +++ b/lib/sisu/v4/dal_misc_arrange.rb @@ -78,8 +78,10 @@ module SiSU_DAL_MiscArrangeText          block_open,block_close,text=nil,nil,nil          if para =~/\A[`]{3}\s+.+?\n.+?\n[`]{3}(?:\s+[~-][#]|\s+\~\{.+?\}\~)?\s*\Z/m            block_open,text,block_close=/\A([`]{3}\s+.+?)\n(.+?)\n([`]{3}(\s+[~-][#]|\s+\~\{.+?\}\~)?)\s*\Z/m.match(para)[1..3] -          para=[] -          para << block_open << text << block_close +          ((para=~/^[`]{3}\s+table(?:~h)?\s+/) \ +          and (para !~/^[`]{3}\s+table(?:~h)?\s+c\d+/)) \ +          ? para +          : (para=[]; para << block_open << text << block_close)          elsif para =~/\A[`]{3}\s+.+?\n.*?\Z/m #look at, study            block_open,text=/\A([`]{3}(?:\s+.+?))\n(.*?)\Z/m.match(para)[1,2]            para=[] diff --git a/lib/sisu/v4/manifest.rb b/lib/sisu/v4/manifest.rb index eb888387..d86830e4 100644 --- a/lib/sisu/v4/manifest.rb +++ b/lib/sisu/v4/manifest.rb @@ -841,10 +841,11 @@ WOK              '..'            else '..'            end +          output_organised_by="(output organised by #{@env.output_dir_structure.by?})"            harvest=(FileTest.file?("#{pth_local}/authors#{@fn_lng}.html") \            && FileTest.file?("#{pth_local}/topics#{@fn_lng}.html")) \ -          ? %{<p class="small"><a href="#{pth_rel_home}/index.html">.:</a> other document manifests: [<a href="#{pth_rel}/authors#{@fn_lng}.html">authors</a>] [<a href="#{pth_rel}/topics#{@fn_lng}.html">topics</a>]</p>} -          : '' +          ? %{<p class="small"><a href="#{pth_rel_home}/index.html">.:</a> other document manifests: [<a href="#{pth_rel}/authors#{@fn_lng}.html">authors</a>] [<a href="#{pth_rel}/topics#{@fn_lng}.html">topics</a>] #{output_organised_by}</p>} +          : %{<p class="small"><a href="#{pth_rel_home}/index.html">#{output_organised_by}</p>}            manifest_title=%{<p class="bold">#{@translate.manifest_description}</p>#{harvest}}            @manifest[:html] <<<<WOK  <div id="horizontal_links"> diff --git a/lib/sisu/v4/odf.rb b/lib/sisu/v4/odf.rb index acc44ab3..adaaea87 100644 --- a/lib/sisu/v4/odf.rb +++ b/lib/sisu/v4/odf.rb @@ -119,7 +119,6 @@ module SiSU_ODF          begin            pre            @data=markup(@dal_array) -          post            publish          ensure            unless @md.opt.cmd =~/[MV]/ #check maintenance flag @@ -173,6 +172,7 @@ module SiSU_ODF          SiSU_ODF_Format::Tags.new.set_bookmark_tag(dob)        end        def heading(dob,p_num) +        dob=footnote(dob)          m=/#{$1}/          breakpage=''          if @md.fns \ @@ -351,6 +351,7 @@ module SiSU_ODF          dob        end        def normal(dob,p_num)                                                           #P1 - P3 +        dob=footnote(dob)          dob.obj=dob.obj.gsub(/#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/,              '<text:a xlink:type="simple" xlink:href="\1">\1</text:a>'). #http ftp matches escaped, no decoration            gsub(/#{Mx[:url_o]}([a-zA-Z0-9._-]+\@\S+?\.[a-zA-Z0-9._-]+)#{Mx[:url_c]}/, @@ -431,6 +432,7 @@ module SiSU_ODF          dob.obj.split(/#{Mx[:br_line]}|#{Mx[:br_nl]}/).each_with_index do |parablock,i|            set_ref=(i==0) ? "#{p_num[:set_ref]}#{set_bookmark_tag(dob)}" : ''            parablock=group_clean(parablock) +          parablock=footnote(parablock)            parray << %{<text:p text:style-name="P_group">#{set_ref}#{parablock}</text:p>} if parablock =~/\S+/          end          dob.obj=parray.join \ @@ -506,6 +508,7 @@ module SiSU_ODF        end        def table(dob,p_num)                                                            #          if dob.is ==:table +          dob=footnote(dob) #check            table=SiSU_ODF_Format::Table.new(@md,dob,p_num)            dob=table.table          end @@ -542,7 +545,6 @@ module SiSU_ODF              #p_num=SiSU_ODF_Format::ParagraphNumber.new(dob.ocn).set_ref_and_display            end          end -        dob=footnote(dob)          if dob.is==:heading            @@odf[:body] << heading(dob,p_num).obj << @br*2            if SiSU_Env::ProcessingSettings.new(md).build.toc? @@ -731,8 +733,6 @@ WOK          x=x.gsub(/\n+/m,'') unless @md.opt.cmd=~/M/          @@odf[:head] << x        end -      def post -      end        def publish          content=[]          br_pg='<text:p text:style-name="P_normal_page_new"> </text:p>' diff --git a/lib/sisu/v4/texpdf_format.rb b/lib/sisu/v4/texpdf_format.rb index c154fc2b..b010bb08 100644 --- a/lib/sisu/v4/texpdf_format.rb +++ b/lib/sisu/v4/texpdf_format.rb @@ -116,7 +116,8 @@ module SiSU_TeX_Pdf        "\\begin{tiny}\\hspace{0mm}\\end{tiny}{\\marginpar{\\begin{tiny}\\hspace{0mm}\\hypertarget{#{dob.ocn}}{#{show_ocn}}\\end{tiny}}}" #ocn object citation numbering      end      def table_special_characters(r) -      r=r.gsub(/#{Mx[:tc_p]}|$/u,'&'). +      r=r.gsub(/#{Mx[:tc_p]}/mu,'&'). +        gsub(/#{Mx[:tc_c]}/m,'\\\\\\').          gsub(/%/,'\%').          gsub(/#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}/,'\begin{bfseries}\1 \end{bfseries}').          gsub(/#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}/,'\emph{\1}'). diff --git a/lib/sisu/v5/dal_doc_str.rb b/lib/sisu/v5/dal_doc_str.rb index d3f65bff..612d2905 100644 --- a/lib/sisu/v5/dal_doc_str.rb +++ b/lib/sisu/v5/dal_doc_str.rb @@ -194,7 +194,7 @@ module SiSU_DAL_DocumentStructureExtract          end          t_o=t_o.gsub(/(?:\n\s*\n)+/m,"\n") if @@flag[:code]==:off          if t_o !~/^(?:code|poem|alt|group|block)\{|^\}(?:code|poem|alt|group|block)|^(?:table\{|\{table)[ ~]/ \ -        and t_o !~/^[`]{3}\s+(?:code|poem|alt|group|block)|^[`]{3}(?:\s+[~-][#]|\s+\~\{.+?\}\~)?\s*$/ \ +        and t_o !~/^[`]{3}\s+(?:code|poem|alt|group|block|table)|^[`]{3}(?:\s+[~-][#]|\s+\~\{.+?\}\~)?\s*$/ \          and @@flag[:code]==:off \          and @@flag[:poem]==:off \          and @@flag[:group]==:off \ @@ -391,7 +391,7 @@ module SiSU_DAL_DocumentStructureExtract              h={ obj: 'alt text start' }                     #introduce a counter              t_o=SiSU_DAL_DocumentStructure::ObjectComment.new.comment(h)              tuned_file << t_o -          elsif t_o =~/^(?:table\{|\{table)[ ~]/ +          elsif t_o =~/^(?:table\{|[`]{3}\s+table|\{table)[ ~]/              h={ obj: 'table start' }                        #introduce a counter              ins=SiSU_DAL_DocumentStructure::ObjectComment.new.comment(h)              tuned_file << ins @@ -409,15 +409,15 @@ module SiSU_DAL_DocumentStructureExtract                  heading=false                end                @h={ head_: heading, cols: cols, widths: col, idx: idx } -            elsif t_o=~/^[`]{3}\s+table(?:~h)?\s+/ +            elsif t_o=~/^[`]{3}\s+table(?:~h)?\s+c\d+/                @@flag[:table]=:tics                @rows=''                case t_o -              when /table\{~h\s+c(\d+);\s+(.+)/ +              when /^[`]{3}\s+table~h\s+c(\d+);\s+(.+)/                  cols=$1                  col=$2.scan(/\d+/)                  heading=true -              when /table\{\s+c(\d+);\s+(.+)/ +              when /^[`]{3}\s+table\s+c(\d+);\s+(.+)/                  cols=$1                  col=$2.scan(/\d+/)                  heading=false @@ -425,7 +425,7 @@ module SiSU_DAL_DocumentStructureExtract                @h={ head_: heading, cols: cols, widths: col, idx: idx }              elsif t_o=~/^\{table(?:~h)?(?:\s+\d+;?)?\}\n.+\Z/m                m1,m2,hd=nil,nil,nil -              tbl=/^\{table(?:~h)?(?:\s+\d+;?)?\}\n(.+)\Z/m.match(t_o)[1]            #two table representations should be consolidated as one +              tbl=/^\{table(?:~h)?(?:\s+\d+;?)?\}\n(.+)\Z/m.match(t_o)[1]                hd=((t_o =~/^\{table~h/) ? true : false)                tbl,tags=extract_tags(tbl)                rws=tbl.split(/\n/) @@ -452,6 +452,29 @@ module SiSU_DAL_DocumentStructureExtract                h={ obj: 'table end' }                        #introduce a counter                t_o=SiSU_DAL_DocumentStructure::ObjectComment.new.comment(h)                t_o +            elsif t_o=~/^[`]{3}\s+table(?:~h)?\s+/ +              m1,m2,hd=nil,nil,nil +              h=case t_o +              when /^[`]{3}\s+table~h\s+(.+?)\n(.+)\Z/m          #two table representations should be consolidated as one +                m1,tbl,hd=$1,$2,true +              when /^[`]{3}\s+table\s+(.+?)\n(.+)\Z/m            #two table representations should be consolidated as one +                m1,tbl,hd=$1,$2,false +              else nil +              end +              tbl,tags=extract_tags(tbl) +              col=m1.scan(/\d+/) +              rws=tbl.split(/\n/) +              rows='' +              rws.each do |r| +                r=r.gsub(/\s*\|\s*/m,"#{Mx[:tc_p]}")        #r.gsub!(/\|/m,"#{Mx[:tc_p]}") +                rows += r + Mx[:tc_c] +              end +              h={ head_: hd, cols: col.length, widths: col, obj: rows, idx: idx, tags: tags } +              t_o=SiSU_DAL_DocumentStructure::ObjectTable.new.table(h) unless h.nil? +              tuned_file << t_o +              h={ obj: 'table end' }                        #introduce a counter +              t_o=SiSU_DAL_DocumentStructure::ObjectComment.new.comment(h) +              t_o              elsif t_o=~/^\{table(?:~h)?\s+/                m1,m2,hd=nil,nil,nil                h=case t_o diff --git a/lib/sisu/v5/dal_misc_arrange.rb b/lib/sisu/v5/dal_misc_arrange.rb index ab4f3ea4..e6cc72db 100644 --- a/lib/sisu/v5/dal_misc_arrange.rb +++ b/lib/sisu/v5/dal_misc_arrange.rb @@ -78,8 +78,10 @@ module SiSU_DAL_MiscArrangeText          block_open,block_close,text=nil,nil,nil          if para =~/\A[`]{3}\s+.+?\n.+?\n[`]{3}(?:\s+[~-][#]|\s+\~\{.+?\}\~)?\s*\Z/m            block_open,text,block_close=/\A([`]{3}\s+.+?)\n(.+?)\n([`]{3}(\s+[~-][#]|\s+\~\{.+?\}\~)?)\s*\Z/m.match(para)[1..3] -          para=[] -          para << block_open << text << block_close +          ((para=~/^[`]{3}\s+table(?:~h)?\s+/) \ +          and (para !~/^[`]{3}\s+table(?:~h)?\s+c\d+/)) \ +          ? para +          : (para=[]; para << block_open << text << block_close)          elsif para =~/\A[`]{3}\s+.+?\n.*?\Z/m #look at, study            block_open,text=/\A([`]{3}(?:\s+.+?))\n(.*?)\Z/m.match(para)[1,2]            para=[] diff --git a/lib/sisu/v5/dal_syntax.rb b/lib/sisu/v5/dal_syntax.rb index 7852ab85..f6d01d22 100644 --- a/lib/sisu/v5/dal_syntax.rb +++ b/lib/sisu/v5/dal_syntax.rb @@ -308,16 +308,41 @@ module SiSU_DAL_Syntax        end        dob      end +    def fontface_lines(dob,leader) +      while (dob.obj =~/#{Mx[:br_nl]}/ \ +      and dob.obj =~/(?:#{leader})([*!\/_#])\{(.+?)\}\1/m) \ +      and $2 =~/#{Mx[:br_nl]}/ +        dob=if dob.obj =~/#{Mx[:br_nl]}/ \ +        and dob.obj =~/(#{leader})([*!\/_#])\{(.+?)\}\2/m +          lead,fce,txt=$1,$2,$3 +          dob=if txt =~/#{Mx[:br_nl]}/ +            lead_break=if dob.obj =~/^#{Mx[:br_nl]}/ +              dob.obj=dob.obj.sub(/^#{Mx[:br_nl]}/,'') +              Mx[:br_nl] +            else '' +            end +            txt="#{lead_break}#{fce}\{" + txt.split(Mx[:br_nl]).join("\}#{fce}#{Mx[:br_nl]}#{fce}\{") + "\}#{fce}" +            dob.obj=dob.obj.sub(/(?:^|#{Mx[:gl_c]}|\s+|['"]|[#{Mx[:nbsp]}#{Mx[:fa_o_c]}#{Mx[:fa_c]}#{Mx[:lnk_o]}#{Mx[:br_nl]}#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:tc_c]}#{Mx[:tc_p]}]|[\(\[\{]|\>)([*!\/_#])\{.+?\}\1/m,"#{lead}#{txt}") +            dob +          else dob +          end +        end +        dob +      end +      dob +    end      def fontface(dob) -      dob.obj=dob.obj.gsub(/(^|#{Mx[:gl_c]}|\s+|['"]|[#{Mx[:nbsp]}#{Mx[:fa_o_c]}#{Mx[:fa_c]}#{Mx[:lnk_o]}#{Mx[:br_nl]}#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:tc_c]}#{Mx[:tc_p]}]|[\(\[\{]|\>)\*\{(.+?)\}\*/m, +      leader=/^|#{Mx[:gl_c]}|\s+|['"]|[#{Mx[:nbsp]}#{Mx[:fa_o_c]}#{Mx[:fa_c]}#{Mx[:lnk_o]}#{Mx[:br_nl]}#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:tc_c]}#{Mx[:tc_p]}]|[\(\[\{]|\>/ +      dob=fontface_lines(dob,leader) +      dob.obj=dob.obj.gsub(/(#{leader})\*\{(.+?)\}\*/m,            "\\1#{@emph[:o]}\\2#{@emph[:c]}").                                                                                                                             #emphasis -        gsub(/(^|#{Mx[:gl_c]}|\s+|['"]|[#{Mx[:nbsp]}#{Mx[:fa_o_c]}#{Mx[:fa_c]}#{Mx[:lnk_o]}#{Mx[:br_nl]}#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:tc_c]}#{Mx[:tc_p]}]|[\(\[\{]|\>)!\{(.+?)\}!/m, +        gsub(/(#{leader})!\{(.+?)\}!/m,            "\\1#{Mx[:fa_bold_o]}\\2#{Mx[:fa_bold_c]}").                                                                                                                   #bold -        gsub(/(^|#{Mx[:gl_c]}|\s+|['"]|[#{Mx[:nbsp]}#{Mx[:fa_o_c]}#{Mx[:fa_c]}#{Mx[:lnk_o]}#{Mx[:br_nl]}#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:tc_c]}#{Mx[:tc_p]}]|[\(\[\{]|\(|\>)\/\{(.+?)\}\//m, +        gsub(/(#{leader})\/\{(.+?)\}\//m,            "\\1#{Mx[:fa_italics_o]}\\2#{Mx[:fa_italics_c]}").                                                                                                             #italics -        gsub(/(^|#{Mx[:gl_c]}|\s+|['"]|[#{Mx[:nbsp]}#{Mx[:fa_o_c]}#{Mx[:fa_c]}#{Mx[:lnk_o]}#{Mx[:br_nl]}#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:tc_c]}#{Mx[:tc_p]}]|[\(\[\{]|\>)_\{(.+?)\}_/m, +        gsub(/(#{leader})_\{(.+?)\}_/m,            "\\1#{Mx[:fa_underscore_o]}\\2#{Mx[:fa_underscore_c]}").                                                                                                       #underscore -        gsub(/(^|#{Mx[:gl_c]}|\s+|['"]|[#{Mx[:nbsp]}#{Mx[:fa_o_c]}#{Mx[:fa_c]}#{Mx[:lnk_o]}#{Mx[:br_nl]}#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:tc_c]}#{Mx[:tc_p]}]|[\(\[\{]|\>)#\{(.+?)\}#/m, +        gsub(/(#{leader})#\{(.+?)\}#/m,            "\\1#{Mx[:fa_monospace_o]}\\2#{Mx[:fa_monospace_c]}").                                                                                                         #monospace          gsub(/(^|#{Mx[:gl_c]}|\s+|['"]|[#{Mx[:nbsp]}#{Mx[:fa_o_c]}#{Mx[:fa_c]}]|\(|\>)\"\{(.+?)\}\"/m,            "\\1#{Mx[:fa_cite_o]}\\2#{Mx[:fa_c_o]}cite#{Mx[:fa_c]}").                                                                                                      #cite /blockquote? diff --git a/lib/sisu/v5/manifest.rb b/lib/sisu/v5/manifest.rb index 95112a7a..a8e6bb25 100644 --- a/lib/sisu/v5/manifest.rb +++ b/lib/sisu/v5/manifest.rb @@ -841,10 +841,11 @@ WOK              '..'            else '..'            end +          output_organised_by="(output organised by #{@env.output_dir_structure.by?})"            harvest=(FileTest.file?("#{pth_local}/authors#{@fn_lng}.html") \            && FileTest.file?("#{pth_local}/topics#{@fn_lng}.html")) \ -          ? %{<p class="small"><a href="#{pth_rel_home}/index.html">.:</a> other document manifests: [<a href="#{pth_rel}/authors#{@fn_lng}.html">authors</a>] [<a href="#{pth_rel}/topics#{@fn_lng}.html">topics</a>]</p>} -          : '' +          ? %{<p class="small"><a href="#{pth_rel_home}/index.html">.:</a> other document manifests: [<a href="#{pth_rel}/authors#{@fn_lng}.html">authors</a>] [<a href="#{pth_rel}/topics#{@fn_lng}.html">topics</a>] #{output_organised_by}</p>} +          : %{<p class="small"><a href="#{pth_rel_home}/index.html">#{output_organised_by}</p>}            manifest_title=%{<p class="bold">#{@translate.manifest_description}</p>#{harvest}}            @manifest[:html] <<<<WOK  <div id="horizontal_links"> diff --git a/lib/sisu/v5/odf.rb b/lib/sisu/v5/odf.rb index 21243e6f..f52d98e1 100644 --- a/lib/sisu/v5/odf.rb +++ b/lib/sisu/v5/odf.rb @@ -119,7 +119,6 @@ module SiSU_ODF          begin            pre            @data=markup(@dal_array) -          post            publish          ensure            unless @md.opt.cmd =~/[MV]/ #check maintenance flag @@ -173,6 +172,7 @@ module SiSU_ODF          SiSU_ODF_Format::Tags.new.set_bookmark_tag(dob)        end        def heading(dob,p_num) +        dob=footnote(dob)          m=/#{$1}/          breakpage=''          if @md.fns \ @@ -351,6 +351,7 @@ module SiSU_ODF          dob        end        def normal(dob,p_num)                                                           #P1 - P3 +        dob=footnote(dob)          dob.obj=dob.obj.gsub(/#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/,              '<text:a xlink:type="simple" xlink:href="\1">\1</text:a>'). #http ftp matches escaped, no decoration            gsub(/#{Mx[:url_o]}([a-zA-Z0-9._-]+\@\S+?\.[a-zA-Z0-9._-]+)#{Mx[:url_c]}/, @@ -431,6 +432,7 @@ module SiSU_ODF          dob.obj.split(/#{Mx[:br_line]}|#{Mx[:br_nl]}/).each_with_index do |parablock,i|            set_ref=(i==0) ? "#{p_num[:set_ref]}#{set_bookmark_tag(dob)}" : ''            parablock=group_clean(parablock) +          parablock=footnote(parablock)            parray << %{<text:p text:style-name="P_group">#{set_ref}#{parablock}</text:p>} if parablock =~/\S+/          end          dob.obj=parray.join \ @@ -506,6 +508,7 @@ module SiSU_ODF        end        def table(dob,p_num)                                                            #          if dob.is ==:table +          dob=footnote(dob) #check            table=SiSU_ODF_Format::Table.new(@md,dob,p_num)            dob=table.table          end @@ -542,7 +545,6 @@ module SiSU_ODF              #p_num=SiSU_ODF_Format::ParagraphNumber.new(dob.ocn).set_ref_and_display            end          end -        dob=footnote(dob)          if dob.is==:heading            @@odf[:body] << heading(dob,p_num).obj << @br*2            if SiSU_Env::ProcessingSettings.new(md).build.toc? @@ -731,8 +733,6 @@ WOK          x=x.gsub(/\n+/m,'') unless @md.opt.cmd=~/M/          @@odf[:head] << x        end -      def post -      end        def publish          content=[]          br_pg='<text:p text:style-name="P_normal_page_new"> </text:p>' diff --git a/lib/sisu/v5/texpdf_format.rb b/lib/sisu/v5/texpdf_format.rb index 9e71e128..172dfa56 100644 --- a/lib/sisu/v5/texpdf_format.rb +++ b/lib/sisu/v5/texpdf_format.rb @@ -116,7 +116,8 @@ module SiSU_TeX_Pdf        "\\begin{tiny}\\hspace{0mm}\\end{tiny}{\\marginpar{\\begin{tiny}\\hspace{0mm}\\hypertarget{#{dob.ocn}}{#{show_ocn}}\\end{tiny}}}" #ocn object citation numbering      end      def table_special_characters(r) -      r=r.gsub(/#{Mx[:tc_p]}|$/u,'&'). +      r=r.gsub(/#{Mx[:tc_p]}/mu,'&'). +        gsub(/#{Mx[:tc_c]}/m,'\\\\\\').          gsub(/%/,'\%').          gsub(/#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}/,'\begin{bfseries}\1 \end{bfseries}').          gsub(/#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}/,'\emph{\1}'). | 
