From b097acbfaa120c520904044c3c75a25223510d69 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 22 Feb 2013 19:10:23 -0500 Subject: v4: version & changelog --- data/doc/sisu/CHANGELOG_v4 | 7 +++++++ data/sisu/v4/v/version.yml | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index eedd132d..f205ec63 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -21,6 +21,13 @@ v2 branch is removed; it is available in sisu =< 3.3.2 %% Reverse Chronological: +%% 4.0.9.orig.tar.xz (2013-02-22:07/5) +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.9 +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.9-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.9.orig.tar.xz + sisu_4.0.9.orig.tar.xz + sisu_4.0.9-1.dsc + %% 4.0.8.orig.tar.xz (2013-02-20:07/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.8 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.8-1 diff --git a/data/sisu/v4/v/version.yml b/data/sisu/v4/v/version.yml index 4f2891e2..447a2e9e 100644 --- a/data/sisu/v4/v/version.yml +++ b/data/sisu/v4/v/version.yml @@ -1,5 +1,5 @@ --- -:version: 4.0.8 -:date_stamp: 2013w07/3 -:date: "2013-02-20" +:version: 4.0.9 +:date_stamp: 2013w07/5 +:date: "2013-02-22" :project: SiSU -- cgit v1.2.3 From 9916bc2ddd1480a3ba35b3a74b766d9acbd34873 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 22 Feb 2013 19:23:04 -0500 Subject: v4: dal, markup: line across page divider -..- introduced * an alternative to page breaks -\\- & =\\=, significantly affects pdf & odf * output formats modified to include (pdf, odf, epub, html, plaintext) --- data/doc/sisu/CHANGELOG_v4 | 4 ++++ lib/sisu/v4/constants.rb | 2 ++ lib/sisu/v4/dal_doc_str.rb | 3 +++ lib/sisu/v4/dal_numbering.rb | 4 +++- lib/sisu/v4/dal_syntax.rb | 3 ++- lib/sisu/v4/epub_format.rb | 2 +- lib/sisu/v4/manpage.rb | 18 +++++++++--------- lib/sisu/v4/odf.rb | 10 ++++++++-- lib/sisu/v4/odf_format.rb | 5 +++++ lib/sisu/v4/options.rb | 4 +++- lib/sisu/v4/param.rb | 15 ++++++++++----- lib/sisu/v4/param_make.rb | 14 ++++++++++---- lib/sisu/v4/plaintext.rb | 3 ++- lib/sisu/v4/shared_xml.rb | 1 + lib/sisu/v4/texpdf.rb | 1 + 15 files changed, 64 insertions(+), 25 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index f205ec63..19a1d88b 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -28,6 +28,10 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.9.orig.tar.xz sisu_4.0.9.orig.tar.xz sisu_4.0.9-1.dsc +* v4: dal, line across page divider -..- introduced, an alternative to page + break -\\- & =\\=, affects pdf and odf most significantly + * output formats modified to include, (pdf, odf, epub, html, plaintext) + %% 4.0.8.orig.tar.xz (2013-02-20:07/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.8 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.8-1 diff --git a/lib/sisu/v4/constants.rb b/lib/sisu/v4/constants.rb index 505fdc02..fe4e895f 100644 --- a/lib/sisu/v4/constants.rb +++ b/lib/sisu/v4/constants.rb @@ -102,6 +102,7 @@ Mx={ br_nl: '╲', #lB ▌ 』 ┘ br_paragraph: '█', #FB █ 9608 # PP ∥ 8741 #▐ #'┘' #'¶' #FB █ 9608 lB ▌ 9612 RB ▐ 9616 br_obj: 'break_obj', + br_page_line: '▭', br_page: '┼', br_page_new: '╋', lnk_o: '⌠', lnk_c: '⌡', #'⌈' '⌋' '⌠' '⌡' #Mx[:lnk_o: '◁'; Mx[:lnk_c: '▷' #‹ › @@ -139,6 +140,7 @@ Mx[:pa_non_object_dummy_heading]="#{Mx[:pa_o]}-##{Mx[:pa_c]}" # Mx[:pa_non_object_no_heading]="#{Mx[:pa_o]}~##{Mx[:pa_c]}" #unnumbered paragraph (place marker at end of paragraph) Hx={ br_obj: { obj: Mx[:br_obj] }, # line sep + br_page_line: { obj: Mx[:br_page_line] }, # line across page br_page: { obj: Mx[:br_page] }, # newpage br_page_new: { obj: Mx[:br_page_new] }, # clearpage } diff --git a/lib/sisu/v4/dal_doc_str.rb b/lib/sisu/v4/dal_doc_str.rb index ddae0af0..dfea4ad4 100644 --- a/lib/sisu/v4/dal_doc_str.rb +++ b/lib/sisu/v4/dal_doc_str.rb @@ -75,6 +75,7 @@ module SiSU_DAL_DocumentStructureExtract SiSU_DAL_DocumentStructureExtract::Instantiate.new @pb=SiSU_DAL_DocumentStructure::ObjectLayout.new.break(Hx[:br_page]) @pbn=SiSU_DAL_DocumentStructure::ObjectLayout.new.break(Hx[:br_page_new]) + @pbl=SiSU_DAL_DocumentStructure::ObjectLayout.new.break(Hx[:br_page_line]) end def ln_get(lv) ln=case lv @@ -243,6 +244,8 @@ module SiSU_DAL_DocumentStructureExtract SiSU_DAL_DocumentStructure::ObjectLayout.new.break(Hx[:br_page],:markup) when /^(?:=\\\\=|<:pn>)\s*$/ #[br:pgn] SiSU_DAL_DocumentStructure::ObjectLayout.new.break(Hx[:br_page_new],:markup) + when /^-\.\.-\s*$/ #[br:pgl] + SiSU_DAL_DocumentStructure::ObjectLayout.new.break(Hx[:br_page_line],:markup) else #paragraph image=image_test(t_o) note=endnote_test?(t_o) diff --git a/lib/sisu/v4/dal_numbering.rb b/lib/sisu/v4/dal_numbering.rb index f3750065..258911d2 100644 --- a/lib/sisu/v4/dal_numbering.rb +++ b/lib/sisu/v4/dal_numbering.rb @@ -347,13 +347,15 @@ module SiSU_DAL_Numbering @seg=dob.name end @tuned_file << if dob.is==:heading \ - && (@md.pagenew || @md.pagebreak) + && (@md.pagenew || @md.pagebreak || @md.pageline) m=dob.ln.to_s dob_tmp=[] if @md.pagenew.inspect =~/#{m}/ dob_tmp << SiSU_DAL_DocumentStructure::ObjectLayout.new.break(Hx[:br_page_new]) << dob elsif @md.pagebreak.inspect =~/#{m}/ dob_tmp << SiSU_DAL_DocumentStructure::ObjectLayout.new.break(Hx[:br_page]) << dob + elsif @md.pageline.inspect =~/#{m}/ + dob_tmp << SiSU_DAL_DocumentStructure::ObjectLayout.new.break(Hx[:br_page_line]) << dob end para_result=unless dob_tmp.length > 0; dob else dob_tmp diff --git a/lib/sisu/v4/dal_syntax.rb b/lib/sisu/v4/dal_syntax.rb index 069b45ed..eeaca1a5 100644 --- a/lib/sisu/v4/dal_syntax.rb +++ b/lib/sisu/v4/dal_syntax.rb @@ -147,7 +147,8 @@ module SiSU_DAL_Syntax gsub(/ \\\\(?: |$)/,"#{Mx[:br_line]}"). gsub(/(?:<:?pb>)/,"#{Mx[:br_page]}"). # depreciated gsub(/(?:<:?pn>)/,"#{Mx[:br_page_new]}"). # depreciated - gsub(/(?:<:?br>|
)/,"#{Mx[:br_line]}") # depreciated + gsub(/(?:<:?br>|
)/,"#{Mx[:br_line]}"). # depreciated + gsub(/(?:^-\.\.-\s*$)/,"#{Mx[:br_page_line]}") end dob end diff --git a/lib/sisu/v4/epub_format.rb b/lib/sisu/v4/epub_format.rb index 98f4d7e4..49139667 100644 --- a/lib/sisu/v4/epub_format.rb +++ b/lib/sisu/v4/epub_format.rb @@ -1971,7 +1971,7 @@ output_epub_cont_seg.close para_form_css('p','norm',@txt) end def break - @txt=@txt.gsub(/#{Mx[:br_page_new]}|#{Mx[:br_page]}/,'

