diff options
author | Ralph Amissah <ralph@amissah.com> | 2013-11-02 22:55:29 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2013-11-02 22:55:29 -0400 |
commit | a89fd60f2b523d3ba26b1a2e198eacf6304e2729 (patch) | |
tree | 77145f4c6712f5ceef548973d7488e6122f0b160 | |
parent | v4 v5: version & changelog (diff) |
v4 v5: constants, ocn output delimiter (where used) changed to 「...」
-rw-r--r-- | data/doc/sisu/CHANGELOG_v4 | 3 | ||||
-rw-r--r-- | data/doc/sisu/CHANGELOG_v5 | 3 | ||||
-rw-r--r-- | lib/sisu/v4/constants.rb | 1 | ||||
-rw-r--r-- | lib/sisu/v4/odf_format.rb | 4 | ||||
-rw-r--r-- | lib/sisu/v5/constants.rb | 1 | ||||
-rw-r--r-- | lib/sisu/v5/manifest.rb | 7 | ||||
-rw-r--r-- | lib/sisu/v5/odf.rb | 9 | ||||
-rw-r--r-- | lib/sisu/v5/odf_format.rb | 4 | ||||
-rw-r--r-- | lib/sisu/v5/plaintext_format.rb | 14 | ||||
-rw-r--r-- | lib/sisu/v5/sysenv.rb | 8 |
10 files changed, 23 insertions, 31 deletions
diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 7d1e6ce8..c81106e5 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -30,6 +30,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.2.10.orig.tar.xz sisu_4.2.10.orig.tar.xz sisu_4.2.10-1.dsc +* constants, ocn output delimiter (where used) changed to 「...」 + (from square brackets [...]) + %% 4.2.9.orig.tar.xz (2013-10-27:42/7) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.2.9 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.2.9-1 diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index 2fd9286a..7d6fa055 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -30,6 +30,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.0.23.orig.tar.xz sisu_5.0.23.orig.tar.xz sisu_5.0.23-1.dsc +* constants, ocn output delimiter (where used) changed to 「...」 + (from square brackets [...]) + %% 5.0.22.orig.tar.xz (2013-10-27:42/7) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.0.22 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.0.22-1 diff --git a/lib/sisu/v4/constants.rb b/lib/sisu/v4/constants.rb index 478b7277..f95b1dbd 100644 --- a/lib/sisu/v4/constants.rb +++ b/lib/sisu/v4/constants.rb @@ -176,6 +176,7 @@ Rx={ meta: /#{Mx[:meta_o]}(\S+?)#{Mx[:meta_c]}/, } Dx={ + ocn_o: '「', ocn_c: '」', url_o: '‹', url_c: '›', url_o_xml: '<', url_c_xml: '>', rel_o: '‹', rel_c: '›', diff --git a/lib/sisu/v4/odf_format.rb b/lib/sisu/v4/odf_format.rb index 348ebb62..79f68478 100644 --- a/lib/sisu/v4/odf_format.rb +++ b/lib/sisu/v4/odf_format.rb @@ -69,12 +69,12 @@ module SiSU_ODF_Format end def set_ref_and_display set_ref=@paranum.gsub(/(\d+)/,' <text:span text:style-name="Span_subscript"><text:reference-mark-start text:name="\1"/><text:reference-mark-end text:name="\1"/></text:span>') - disp=@paranum.gsub(/(\d+)/,' <text:span text:style-name="Span_subscript">[\1]</text:span>') + disp=@paranum.gsub(/(\d+)/,%{ <text:span text:style-name="Span_subscript">#{Dx[:ocn_o]}\\1#{Dx[:ocn_c]}</text:span>}) { display: disp, set_ref: set_ref } end def set_bookmark_and_display set_ref=@paranum.gsub(/(\d+)/,' <text:span text:style-name="Span_subscript"><text:bookmark-start text:name="\1"/><text:bookmark-end text:name="\1"/></text:span>') - disp=@paranum.gsub(/(\d+)/,' <text:span text:style-name="Span_subscript">[\1]</text:span>') + disp=@paranum.gsub(/(\d+)/,%{ <text:span text:style-name="Span_subscript">#{Dx[:ocn_o]}\\1#{Dx[:ocn_c]}</text:span>}) { display: disp, set_ref: set_ref } end def name diff --git a/lib/sisu/v5/constants.rb b/lib/sisu/v5/constants.rb index d89a391a..26130506 100644 --- a/lib/sisu/v5/constants.rb +++ b/lib/sisu/v5/constants.rb @@ -176,6 +176,7 @@ Rx={ meta: /#{Mx[:meta_o]}(\S+?)#{Mx[:meta_c]}/, } Dx={ + ocn_o: '「', ocn_c: '」', url_o: '‹', url_c: '›', url_o_xml: '<', url_c_xml: '>', rel_o: '‹', rel_c: '›', diff --git a/lib/sisu/v5/manifest.rb b/lib/sisu/v5/manifest.rb index 071959c7..3d6a5835 100644 --- a/lib/sisu/v5/manifest.rb +++ b/lib/sisu/v5/manifest.rb @@ -418,12 +418,7 @@ module SiSU_Manifest summarize(id,file,pth,rel,url) end if FileTest.file?(@f.place_file.txt.dir)==true - id=if @md.opt.cmd =~/a/ then 'Plaintext (Unix (UTF-8) with footnotes)' - elsif @md.opt.cmd =~/e/ then 'Plaintext (Unix (UTF-8) with endnotes)' - elsif @md.opt.cmd =~/A/ then 'Plaintext (dos (UTF-8) with footnotes)' - elsif @md.opt.cmd =~/E/ then 'Plaintext (dos (UTF-8) with endnotes)' - else 'Plaintext (UTF-8)' - end + id='Plaintext (UTF-8)' pth=@f.output_path.txt.dir rel=@f.output_path.txt.rel_sm url=@f.output_path.txt.url diff --git a/lib/sisu/v5/odf.rb b/lib/sisu/v5/odf.rb index ae9a09ec..5e277992 100644 --- a/lib/sisu/v5/odf.rb +++ b/lib/sisu/v5/odf.rb @@ -548,10 +548,11 @@ module SiSU_ODF end p_num={ display: '', set_ref: '' } if dob.is !~/(^#{Rx[:meta]}|#{Mx[:br_eof]}|#{Mx[:br_endnotes]})/ - if defined? dob.ocn \ - and dob.ocn.is_a?(Fixnum) - p_num=SiSU_ODF_Format::ParagraphNumber.new(dob.ocn).set_bookmark_and_display - #p_num=SiSU_ODF_Format::ParagraphNumber.new(dob.ocn).set_ref_and_display + if @env.odt_ocn? + if defined? dob.ocn \ + and dob.ocn.is_a?(Fixnum) + p_num=SiSU_ODF_Format::ParagraphNumber.new(dob.ocn).set_bookmark_and_display + end end end if dob.is==:heading diff --git a/lib/sisu/v5/odf_format.rb b/lib/sisu/v5/odf_format.rb index d3630df9..28c69c44 100644 --- a/lib/sisu/v5/odf_format.rb +++ b/lib/sisu/v5/odf_format.rb @@ -69,12 +69,12 @@ module SiSU_ODF_Format end def set_ref_and_display set_ref=@paranum.gsub(/(\d+)/,' <text:span text:style-name="Span_subscript"><text:reference-mark-start text:name="\1"/><text:reference-mark-end text:name="\1"/></text:span>') - disp=@paranum.gsub(/(\d+)/,' <text:span text:style-name="Span_subscript">[\1]</text:span>') + disp=@paranum.gsub(/(\d+)/,%{ <text:span text:style-name="Span_subscript">#{Dx[:ocn_o]}\\1#{Dx[:ocn_c]}</text:span>}) { display: disp, set_ref: set_ref } end def set_bookmark_and_display set_ref=@paranum.gsub(/(\d+)/,' <text:span text:style-name="Span_subscript"><text:bookmark-start text:name="\1"/><text:bookmark-end text:name="\1"/></text:span>') - disp=@paranum.gsub(/(\d+)/,' <text:span text:style-name="Span_subscript">[\1]</text:span>') + disp=@paranum.gsub(/(\d+)/,%{ <text:span text:style-name="Span_subscript">#{Dx[:ocn_o]}\\1#{Dx[:ocn_c]}</text:span>}) { display: disp, set_ref: set_ref } end def name diff --git a/lib/sisu/v5/plaintext_format.rb b/lib/sisu/v5/plaintext_format.rb index 092e69f6..acad8828 100644 --- a/lib/sisu/v5/plaintext_format.rb +++ b/lib/sisu/v5/plaintext_format.rb @@ -68,7 +68,7 @@ module SiSU_Plaintext_Format @paranum=/(\d+)/m.match(paranum.to_s)[1] end def display - @paranum.gsub(/(\d+)/,"\n[\\1]") + @paranum.gsub(/(\d+)/,"\n#{Dx[:ocn_o]}\\1#{Dx[:ocn_c]}") end def name #unused @paranum.gsub(/(\d+)/,'\1') @@ -97,18 +97,6 @@ module SiSU_Plaintext_Format def scr_endnote_body "<endnote>#{@txt}</endnote> " end - def heading_body1 - end - def heading_body2 - end - def heading_body3 - end - def heading_body4 - end - def heading_body5 - end - def heading_body6 - end end class XML end diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb index b23b7f80..f1076c68 100644 --- a/lib/sisu/v5/sysenv.rb +++ b/lib/sisu/v5/sysenv.rb @@ -1474,15 +1474,15 @@ module SiSU_Env end def odt_ocn? ((defined? @rc['odt']['ocn']) \ - && @rc['odt']['ocn']==true) \ + && @rc['odt']['ocn']==false) \ ? @rc['odt']['ocn'] - : false + : true end def plaintext_ocn? ((defined? @rc['plaintext']['ocn']) \ - && @rc['plaintext']['ocn']==true) \ + && @rc['plaintext']['ocn']==false) \ ? @rc['plaintext']['ocn'] - : false + : true end def widget #needs (md) #move @rc=SiSU_Env::GetInit.new.sisu_yaml.rc |