'). + @txt=@txt.gsub(/#{Mx[:br_page_new]}|#{Mx[:br_page]}|#{Mx[:br_page_line]}/,'

'). gsub(/#{Mx[:br_obj]}/,'

') para_form_css('p','norm',@txt) end diff --git a/lib/sisu/v4/manpage.rb b/lib/sisu/v4/manpage.rb index 9afc56eb..3b85183c 100644 --- a/lib/sisu/v4/manpage.rb +++ b/lib/sisu/v4/manpage.rb @@ -312,27 +312,27 @@ WOK gsub(/#{Mx[:gl_o]}#169#{Mx[:gl_c]}/,'©') else dob.obj=dob.obj.gsub(/\\/,'\e'). - gsub(/(?:#{Mx[:br_line]}|#{Mx[:br_nl]})\s*/,"\n") # watch + gsub(/(?:#{Mx[:br_line]}|#{Mx[:br_nl]})\s*/,"\n") # watch end - dob.obj=dob.obj.gsub(/(^| |#{Mx[:nbsp]}|\s|\*)\\\*/,'\1\\\\\*'). #man page requires + dob.obj=dob.obj.gsub(/(^| |#{Mx[:nbsp]}|\s|\*)\\\*/,'\1\\\\\*'). #man page requires gsub(/┆/,'|'). - gsub(/^(\.\S{3,})/m,' \1') # ^\. used by interpreter, disable when use not intended + gsub(/^(\.\S{3,})/m,' \1') # ^\. used by interpreter, disable when use not intended dob.obj=dob.obj.gsub(/~/,'~') if dob.obj #manpages use this if dob.is ==:code dob.obj=dob.obj.gsub(/(^|[^}])_([<>])/m,'\1\2'). # _> _< gsub(/(^|[^}])_([<>])/m,'\1\2'). # _<_< - gsub(/(?:#{Mx[:br_line]}|#{Mx[:br_nl]})+(\s*)/m,"\n\\1"). # watch + gsub(/(?:#{Mx[:br_line]}|#{Mx[:br_nl]})+(\s*)/m,"\n\\1"). # watch gsub(/\A(.+?)\s*\Z/m,".nf\n\\1\n.fi") end - dob.obj=dob.obj.gsub(/(?:#{Mx[:br_line]}|#{Mx[:br_nl]})+\s*/m,"\n\n") # watch + dob.obj=dob.obj.gsub(/(?:#{Mx[:br_line]}|#{Mx[:br_nl]})+\s*/m,"\n\n") # watch blit=dob.obj.scan(/\[[^\]]+\]|[^\[]+/) blit_array=[] - dob.obj=dob.obj.gsub(/#{Mx[:gl_o]}:name#\S+?#{Mx[:gl_c]}/mi,''). #added - gsub(/#{Mx[:br_page]}\s*|#{Mx[:br_page_new]}/,''). # remove page breaks + dob.obj=dob.obj.gsub(/#{Mx[:gl_o]}:name#\S+?#{Mx[:gl_c]}/mi,''). #added + gsub(/#{Mx[:br_page]}\s*|#{Mx[:br_page_new]}|#{Mx[:br_page_line]}/,''). # remove page breaks, you may wish to have a line across the page break instead gsub(/(^|#{Mx[:gl_c]}|\s)#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/,'\1\2'). gsub(/(.+?)<\/a>/m,'\1'). - gsub(/#{Mx[:mk_o]}name#\S+?#{Mx[:mk_c]}/,''). # remove name links - gsub(/ |#{Mx[:nbsp]}/,' '). # decide on + gsub(/#{Mx[:mk_o]}name#\S+?#{Mx[:mk_c]}/,''). # remove name links + gsub(/ |#{Mx[:nbsp]}/,' '). # decide on gsub(/(?:^|[^_\\])#{Mx[:lnk_o]}\s*(\S+?\.(?:png|jpg|gif)) .+?#{Mx[:lnk_c]}#{Mx[:url_o]}\S+?#{Mx[:url_c]}/,' [ \1 ]'). #"[ #{dir.url.images_local}\/\\1 ]") gsub(/(?:^|[^_\\])#{Mx[:lnk_o]}\s*(\S+?\.(?:png|jpg|gif)) .+?#{Mx[:lnk_c]}image/,' [ \1 ]'). #"[ #{dir.url.images_local}\/\\1 ]") gsub(/^(?:^|[^_\\])#{Mx[:lnk_o]}\s*\S+?\.(?:png|jpg|gif)\s+.+?"(.*?)"\s*#{Mx[:lnk_c]}\S+/,'[image: "\1"]') diff --git a/lib/sisu/v4/odf.rb b/lib/sisu/v4/odf.rb index ca02d16a..c3746b06 100644 --- a/lib/sisu/v4/odf.rb +++ b/lib/sisu/v4/odf.rb @@ -191,9 +191,11 @@ module SiSU_ODF @@fns=@md.fns end unless @@docstart - breakpage=if (@md.pagenew or @md.pagebreak) \ - and (@md.pagenew =~ m or @md.pagebreak =~m) + breakpage=if (@md.pagenew || @md.pagebreak) \ + and (@md.pagenew =~m or @md.pagebreak =~m) ' ' + elsif @md.pageline \ + and @md.pageline =~m #fix else '' end end @@ -526,6 +528,8 @@ module SiSU_ODF if dob.obj==Mx[:br_page] \ or dob.obj==Mx[:br_page_new] dob=br.br_page + elsif dob.obj==Mx[:br_page_line] + dob=br.br_page_line elsif dob.obj==Mx[:br_obj] dob=br.obj_sep end @@ -725,6 +729,8 @@ WOK breakpage=if @md.pagenew \ or @md.pagebreak ' fo:break-before="page"' + elsif @md.pageline ##fix + '' else '' end x=<#{sep*60}} + @t_o + end def obj_sep #center later sep='--- ' @t_o.obj=%{#{sep*20}} diff --git a/lib/sisu/v4/options.rb b/lib/sisu/v4/options.rb index 61586009..6e5f7ca4 100644 --- a/lib/sisu/v4/options.rb +++ b/lib/sisu/v4/options.rb @@ -70,7 +70,7 @@ module SiSU_Commandline @make_instruct_array=make_instruct_array end def sisu_document_make_instructions - @pagenew=@pagebreak=@toc=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@num_top=@i18n=@man_section=@emphasis_set_to=@bold_match_list=@italics_match_list=@substitution_match_list=@footer_links=@home_button_links=@links=nil + @pagenew=@pagebreak=@pageline=@toc=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@num_top=@i18n=@man_section=@emphasis_set_to=@bold_match_list=@italics_match_list=@substitution_match_list=@footer_links=@home_button_links=@links=nil @makeset=false if @make_instruct_array @make_instruct_array.each do |para| #% scan document @@ -83,6 +83,7 @@ module SiSU_Commandline @makeset=true @pagenew=makes[:pagenew] @pagebreak=makes[:pagenew] + @pageline=makes[:pageline] @toc=makes[:toc] @lv1=makes[:lv1] @lv2=makes[:lv2] @@ -111,6 +112,7 @@ module SiSU_Commandline { makeset: @makeset, pagenew: @pagenew, pagebreak: @pagebreak, + pageline: @pageline, toc: @toc, lv1: @lv1, lv2: @lv2, diff --git a/lib/sisu/v4/param.rb b/lib/sisu/v4/param.rb index 1bfd8b3d..375e2af8 100644 --- a/lib/sisu/v4/param.rb +++ b/lib/sisu/v4/param.rb @@ -830,9 +830,9 @@ module SiSU_Param @doc={ lv: [] } @doc[:fns],@doc[:fnb],@doc[:scr_suffix]='','','' @@publisher='SiSU scribe' - attr_accessor :make,:env,:path,:file,:fn,:fns,:fno,:fnb,:fnn,:fnt,:fnl,:flv,:fnz,:fnstex,:ocn,:sfx_src,:pdf,:file_type,:dir_out,:dir_tex,:dir_lout,:txt_path,:sisu,:sisu_version,:ruby_version,:title,:subtitle,:full_title,:html_title,:subtitle_tex,:creator,:classify,:author_home,:author,:author_title,:author_nationality,:authors,:authorship,:translator,:illustrator,:prepared_by,:digitized_by,:subject,:description,:publisher,:current_publisher,:contributor,:date,:date_created,:date_issued,:date_available,:date_valid,:date_modified,:date_translated,:date_added_to_site,:date_scheme,:date_created_scheme,:date_issued_scheme,:date_available_scheme,:date_valid_scheme,:date_modified_scheme,:type,:format,:identifier,:source,:language,:language_original,:relation,:coverage,:rights,:keywords,:comments,:abstract,:cls_loc,:cls_dewey,:cls_pg,:cls_isbn,:papersize,:papersize_array,:toc,:lv1,:lv2,:lv3,:lv4,:lv5,:lv6,:lvs,:pagenew,:pagebreak,:num_top,:bold_match_list,:italics_match_list,:substitution_match_list,:emphasis_set_to,:toc_lev_limit,:flag_endnotes,:flag_auto_endnotes,:flag_separate_endnotes,:flag_separate_endnotes_make,:markup,:markup_instruction,:markup_version,:markup_declared,:flag_tables,:vocabulary,:doc_css,:yaml,:lnk,:links,:prefix_a,:prefix_b,:suffix,:information,:contact,:icon,:image,:ad_url,:ad_png,:ad_alt,:ad_began,:flag_promo,:promo,:ad_home,:stmp,:stmpd,:sc_filename,:sc_number,:sc_date,:sc_time,:sc_info,:yamladdr,:locale,:wc_lines,:wc_words,:wc_bytes,:file_encoding,:filesize,:user,:home,:hostname,:pwd,:firstseg,:programs,:author_copymark,:i18n,:lang,:lang_code_insert,:en,:notes,:dgst,:generated,:tags,:tag_array,:concord_make,:seg_names,:seg_autoname_safe,:set_header_title,:set_heading_top,:set_heading_seg,:heading_seg_first,:heading_seg_first_flag,:base_program,:ec,:opt,:sem_tag,:book_idx,:topic_register,:topic_register_array,:original,:writing_focus,:audio,:daisy,:home_button_image,:home_button_links,:footer_links,:cover_image,:man_section + attr_accessor :make,:env,:path,:file,:fn,:fns,:fno,:fnb,:fnn,:fnt,:fnl,:flv,:fnz,:fnstex,:ocn,:sfx_src,:pdf,:file_type,:dir_out,:dir_tex,:dir_lout,:txt_path,:sisu,:sisu_version,:ruby_version,:title,:subtitle,:full_title,:html_title,:subtitle_tex,:creator,:classify,:author_home,:author,:author_title,:author_nationality,:authors,:authorship,:translator,:illustrator,:prepared_by,:digitized_by,:subject,:description,:publisher,:current_publisher,:contributor,:date,:date_created,:date_issued,:date_available,:date_valid,:date_modified,:date_translated,:date_added_to_site,:date_scheme,:date_created_scheme,:date_issued_scheme,:date_available_scheme,:date_valid_scheme,:date_modified_scheme,:type,:format,:identifier,:source,:language,:language_original,:relation,:coverage,:rights,:keywords,:comments,:abstract,:cls_loc,:cls_dewey,:cls_pg,:cls_isbn,:papersize,:papersize_array,:toc,:lv1,:lv2,:lv3,:lv4,:lv5,:lv6,:lvs,:pagenew,:pagebreak,:pageline,:num_top,:bold_match_list,:italics_match_list,:substitution_match_list,:emphasis_set_to,:toc_lev_limit,:flag_endnotes,:flag_auto_endnotes,:flag_separate_endnotes,:flag_separate_endnotes_make,:markup,:markup_instruction,:markup_version,:markup_declared,:flag_tables,:vocabulary,:doc_css,:yaml,:lnk,:links,:prefix_a,:prefix_b,:suffix,:information,:contact,:icon,:image,:ad_url,:ad_png,:ad_alt,:ad_began,:flag_promo,:promo,:ad_home,:stmp,:stmpd,:sc_filename,:sc_number,:sc_date,:sc_time,:sc_info,:yamladdr,:locale,:wc_lines,:wc_words,:wc_bytes,:file_encoding,:filesize,:user,:home,:hostname,:pwd,:firstseg,:programs,:author_copymark,:i18n,:lang,:lang_code_insert,:en,:notes,:dgst,:generated,:tags,:tag_array,:concord_make,:seg_names,:seg_autoname_safe,:set_header_title,:set_heading_top,:set_heading_seg,:heading_seg_first,:heading_seg_first_flag,:base_program,:ec,:opt,:sem_tag,:book_idx,:topic_register,:topic_register_array,:original,:writing_focus,:audio,:daisy,:home_button_image,:home_button_links,:footer_links,:cover_image,:man_section def initialize(fns_array,opt) - @env=@path,@file=@fn=@fns=@fno=@fnb=@fnn=@fnt=@fnl=@flv=@fnz=@fnstex=@ocn=@sfx_src=@pdf=@file_type=@dir_out=@dir_tex=@dir_lout=@txt_path=@make=@flag_endnotes=@flag_auto_endnotes=@flag_separate_endnotes=@flag_separate_endnotes_make=@sisu=@sisu_version=@ruby_version=@title=@subtitle=@full_title=@html_title=@subtitle_tex=@creator=@classify=@author_home=@author=@author_title=@author_nationality=@translator=@illustrator=@prepared_by=@digitized_by=@subject=@description=@publisher=@current_publisher=@contributor=@date=@date_created=@date_issued=@date_available=@date_valid=@date_modified=@date_translated=@date_added_to_site=@date_scheme=@date_created_scheme=@date_issued_scheme=@date_available_scheme=@date_valid_scheme=@date_modified_scheme=@type=@format=@identifier=@source=@language=@language_original=@relation=@coverage=@rights=@keywords=@comments=@abstract=@cls_loc=@cls_dewey=@cls_pg=@cls_isbn=@papersize=@toc=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@pagenew=@pagebreak=@num_top=@bold_match_list=@italics_match_list=@substitution_match_list=@emphasis_set_to=@toc_lev_limit=@flag_tables=@vocabulary=@doc_css=@yaml=@lnk=@links=@prefix_a=@prefix_b=@suffix=@information=@contact=@icon=@ad_url=@ad_png=@ad_alt=@ad_began=@promo=@ad_home=@stmp=@stmpd=@sc_filename=@sc_number=@sc_date=@sc_time=@sc_info=@yamladdr=@locale=@wc_lines=@wc_words=@wc_bytes=@file_encoding=@filesize=@firstseg=@programs=@author_copymark=@i18n=@lang=@lang_code_insert=@en=@notes=@dgst=@generated=@heading_seg_first=@base_program=@topic_register=@original=@writing_focus=@audio=@home_button_image=@home_button_links=@cover_image=@man_section=nil + @env=@path,@file=@fn=@fns=@fno=@fnb=@fnn=@fnt=@fnl=@flv=@fnz=@fnstex=@ocn=@sfx_src=@pdf=@file_type=@dir_out=@dir_tex=@dir_lout=@txt_path=@make=@flag_endnotes=@flag_auto_endnotes=@flag_separate_endnotes=@flag_separate_endnotes_make=@sisu=@sisu_version=@ruby_version=@title=@subtitle=@full_title=@html_title=@subtitle_tex=@creator=@classify=@author_home=@author=@author_title=@author_nationality=@translator=@illustrator=@prepared_by=@digitized_by=@subject=@description=@publisher=@current_publisher=@contributor=@date=@date_created=@date_issued=@date_available=@date_valid=@date_modified=@date_translated=@date_added_to_site=@date_scheme=@date_created_scheme=@date_issued_scheme=@date_available_scheme=@date_valid_scheme=@date_modified_scheme=@type=@format=@identifier=@source=@language=@language_original=@relation=@coverage=@rights=@keywords=@comments=@abstract=@cls_loc=@cls_dewey=@cls_pg=@cls_isbn=@papersize=@toc=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@pagenew=@pagebreak=@pageline=@num_top=@bold_match_list=@italics_match_list=@substitution_match_list=@emphasis_set_to=@toc_lev_limit=@flag_tables=@vocabulary=@doc_css=@yaml=@lnk=@links=@prefix_a=@prefix_b=@suffix=@information=@contact=@icon=@ad_url=@ad_png=@ad_alt=@ad_began=@promo=@ad_home=@stmp=@stmpd=@sc_filename=@sc_number=@sc_date=@sc_time=@sc_info=@yamladdr=@locale=@wc_lines=@wc_words=@wc_bytes=@file_encoding=@filesize=@firstseg=@programs=@author_copymark=@i18n=@lang=@lang_code_insert=@en=@notes=@dgst=@generated=@heading_seg_first=@base_program=@topic_register=@original=@writing_focus=@audio=@home_button_image=@home_button_links=@cover_image=@man_section=nil @data,@path,@fns,@fno,@opt=fns_array,opt.pth,opt.fns,opt.fno,opt #@data used as data @flag_tables,@set_header_title,@set_heading_top,@set_heading_seg,@heading_seg_first_flag,@flag_promo,@book_idx=false,false,false,false,false,false,false @seg_autoname_safe=true @@ -874,7 +874,8 @@ module SiSU_Param : @opt.make_instructions if common_makes[:makeset] @pagenew=common_makes[:pagenew] - @pagebreak=common_makes[:pagenew] + @pagebreak=common_makes[:pagebreak] + @pageline=common_makes[:pageline] @toc=common_makes[:toc] @lv1=common_makes[:lv1] @lv2=common_makes[:lv2] @@ -1050,6 +1051,9 @@ module SiSU_Param @pagebreak=(makes[:pagebreak]) \ ? (makes[:pagebreak]) \ : @pagebreak + @pageline=(makes[:pageline]) \ + ? (makes[:pageline]) \ + : @pageline @toc=(makes[:toc]) ? (makes[:toc]) : @toc @lv1=(makes[:lv1]) ? (makes[:lv1]) : @lv1 @lv2=(makes[:lv2]) ? (makes[:lv2]) : @lv2 @@ -1268,7 +1272,7 @@ module SiSU_Param end if @markup_version.determined >= 0.38 #convert values in headers to internal representation translated=[] - translate_list=[@pagenew,@pagebreak,@num_top,@toc_lev_limit] + translate_list=[@pagenew,@pagebreak,@pageline,@num_top,@toc_lev_limit] translate_list.each do |t| translate=t.to_s if t translated << if translate @@ -1291,9 +1295,10 @@ module SiSU_Param else nil end end - @pagenew,@pagebreak,@num_top,@toc_lev_limit=translated + @pagenew,@pagebreak,@pageline,@num_top,@toc_lev_limit=translated @markup=@markup.gsub(/page_new\s*=\s*([\dA-C])/,"page_new=#{@pagenew}"). gsub(/page_break\s*=\s*([\dA-C])/,"page_break=#{@pagebreak}"). + gsub(/page_line\s*=\s*([\dA-C])/,"page_line=#{@pageline}"). gsub(/num_top\s*=\s*([\dA-C])/,"num_top=#{@num_top}"). gsub(/toc_lev_limit\s*=\s*([\dA-C])/,"toc_lev_limit=#{@toc_lev_limit}") end diff --git a/lib/sisu/v4/param_make.rb b/lib/sisu/v4/param_make.rb index cfc14074..675c0955 100644 --- a/lib/sisu/v4/param_make.rb +++ b/lib/sisu/v4/param_make.rb @@ -167,12 +167,13 @@ module SiSU_Param_Make pagebreaks=((@h['breaks'] =~/;/) \ ? (@h['breaks'].split(/;\s*/)) : [ @h['breaks'] ]) - page_new,page_break=nil,nil + page_new,page_break,page_line=nil,nil,nil pagebreaks.each do |x| page_new=x[/(:?[\dA-C],?)+/] if x=~/new|clear/ page_break=x[/(:?[\dA-C],?)+/] if x =~/break/ + page_line=x[/(:?[\dA-C],?)+/] if x =~/line/ end - { page_new: page_new, page_break: page_break } + { page_new: page_new, page_break: page_break, page_line: page_line } end def language l=if @h['language'] && (@h['language']=~/\S{2,}/) @@ -516,12 +517,12 @@ module SiSU_Param_Make end end class MakeHead - attr_accessor :pagenew,:pagebreak,:toc,:lv1,:lv2,:lv3,:lv4,:lv5,:lv6,:num_top,:i18n,:man_section,:substitution_match_list,:bold_match_list,:italics_match_list,:emphasis_set_to,:footer_links,:home_button_links,:home_button_image,:cover_image + attr_accessor :pagenew,:pagebreak,:pageline,:toc,:lv1,:lv2,:lv3,:lv4,:lv5,:lv6,:num_top,:i18n,:man_section,:substitution_match_list,:bold_match_list,:italics_match_list,:emphasis_set_to,:footer_links,:home_button_links,:home_button_image,:cover_image def initialize(make) @make=make end def clear - @pagenew=@pagebreak=@toc=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@num_top=@i18n=@man_section=@footer_links=@substitution_match_list=@bold_match_list=@italics_match_list=@emphasis_set_to=@home_button_links=@home_button_image=@cover_image=nil + @pagenew=@pagebreak=@pageline=@toc=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@num_top=@i18n=@man_section=@footer_links=@substitution_match_list=@bold_match_list=@italics_match_list=@emphasis_set_to=@home_button_links=@home_button_image=@cover_image=nil end def make_instruct clear @@ -533,6 +534,10 @@ module SiSU_Param_Make and @make.breaks[:page_break] #newpage @pagebreak=@make.breaks[:page_break] end + if defined? @make.breaks \ + and @make.breaks[:page_line] #page line across + @pagebreak=@make.breaks[:page_line] + end if defined? @make.headings \ and @make.headings @toc=@make.headings[0] @@ -615,6 +620,7 @@ module SiSU_Param_Make end { pagenew: @pagenew, pagebreak: @pagebreak, + pageline: @pageline, toc: @toc, lv1: @lv1, lv2: @lv2, diff --git a/lib/sisu/v4/plaintext.rb b/lib/sisu/v4/plaintext.rb index 9bbc799c..b916f081 100644 --- a/lib/sisu/v4/plaintext.rb +++ b/lib/sisu/v4/plaintext.rb @@ -363,7 +363,8 @@ WOK sp=' ' ln='-' @plaintext[:body] <<=if dob.obj==Mx[:br_page] \ - or dob.obj==Mx[:br_page_new] + or dob.obj==Mx[:br_page_new] \ + or dob.obj==Mx[:br_page_line] "#{@br}#{ln*40}#{@br*2}" elsif dob.obj ==Mx[:br_obj] "#{@br}#{sp*20}* * *#{@br*2}" diff --git a/lib/sisu/v4/shared_xml.rb b/lib/sisu/v4/shared_xml.rb index 9db839b1..b175408d 100644 --- a/lib/sisu/v4/shared_xml.rb +++ b/lib/sisu/v4/shared_xml.rb @@ -376,6 +376,7 @@ module SiSU_XML_Munge dob.obj=dob.obj.gsub(/#{Mx[:br_line]}|#{Mx[:br_nl]}/,'
') unless dob.is==:table dob.obj=dob.obj.gsub(/#{Mx[:br_page]}\s*/,''). gsub(/#{Mx[:br_page_new]}\s*/,''). + gsub(/#{Mx[:br_page_line]}\s*/,''). gsub(/#{Mx[:pa_non_object_no_heading]}|#{Mx[:pa_non_object_dummy_heading]}/,''). gsub(/<[-~]#>/,''). gsub(/href="#{Xx[:segment]}/m,'href="'). diff --git a/lib/sisu/v4/texpdf.rb b/lib/sisu/v4/texpdf.rb index 01ca5934..5e18f5aa 100644 --- a/lib/sisu/v4/texpdf.rb +++ b/lib/sisu/v4/texpdf.rb @@ -398,6 +398,7 @@ module SiSU_TeX elsif dob.is ==:break if dob.obj==Mx[:br_page]; dob.tmp='\newpage' elsif dob.obj==Mx[:br_page_new]; dob.tmp='\clearpage' + elsif dob.obj==Mx[:br_page_line]; dob.tmp=' \\ \hline \\ ' elsif dob.obj==Mx[:br_obj]; dob.tmp='\parasep' end elsif dob.is==:comment \ -- cgit v1.2.3 From 5d116febea147066640908a9c7edb7339f057766 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 22 Feb 2013 19:29:51 -0500 Subject: v4: vim syntax, sisu.vim --- data/doc/sisu/CHANGELOG_v4 | 1 + data/sisu/v4/conf/editor-syntax-etc/vim/syntax/sisu.vim | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 19a1d88b..796ddafe 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -31,6 +31,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.9.orig.tar.xz * v4: dal, line across page divider -..- introduced, an alternative to page break -\\- & =\\=, affects pdf and odf most significantly * output formats modified to include, (pdf, odf, epub, html, plaintext) + * vim syntax, sisu.vim %% 4.0.8.orig.tar.xz (2013-02-20:07/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.8 diff --git a/data/sisu/v4/conf/editor-syntax-etc/vim/syntax/sisu.vim b/data/sisu/v4/conf/editor-syntax-etc/vim/syntax/sisu.vim index 7edcf208..d21d04f3 100644 --- a/data/sisu/v4/conf/editor-syntax-etc/vim/syntax/sisu.vim +++ b/data/sisu/v4/conf/editor-syntax-etc/vim/syntax/sisu.vim @@ -1,7 +1,7 @@ " SiSU Vim syntax file " SiSU Maintainer: Ralph Amissah -" SiSU Markup: SiSU (sisu-4.0.0) -" Last Change: 2012-11-16 +" SiSU Markup: SiSU (sisu-4.0.9) +" Last Change: 2013-02-22 " URL: "(originally looked at Ruby Vim by Mirko Nasato) @@ -21,7 +21,7 @@ syn match sisu_error contains=sisu_link,sisu_error_wspace "" if !exists("sisu_no_identifiers") syn match sisu_mark_endnote "\~^" syn match sisu_break contains=@NoSpell " \\\\\( \|$\)\|
\|
" - syn match sisu_control contains=@NoSpell "^\(-\\\\-\|=\\\\=\|<:p[bn]>\)\s*$" + syn match sisu_control contains=@NoSpell "^\(-\\\\-\|=\\\\=\|-\.\.-\|<:p[bn]>\)\s*$" syn match sisu_control contains=@NoSpell "^<:\(bo\|---\)>\s*$" syn match sisu_marktail "[~-]#" syn match sisu_control "\"" -- cgit v1.2.3 From 90ab101c528f23c50aa8fd31068fdc550d3a1ff1 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 22 Feb 2013 19:32:54 -0500 Subject: v4: emacs, sisu-mode.el --- data/doc/sisu/CHANGELOG_v4 | 1 + data/sisu/v4/conf/editor-syntax-etc/emacs/sisu-mode.el | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 796ddafe..203a0189 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -32,6 +32,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.9.orig.tar.xz break -\\- & =\\=, affects pdf and odf most significantly * output formats modified to include, (pdf, odf, epub, html, plaintext) * vim syntax, sisu.vim + * emacs, sisu-mode.el %% 4.0.8.orig.tar.xz (2013-02-20:07/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.8 diff --git a/data/sisu/v4/conf/editor-syntax-etc/emacs/sisu-mode.el b/data/sisu/v4/conf/editor-syntax-etc/emacs/sisu-mode.el index 1fb0feec..fc0589d8 100644 --- a/data/sisu/v4/conf/editor-syntax-etc/emacs/sisu-mode.el +++ b/data/sisu/v4/conf/editor-syntax-etc/emacs/sisu-mode.el @@ -3,7 +3,7 @@ ;; @Keywords: text, syntax, processes, tools ;; @Version: 4.0.8 2013-02-17 (3.0.7 2011-04-20) (2008-12-14) ;; [3.0.7 2011-04-20 Ambrose Kofi Laing & Ralph Amissah] -;; [4.0.8 2013-02-17 Ralph Amissah] +;; [4.0.9 2013-02-22 Ralph Amissah] ;; @URL: ;; @Copyright: Assigned to FSF 2011-04-08 (GNU EMACS) ;; @License: GPLv3 @@ -257,8 +257,10 @@ (cons "\\(^\\|[ ]\\)http:[/][/][^ \t\n\r<]+" 'general-font-lock-blue2) ;; Comment Lines (cons "^% .*" 'general-font-lock-blue1) + ;; page break + (cons "^\\(-\\\\\\\\-\\|=\\\\\\\\=\\|-\\.\\.-\\)" 'general-font-lock-red2) ;; line break - (cons " \\\\\\\\ " 'general-font-lock-red1) + (cons " \\\\\\\\ " 'general-font-lock-red1) ;; line break (depreciated) (cons "
" 'general-font-lock-red1) ;; Section titles -- cgit v1.2.3 From f6f8918bfdf8d9bd550f473ecfb53744e17f5731 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 22 Feb 2013 21:40:54 -0500 Subject: v4: documentation, sisu markup (sisu_markup.sst, man page sisu.1, sisu.1.html) --- data/doc/sisu/CHANGELOG_v4 | 1 + data/doc/sisu/html/sisu.1.html | 18 +++++++++++------- .../sisu/markup-samples/v4/sisu_manual/sisu_markup.sst | 16 +++++++++++++++- man/man1/sisu.1 | 17 +++++++++++++++-- 4 files changed, 42 insertions(+), 10 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 203a0189..b8d88e1b 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -33,6 +33,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.9.orig.tar.xz * output formats modified to include, (pdf, odf, epub, html, plaintext) * vim syntax, sisu.vim * emacs, sisu-mode.el + * documentation, sisu_markup.sst, man page sisu.1, sisu.1.html %% 4.0.8.orig.tar.xz (2013-02-20:07/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.8 diff --git a/data/doc/sisu/html/sisu.1.html b/data/doc/sisu/html/sisu.1.html index 3d852a3e..56535d2e 100644 --- a/data/doc/sisu/html/sisu.1.html +++ b/data/doc/sisu/html/sisu.1.html @@ -372,8 +372,7 @@ invoked by --dump & redirect).
see --dal (document abstraction level/layer)
--machine [filename/wildcard/url]
-
see --dal (document abstraction -level/layer)
+
see --dal (document abstraction level/layer)
--maintenance [filename/wildcard/url]
maintenance mode, interim @@ -381,8 +380,7 @@ processing files are preserved and their locations indicated. (also see -V). Aliases -M and --keep-processing-files.
--manpage [filename/wildcard]
-
produces -man page of file, not suitable for all outputs. Alias -i
+
produces man page of file, not suitable for all outputs. Alias -i
-N [filename/wildcard/url]
document digest or document content certificate ( DCC ) as md5 digest tree @@ -1900,18 +1898,24 @@ or breaks the page, starts a new page.

page break -\- or breaks a column, starts a new column, if using columns, else breaks the page, starts a new page. -


+

page break line across page -..- draws a dividing line, dividing paragraphs + +

page break:

-\\-
 or
 <:pb>
 
-

or -


+

+

page (break) new:

=\\=
 or
 <:pn>
 

+

page (break) line across page (dividing paragraphs):
+

-..-
+
+

Book Index

To make an index append to paragraph the book index term relates diff --git a/data/doc/sisu/markup-samples/v4/sisu_manual/sisu_markup.sst b/data/doc/sisu/markup-samples/v4/sisu_manual/sisu_markup.sst index 98377850..92b7f430 100644 --- a/data/doc/sisu/markup-samples/v4/sisu_manual/sisu_markup.sst +++ b/data/doc/sisu/markup-samples/v4/sisu_manual/sisu_markup.sst @@ -1162,6 +1162,8 @@ may be used. 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). +To draw a dividing line dividing paragraphs, see the section on page breaks. + 3~ page breaks Page breaks are only relevant and honored in some output formats. A page break or a new page may be inserted manually using the following markup on a line on its own: @@ -1170,6 +1172,10 @@ page new =\\= or <:pn> breaks the page, starts a new page. page break -\\- or <:pb> breaks a column, starts a new column, if using columns, else breaks the page, starts a new page. +page break line across page -..- draws a dividing line, dividing paragraphs + +page break: + code{ -\\- @@ -1180,7 +1186,7 @@ or }code -or +page (break) new: code{ @@ -1192,6 +1198,14 @@ or }code +page (break) line across page (dividing paragraphs): + +code{ + +-..- + +}code + 2~ Book index To make an index append to paragraph the book index term relates to it, using an equal sign and curly braces. diff --git a/man/man1/sisu.1 b/man/man1/sisu.1 index f21808b1..9fcc524c 100644 --- a/man/man1/sisu.1 +++ b/man/man1/sisu.1 @@ -1,4 +1,4 @@ -.TH "sisu" "1" "2013-02-07" "4.0.6" "SiSU" +.TH "sisu" "1" "2013-02-22" "4.0.9" "SiSU" .br .SH NAME .br @@ -2272,6 +2272,12 @@ page new =\e= or breaks the page, starts a new page. .BR page break -\\- or breaks a column, starts a new column, if using columns, else breaks the page, starts a new page. + +.BR +page break line across page -..- draws a dividing line, dividing paragraphs + +.BR +page break: .nf -\e\e- @@ -2280,13 +2286,20 @@ or .fi .BR -or +page (break) new: .nf =\e\e= or <:pn> .fi + +.BR +page (break) line across page (dividing paragraphs): +.nf +-..- +.fi + .SH BOOK INDEX .BR -- cgit v1.2.3